We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c1a540 commit f7001f3Copy full SHA for f7001f3
main.tf
@@ -21,8 +21,8 @@ resource "azurerm_subnet" "this" {
21
}
22
23
resource "azurerm_subnet_network_security_group_association" "this" {
24
- for_each = var.nsg_id
+ count = var.nsg_association_enabled ? 1 : 0
25
26
subnet_id = var.export_subnet_id == null ? azurerm_subnet.this[0].id : var.export_subnet_id
27
- network_security_group_id = each.value
+ network_security_group_id = each.nsg_id
28
0 commit comments