Skip to content

Commit 967a7ab

Browse files
authored
Merge pull request #173 from wso2/update-public-ip-zones-1
Add configurable public_ip_zones variable for Public IP availability zones
2 parents 6f3bc76 + c3bad7b commit 967a7ab

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

modules/azurerm/Firewall-Multiple-PIP/public_ip.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ resource "azurerm_public_ip_prefix" "public_ip_prefix_fw" {
1414
location = var.location
1515
resource_group_name = var.resource_group_name
1616
prefix_length = var.public_ip_prefix_length
17-
zones = [1, 2, 3]
17+
zones = var.zones
1818
tags = var.tags
1919
}
2020

@@ -26,7 +26,7 @@ resource "azurerm_public_ip" "firewall_public_ip" {
2626
allocation_method = "Static"
2727
sku = "Standard"
2828
public_ip_prefix_id = null == var.dynamic_nat_rules[each.key].public_ip_prefix_id ? azurerm_public_ip_prefix.public_ip_prefix_fw.id : var.dynamic_nat_rules[each.key].public_ip_prefix_id
29-
zones = [1, 2, 3]
29+
zones = var.zones
3030
tags = var.tags
3131
depends_on = [
3232
azurerm_public_ip_prefix.public_ip_prefix_fw

modules/azurerm/Firewall-Multiple-PIP/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,9 @@ variable "private_endpoint_network_policies" {
139139
description = "Enable or Disable network policies for the private endpoint on the subnet. Possible values are Disabled, Enabled, NetworkSecurityGroupEnabled and RouteTableEnabled"
140140
type = string
141141
}
142+
143+
variable "zones" {
144+
default = [1, 2, 3]
145+
description = "A collection containing the availability zone to allocate the Public IP in"
146+
type = list(number)
147+
}

0 commit comments

Comments
 (0)