Skip to content

Commit

Permalink
fix: null value from main.tf and removed lookup function
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhavcloud committed Sep 18, 2024
1 parent 3094648 commit 43a4d78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions examples/complete/example.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
provider "azurerm" {
features {}
subscription_id = "000000-11111-1223-XXX-XXXXXXXXXXXX"
subscription_id = "000000-11111-1223-XXX-XXXXXXXXXXXX"

}

Expand Down Expand Up @@ -49,7 +49,7 @@ module "name_specific_subnet" {
environment = local.environment
resource_group_name = module.resource_group.resource_group_name
location = module.resource_group.resource_group_location
virtual_network_name = join("", module.vnet.vnet_name[0])
virtual_network_name = module.vnet.vnet_name
#subnet
specific_name_subnet = true
specific_subnet_names = ["AzureFirewallSubnet"] # Corrected to be a list of strings
Expand Down
8 changes: 3 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,12 @@ resource "azurerm_firewall" "firewall" {
}
}

dynamic "ip_configuration" {
dynamic "ip_configuration" {
for_each = toset(var.additional_public_ips)

content {
name = lookup(ip_configuration.value, "name", null)
public_ip_address_id = lookup(ip_configuration.value, "public_ip_address_id", null)
name = ip_configuration.value.name
public_ip_address_id = ip_configuration.value.public_ip_address_id
}

}

lifecycle {
Expand Down

0 comments on commit 43a4d78

Please sign in to comment.