Skip to content

Commit

Permalink
fix:change in count condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Rupalgw committed Feb 15, 2024
1 parent 169836f commit fd23dcd
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
output "specific_subnet_name" {
value = azurerm_subnet.subnet[*].name
value = try(azurerm_subnet.subnet[0].name, null)
description = "The name of the subnet."
}

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

output "specific_subnet_address_prefixes" {
value = try(azurerm_subnet.subnet[0].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[0].name, null)
description = "The name of the subnet."
}

output "default_subnet_id" {
value = try(azurerm_subnet.subnet[0].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[0].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 = try(var.enable && var.enable_route_table ? azurerm_route_table.rt[*].id : null, null)
description = "The Route Table ID."
}

output "route_table_associated_subnets" {
value = var.enable && var.enable_route_table ? azurerm_route_table.rt[*].subnets : null
value = try(var.enable && var.enable_route_table ? azurerm_route_table.rt[*].subnets : null, null)
description = "The collection of Subnets associated with this route table."
}

0 comments on commit fd23dcd

Please sign in to comment.