Skip to content

Commit

Permalink
Merge pull request #1568 from raketham/main
Browse files Browse the repository at this point in the history
Add try block to check the base tags exists or not
  • Loading branch information
LaurentLesle authored Mar 31, 2023
2 parents 54a67b9 + 99b15b7 commit 699483a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/networking/private_dns_vnet_link_v1/module.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resource "azapi_resource" "vnet_links" {

tags = var.inherit_tags ? merge(
var.global_settings.tags,
can(each.value.id) || can(each.value.dns_parent_id) ? {} : var.private_dns[try(each.value.lz_key, var.client_config.landingzone_key)][each.value.key].base_tags,
can(each.value.id) || can(each.value.dns_parent_id) ? {} : try(var.private_dns[try(each.value.lz_key, var.client_config.landingzone_key)][each.value.key].base_tags,{}),
try(var.settings.tags, {})
) : try(var.settings.tags, {})

Expand Down

0 comments on commit 699483a

Please sign in to comment.