Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Level 200-single-region-hub - Fails when deploying diagnostic settings #122

Closed
arnoldna opened this issue Dec 18, 2020 · 1 comment
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@arnoldna
Copy link

Level 200-single-region-hub - Fails when deploying diagnostic settings.

Steps to Reproduce.

Following Getting Started Documents:

https://github.com/Azure/caf-terraform-landingzones/blob/master/documentation/getting_started/getting_started.md

Deployed Launchpad
Deployed Foundations
Attempted to deploy level 200-single-region-hub scenario

rover -lz /tf/caf/landingzones/caf_networking
-level level2
-var-folder /tf/caf/landingzones/caf_networking/scenario/200-single-region-hub
-a plan

Multiple errors all related to diagnostic definitions

Error: Error in function call

on /home/vscode/.terraform.cache/modules/networking/modules/diagnostics/module.tf line 8, in resource "azurerm_monitor_diagnostic_setting" "diagnostics":
8: name = try(format("%s%s", try(var.global_settings.prefix_with_hyphen, ""), each.value.name), format("%s%s", try(var.global_settings.prefix_with_hyphen, ""), var.diagnostics.diagnostics_definition[each.value.definition_key].name))
|----------------
| each.value is object with 3 attributes
| each.value.definition_key is "network_security_group"
| var.diagnostics.diagnostics_definition is object with 3 attributes
| var.global_settings is object with no attributes

Call to function "try" failed: no expression succeeded:

  • Unsupported attribute (at
    /home/vscode/.terraform.cache/modules/networking/modules/diagnostics/module.tf:8,102-107)
    This object does not have an attribute named "name".
  • Invalid index (at
    /home/vscode/.terraform.cache/modules/networking/modules/diagnostics/module.tf:8,212-239)
    The given key does not identify an element in this collection value.

At least one expression must produce a successful result.

Expected behavior
Example scenario should work

@arnoldna arnoldna added the bug Something isn't working label Dec 18, 2020
@arnaudlh arnaudlh self-assigned this Feb 12, 2021
@arnaudlh arnaudlh added this to the 2102 milestone Feb 12, 2021
@arnaudlh
Copy link
Member

closing as no repro anymore. tanks @arnoldna

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants