Skip to content

Commit b0434c0

Browse files
committed
fix: Use subnets
1 parent 81022a3 commit b0434c0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

firewall.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ resource "azurerm_mysql_firewall_rule" "firewall" {
88
}
99

1010
resource "azurerm_mysql_virtual_network_rule" "virtualnetworks" {
11-
for_each = var.virtual_networks
11+
for_each = var.subnets
1212
name = "${var.project}${var.stage}dbfwnet${each.key}"
1313
resource_group_name = var.resource_group
1414
server_name = azurerm_mysql_server.server.name

vars.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ variable "allowed_ips" {
8686
default = {}
8787
}
8888

89-
variable "virtual_networks" {
89+
variable "subnets" {
9090
type = map(string)
91-
description = "Maps of prefix => virtual network id that has access to the server"
91+
description = "Maps of prefix => subnet id that has access to the server"
9292
default = {}
9393
}

0 commit comments

Comments
 (0)