Skip to content

Commit 3d5cc9f

Browse files
authored
feat: add missing dns_cache output in non beta (#1864)
Signed-off-by: drfaust92 <[email protected]>
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
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ output "tpu_ipv4_cidr_block" {
149149

150150

151151

152+
output "dns_cache_enabled" {
153+
description = "Whether DNS Cache enabled"
154+
value = local.cluster_dns_cache_enabled
155+
}
156+
152157
output "cloudrun_enabled" {
153158
description = "Whether CloudRun enabled"
154159
value = false
@@ -159,11 +164,6 @@ output "istio_enabled" {
159164
value = local.cluster_istio_enabled
160165
}
161166

162-
output "dns_cache_enabled" {
163-
description = "Whether DNS Cache enabled"
164-
value = local.cluster_dns_cache_enabled
165-
}
166-
167167
output "pod_security_policy_enabled" {
168168
description = "Whether pod security policy is enabled"
169169
value = local.cluster_pod_security_policy_enabled

modules/beta-private-cluster-update-variant/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,13 @@ locals {
191191

192192
# BETA features
193193
cluster_istio_enabled = !local.cluster_output_istio_disabled
194-
cluster_dns_cache_enabled = var.dns_cache
195194
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
196195
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
197196
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
198197

199198
# /BETA features
200199

200+
cluster_dns_cache_enabled = var.dns_cache
201201
cluster_maintenance_window_is_recurring = var.maintenance_recurrence != "" && var.maintenance_end_time != "" ? [1] : []
202202
cluster_maintenance_window_is_daily = length(local.cluster_maintenance_window_is_recurring) > 0 ? [] : [1]
203203
}

modules/beta-private-cluster-update-variant/outputs.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ output "peering_name" {
185185
value = local.cluster_peering_name
186186
}
187187

188+
output "dns_cache_enabled" {
189+
description = "Whether DNS Cache enabled"
190+
value = local.cluster_dns_cache_enabled
191+
}
192+
188193
output "cloudrun_enabled" {
189194
description = "Whether CloudRun enabled"
190195
value = local.cluster_cloudrun_enabled
@@ -195,11 +200,6 @@ output "istio_enabled" {
195200
value = local.cluster_istio_enabled
196201
}
197202

198-
output "dns_cache_enabled" {
199-
description = "Whether DNS Cache enabled"
200-
value = local.cluster_dns_cache_enabled
201-
}
202-
203203
output "pod_security_policy_enabled" {
204204
description = "Whether pod security policy is enabled"
205205
value = local.cluster_pod_security_policy_enabled

modules/beta-private-cluster/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,13 @@ locals {
191191

192192
# BETA features
193193
cluster_istio_enabled = !local.cluster_output_istio_disabled
194-
cluster_dns_cache_enabled = var.dns_cache
195194
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
196195
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
197196
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
198197

199198
# /BETA features
200199

200+
cluster_dns_cache_enabled = var.dns_cache
201201
cluster_maintenance_window_is_recurring = var.maintenance_recurrence != "" && var.maintenance_end_time != "" ? [1] : []
202202
cluster_maintenance_window_is_daily = length(local.cluster_maintenance_window_is_recurring) > 0 ? [] : [1]
203203
}

modules/beta-private-cluster/outputs.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ output "peering_name" {
185185
value = local.cluster_peering_name
186186
}
187187

188+
output "dns_cache_enabled" {
189+
description = "Whether DNS Cache enabled"
190+
value = local.cluster_dns_cache_enabled
191+
}
192+
188193
output "cloudrun_enabled" {
189194
description = "Whether CloudRun enabled"
190195
value = local.cluster_cloudrun_enabled
@@ -195,11 +200,6 @@ output "istio_enabled" {
195200
value = local.cluster_istio_enabled
196201
}
197202

198-
output "dns_cache_enabled" {
199-
description = "Whether DNS Cache enabled"
200-
value = local.cluster_dns_cache_enabled
201-
}
202-
203203
output "pod_security_policy_enabled" {
204204
description = "Whether pod security policy is enabled"
205205
value = local.cluster_pod_security_policy_enabled

modules/beta-public-cluster-update-variant/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,13 @@ locals {
190190

191191
# BETA features
192192
cluster_istio_enabled = !local.cluster_output_istio_disabled
193-
cluster_dns_cache_enabled = var.dns_cache
194193
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
195194
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
196195
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
197196

198197
# /BETA features
199198

199+
cluster_dns_cache_enabled = var.dns_cache
200200
cluster_maintenance_window_is_recurring = var.maintenance_recurrence != "" && var.maintenance_end_time != "" ? [1] : []
201201
cluster_maintenance_window_is_daily = length(local.cluster_maintenance_window_is_recurring) > 0 ? [] : [1]
202202
}

modules/beta-public-cluster-update-variant/outputs.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ output "mesh_certificates_config" {
175175
}
176176

177177

178+
output "dns_cache_enabled" {
179+
description = "Whether DNS Cache enabled"
180+
value = local.cluster_dns_cache_enabled
181+
}
182+
178183
output "cloudrun_enabled" {
179184
description = "Whether CloudRun enabled"
180185
value = local.cluster_cloudrun_enabled
@@ -185,11 +190,6 @@ output "istio_enabled" {
185190
value = local.cluster_istio_enabled
186191
}
187192

188-
output "dns_cache_enabled" {
189-
description = "Whether DNS Cache enabled"
190-
value = local.cluster_dns_cache_enabled
191-
}
192-
193193
output "pod_security_policy_enabled" {
194194
description = "Whether pod security policy is enabled"
195195
value = local.cluster_pod_security_policy_enabled

modules/beta-public-cluster/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,13 @@ locals {
190190

191191
# BETA features
192192
cluster_istio_enabled = !local.cluster_output_istio_disabled
193-
cluster_dns_cache_enabled = var.dns_cache
194193
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
195194
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
196195
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
197196

198197
# /BETA features
199198

199+
cluster_dns_cache_enabled = var.dns_cache
200200
cluster_maintenance_window_is_recurring = var.maintenance_recurrence != "" && var.maintenance_end_time != "" ? [1] : []
201201
cluster_maintenance_window_is_daily = length(local.cluster_maintenance_window_is_recurring) > 0 ? [] : [1]
202202
}

modules/beta-public-cluster/outputs.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ output "mesh_certificates_config" {
175175
}
176176

177177

178+
output "dns_cache_enabled" {
179+
description = "Whether DNS Cache enabled"
180+
value = local.cluster_dns_cache_enabled
181+
}
182+
178183
output "cloudrun_enabled" {
179184
description = "Whether CloudRun enabled"
180185
value = local.cluster_cloudrun_enabled
@@ -185,11 +190,6 @@ output "istio_enabled" {
185190
value = local.cluster_istio_enabled
186191
}
187192

188-
output "dns_cache_enabled" {
189-
description = "Whether DNS Cache enabled"
190-
value = local.cluster_dns_cache_enabled
191-
}
192-
193193
output "pod_security_policy_enabled" {
194194
description = "Whether pod security policy is enabled"
195195
value = local.cluster_pod_security_policy_enabled

modules/private-cluster-update-variant/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ module "gke" {
7878
enable_private_endpoint = true
7979
enable_private_nodes = true
8080
master_ipv4_cidr_block = "10.0.0.0/28"
81+
dns_cache = false
8182
8283
node_pools = [
8384
{
@@ -275,6 +276,7 @@ Then perform the following commands on the root folder:
275276
|------|-------------|
276277
| ca\_certificate | Cluster ca certificate (base64 encoded) |
277278
| cluster\_id | Cluster ID |
279+
| dns\_cache\_enabled | Whether DNS Cache enabled |
278280
| endpoint | Cluster endpoint |
279281
| fleet\_membership | Fleet membership (if registered) |
280282
| gateway\_api\_channel | The gateway api channel of this cluster. |

modules/private-cluster-update-variant/main.tf

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

174174

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

modules/private-cluster-update-variant/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ output "peering_name" {
185185
value = local.cluster_peering_name
186186
}
187187

188+
output "dns_cache_enabled" {
189+
description = "Whether DNS Cache enabled"
190+
value = local.cluster_dns_cache_enabled
191+
}
192+
188193
output "fleet_membership" {
189194
description = "Fleet membership (if registered)"
190195
value = local.fleet_membership

modules/private-cluster/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ module "gke" {
5656
enable_private_endpoint = true
5757
enable_private_nodes = true
5858
master_ipv4_cidr_block = "10.0.0.0/28"
59+
dns_cache = false
5960
6061
node_pools = [
6162
{
@@ -253,6 +254,7 @@ Then perform the following commands on the root folder:
253254
|------|-------------|
254255
| ca\_certificate | Cluster ca certificate (base64 encoded) |
255256
| cluster\_id | Cluster ID |
257+
| dns\_cache\_enabled | Whether DNS Cache enabled |
256258
| endpoint | Cluster endpoint |
257259
| fleet\_membership | Fleet membership (if registered) |
258260
| gateway\_api\_channel | The gateway api channel of this cluster. |

modules/private-cluster/main.tf

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

174174

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

modules/private-cluster/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ output "peering_name" {
185185
value = local.cluster_peering_name
186186
}
187187

188+
output "dns_cache_enabled" {
189+
description = "Whether DNS Cache enabled"
190+
value = local.cluster_dns_cache_enabled
191+
}
192+
188193
output "fleet_membership" {
189194
description = "Fleet membership (if registered)"
190195
value = local.fleet_membership

0 commit comments

Comments
 (0)