Skip to content

Commit

Permalink
fix: Workaround for terraform-providers/terraform-providers-azurerm#1…
Browse files Browse the repository at this point in the history
…1590
  • Loading branch information
dploeger committed May 5, 2021
1 parent 8054843 commit c3f7e93
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion firewall.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@ resource "azurerm_network_security_group" "network-security-group" {
resource_group_name = var.resource_group
}

locals {
subnet_id = replace(
replace(lower(azurerm_subnet.default-subnet.id), "microsoft.network/virtualnetworks", "Microsoft.Network/virtualNetworks"),
"resourcegroups",
"resourceGroups"
)
}

resource "azurerm_subnet_network_security_group_association" "network-security-group-association" {
network_security_group_id = azurerm_network_security_group.network-security-group.id
subnet_id = azurerm_subnet.default-subnet.id
subnet_id = local.subnet_id
}

resource "azurerm_network_security_rule" "network-security-rules-inbound" {
Expand Down

0 comments on commit c3f7e93

Please sign in to comment.