Skip to content

Commit

Permalink
Improve resource_group lookup fw policy (#1729)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hein Tonny Køien authored Aug 8, 2023
1 parent 89d6898 commit a5e1d20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions networking_firewall_policy.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module "azurerm_firewall_policies" {
settings = each.value
tags = try(each.value.tags, null)

resource_group = can(each.value.resource_group.id) ? each.value.resource_group.id : local.combined_objects_resource_groups[try(each.value.lz_key, local.client_config.landingzone_key)][try(each.value.resource_group_key, each.value.resource_group.key)]
resource_group = can(each.value.resource_group.id) ? each.value.resource_group.id : local.combined_objects_resource_groups[try(each.value.resource_group.lz_key, each.value.lz_key, local.client_config.landingzone_key)][try(each.value.resource_group_key, each.value.resource_group.key)]
}

module "azurerm_firewall_policies_child" {
Expand All @@ -26,7 +26,7 @@ module "azurerm_firewall_policies_child" {

base_policy_id = can(each.value.base_policy.id) ? each.value.base_policy.id : local.combined_objects_azurerm_firewall_policies[try(each.value.base_policy.lz_key, local.client_config.landingzone_key)][each.value.base_policy.key].id

resource_group = can(each.value.resource_group.id) ? each.value.resource_group.id : local.combined_objects_resource_groups[try(each.value.lz_key, local.client_config.landingzone_key)][try(each.value.resource_group_key, each.value.resource_group.key)]
resource_group = can(each.value.resource_group.id) ? each.value.resource_group.id : local.combined_objects_resource_groups[try(each.value.resource_group.lz_key, each.value.lz_key, local.client_config.landingzone_key)][try(each.value.resource_group_key, each.value.resource_group.key)]
}


Expand Down

0 comments on commit a5e1d20

Please sign in to comment.