Skip to content

Commit

Permalink
fiw when no bastion is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
xpillons committed Mar 29, 2024
1 parent f8e5a65 commit 7567a04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tf/network_security_group.tf
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ resource "azurerm_subnet_network_security_group_association" "netapp" {
}

resource "azurerm_subnet_network_security_group_association" "bastion" {
count = local.create_nsg ? 1 : 0
count = local.create_nsg ? (local.no_bastion_subnet ? 0 : 1) : 0
subnet_id = local.create_bastion_subnet ? azurerm_subnet.bastion[0].id : data.azurerm_subnet.bastion[0].id
network_security_group_id = azurerm_network_security_group.common[0].id
}
Expand Down

0 comments on commit 7567a04

Please sign in to comment.