Skip to content

Commit 3d5cc9f

Browse files
authored
feat: add missing dns_cache output in non beta (terraform-google-modules#1864)
Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com>
1 parent c48c8ab commit 3d5cc9f

File tree

26 files changed

+69
-43
lines changed

26 files changed

+69
-43
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ module "gke" {
5050
network_policy = false
5151
horizontal_pod_autoscaling = true
5252
filestore_csi_driver = false
53+
dns_cache = false
5354
5455
node_pools = [
5556
{
@@ -242,6 +243,7 @@ Then perform the following commands on the root folder:
242243
|------|-------------|
243244
| ca\_certificate | Cluster ca certificate (base64 encoded) |
244245
| cluster\_id | Cluster ID |
246+
| dns\_cache\_enabled | Whether DNS Cache enabled |
245247
| endpoint | Cluster endpoint |
246248
| fleet\_membership | Fleet membership (if registered) |
247249
| gateway\_api\_channel | The gateway api channel of this cluster. |

autogen/main/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ module "gke" {
9090
{% if beta_cluster and autopilot_cluster != true %}
9191
istio = true
9292
cloudrun = true
93-
dns_cache = false
9493
{% endif %}
94+
dns_cache = false
9595
9696
{% if autopilot_cluster != true %}
9797
node_pools = [

autogen/main/main.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ locals {
232232
{% if beta_cluster %}
233233
# BETA features
234234
cluster_istio_enabled = ! local.cluster_output_istio_disabled
235-
cluster_dns_cache_enabled = var.dns_cache
236235
{% if autopilot_cluster != true %}
237236
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
238237
{% endif %}
@@ -242,6 +241,7 @@ locals {
242241
# /BETA features
243242
{% endif %}
244243

244+
cluster_dns_cache_enabled = var.dns_cache
245245
cluster_maintenance_window_is_recurring = var.maintenance_recurrence != "" && var.maintenance_end_time != "" ? [1] : []
246246
cluster_maintenance_window_is_daily = length(local.cluster_maintenance_window_is_recurring) > 0 ? [] : [1]
247247
}

autogen/main/outputs.tf.tmpl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,11 @@ output "peering_name" {
198198
value = local.cluster_peering_name
199199
}
200200
{% endif %}
201+
202+
output "dns_cache_enabled" {
203+
description = "Whether DNS Cache enabled"
204+
value = local.cluster_dns_cache_enabled
205+
}
201206
{% if beta_cluster %}
202207

203208
output "cloudrun_enabled" {
@@ -214,11 +219,6 @@ output "istio_enabled" {
214219
value = local.cluster_istio_enabled
215220
}
216221

217-
output "dns_cache_enabled" {
218-
description = "Whether DNS Cache enabled"
219-
value = local.cluster_dns_cache_enabled
220-
}
221-
222222
output "pod_security_policy_enabled" {
223223
description = "Whether pod security policy is enabled"
224224
value = local.cluster_pod_security_policy_enabled

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ locals {
171171
}] : []
172172

173173

174+
cluster_dns_cache_enabled = var.dns_cache
174175
cluster_maintenance_window_is_recurring = var.maintenance_recurrence != "" && var.maintenance_end_time != "" ? [1] : []
175176
cluster_maintenance_window_is_daily = length(local.cluster_maintenance_window_is_recurring) > 0 ? [] : [1]
176177
}

modules/beta-autopilot-private-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ module "gke" {
5454
enable_private_endpoint = true
5555
enable_private_nodes = true
5656
master_ipv4_cidr_block = "10.0.0.0/28"
57+
dns_cache = false
5758
5859
}
5960
```

modules/beta-autopilot-private-cluster/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@ locals {
127127

128128
# BETA features
129129
cluster_istio_enabled = !local.cluster_output_istio_disabled
130-
cluster_dns_cache_enabled = var.dns_cache
131130
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
132131
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
133132

134133
# /BETA features
135134

135+
cluster_dns_cache_enabled = var.dns_cache
136136
cluster_maintenance_window_is_recurring = var.maintenance_recurrence != "" && var.maintenance_end_time != "" ? [1] : []
137137
cluster_maintenance_window_is_daily = length(local.cluster_maintenance_window_is_recurring) > 0 ? [] : [1]
138138
}

modules/beta-autopilot-private-cluster/outputs.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,11 @@ output "peering_name" {
159159
value = local.cluster_peering_name
160160
}
161161

162+
output "dns_cache_enabled" {
163+
description = "Whether DNS Cache enabled"
164+
value = local.cluster_dns_cache_enabled
165+
}
166+
162167
output "cloudrun_enabled" {
163168
description = "Whether CloudRun enabled"
164169
value = false
@@ -169,11 +174,6 @@ output "istio_enabled" {
169174
value = local.cluster_istio_enabled
170175
}
171176

172-
output "dns_cache_enabled" {
173-
description = "Whether DNS Cache enabled"
174-
value = local.cluster_dns_cache_enabled
175-
}
176-
177177
output "pod_security_policy_enabled" {
178178
description = "Whether pod security policy is enabled"
179179
value = local.cluster_pod_security_policy_enabled

modules/beta-autopilot-public-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ module "gke" {
4848
ip_range_services = "us-central1-01-gke-01-services"
4949
horizontal_pod_autoscaling = true
5050
filestore_csi_driver = false
51+
dns_cache = false
5152
5253
}
5354
```

modules/beta-autopilot-public-cluster/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,12 @@ locals {
126126

127127
# BETA features
128128
cluster_istio_enabled = !local.cluster_output_istio_disabled
129-
cluster_dns_cache_enabled = var.dns_cache
130129
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
131130
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
132131

133132
# /BETA features
134133

134+
cluster_dns_cache_enabled = var.dns_cache
135135
cluster_maintenance_window_is_recurring = var.maintenance_recurrence != "" && var.maintenance_end_time != "" ? [1] : []
136136
cluster_maintenance_window_is_daily = length(local.cluster_maintenance_window_is_recurring) > 0 ? [] : [1]
137137
}

0 commit comments

Comments
 (0)