Skip to content

Commit

Permalink
ifx: Count condition in outputs.tf (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rupalgw authored Feb 19, 2024
1 parent 435e997 commit c47b15d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
output "specific_subnet_name" {
value = azurerm_subnet.subnet[*].name
value = try(azurerm_subnet.subnet[*].name, null)
description = "The name of the subnet."
}

output "specific_subnet_id" {
value = azurerm_subnet.subnet[*].id
value = try(azurerm_subnet.subnet[*].id, null)
description = "The name of the subnet."
}

output "specific_subnet_address_prefixes" {
value = try(azurerm_subnet.subnet[*].address_prefixes, null)
description = "The address prefixes for the subnet."
value = azurerm_subnet.subnet[*].address_prefixes
}

output "default_subnet_name" {
value = azurerm_subnet.subnet[*].name
value = try(azurerm_subnet.subnet[*].name, null)
description = "The name of the subnet."
}

output "default_subnet_id" {
value = try(azurerm_subnet.subnet[*].id, null)
description = "The subnet ID."
value = azurerm_subnet.subnet[*].id
}

output "default_subnet_address_prefixes" {
value = azurerm_subnet.subnet[*].address_prefixes
value = try(azurerm_subnet.subnet[*].address_prefixes, null)
description = "The address prefixes for the subnet."
}

output "nat_gateway_id" {
value = azurerm_nat_gateway.natgw[*].id
value = try(azurerm_nat_gateway.natgw[0].id, null)
description = "The ID of the NAT Gateway."
}

output "public_ip_address" {
value = azurerm_public_ip.pip[*].ip_address
value = try(azurerm_public_ip.pip[0].ip_address, null)
description = "The IP address value that was allocated."
}

output "public_ip_id" {
value = azurerm_public_ip.pip[*].id
value = try(azurerm_public_ip.pip[0].id, null)
description = " The ID of this Public IP."
}

output "route_table_id" {
value = var.enable && var.enable_route_table ? azurerm_route_table.rt[*].id : null
value = var.enable && var.enable_route_table ? azurerm_route_table.rt[0].id : null
description = "The Route Table ID."
}

Expand Down

0 comments on commit c47b15d

Please sign in to comment.