File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -48,10 +48,13 @@ resource "azurerm_kubernetes_cluster" "k8s" {
48
48
network_plugin = " azure"
49
49
network_policy = var. network_policy
50
50
load_balancer_sku = length (var. node_pools ) > 0 ? " Standard" : var. load_balancer_sku
51
- load_balancer_profile {
52
- outbound_ip_address_ids = azurerm_public_ip. public-ip-outbound [* ]. id
53
- outbound_ports_allocated = var. outbound_ports_allocated
54
- idle_timeout_in_minutes = var. idle_timeout
51
+ dynamic load_balancer_profile {
52
+ for_each = azurerm_public_ip. public-ip-outbound
53
+ content {
54
+ outbound_ip_address_ids = azurerm_public_ip. public-ip-outbound [* ]. id
55
+ outbound_ports_allocated = var. outbound_ports_allocated
56
+ idle_timeout_in_minutes = var. idle_timeout
57
+ }
55
58
}
56
59
}
57
60
@@ -88,4 +91,4 @@ resource "azurerm_public_ip" "public-ip-outbound" {
88
91
location = var. location
89
92
resource_group_name = var. resource_group
90
93
sku = " Standard"
91
- }
94
+ }
Original file line number Diff line number Diff line change @@ -129,10 +129,10 @@ variable "static_outbound_ip_count" {
129
129
bottlenecks. Recommended in that case is to set the count at least +5 more than the count of kubernetes nodes.
130
130
EOF
131
131
validation {
132
- condition = var. static_outbound_ip_count >= 1 && var. static_outbound_ip_count <= 100
133
- error_message = " Static_outbound_ip_count has to be between 1 and 100 including."
132
+ condition = var. static_outbound_ip_count >= 0 && var. static_outbound_ip_count <= 100
133
+ error_message = " Static_outbound_ip_count has to be between 0 and 100 including."
134
134
}
135
- default = 1
135
+ default = 0
136
136
}
137
137
138
138
variable "outbound_ports_allocated" {
You can’t perform that action at this time.
0 commit comments