Skip to content

Commit

Permalink
feat: add missing dns_cache output in non beta (#1864)
Browse files Browse the repository at this point in the history
Signed-off-by: drfaust92 <[email protected]>
  • Loading branch information
DrFaust92 authored May 17, 2024
1 parent c48c8ab commit 3d5cc9f
Show file tree
Hide file tree
Showing 26 changed files with 69 additions and 43 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ module "gke" {
network_policy = false
horizontal_pod_autoscaling = true
filestore_csi_driver = false
dns_cache = false
node_pools = [
{
Expand Down Expand Up @@ -242,6 +243,7 @@ Then perform the following commands on the root folder:
|------|-------------|
| ca\_certificate | Cluster ca certificate (base64 encoded) |
| cluster\_id | Cluster ID |
| dns\_cache\_enabled | Whether DNS Cache enabled |
| endpoint | Cluster endpoint |
| fleet\_membership | Fleet membership (if registered) |
| gateway\_api\_channel | The gateway api channel of this cluster. |
Expand Down
2 changes: 1 addition & 1 deletion autogen/main/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ module "gke" {
{% if beta_cluster and autopilot_cluster != true %}
istio = true
cloudrun = true
dns_cache = false
{% endif %}
dns_cache = false
{% if autopilot_cluster != true %}
node_pools = [
Expand Down
2 changes: 1 addition & 1 deletion autogen/main/main.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ locals {
{% if beta_cluster %}
# BETA features
cluster_istio_enabled = ! local.cluster_output_istio_disabled
cluster_dns_cache_enabled = var.dns_cache
{% if autopilot_cluster != true %}
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
{% endif %}
Expand All @@ -242,6 +241,7 @@ locals {
# /BETA features
{% endif %}

cluster_dns_cache_enabled = var.dns_cache
cluster_maintenance_window_is_recurring = var.maintenance_recurrence != "" && var.maintenance_end_time != "" ? [1] : []
cluster_maintenance_window_is_daily = length(local.cluster_maintenance_window_is_recurring) > 0 ? [] : [1]
}
Expand Down
10 changes: 5 additions & 5 deletions autogen/main/outputs.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ output "peering_name" {
value = local.cluster_peering_name
}
{% endif %}

output "dns_cache_enabled" {
description = "Whether DNS Cache enabled"
value = local.cluster_dns_cache_enabled
}
{% if beta_cluster %}

output "cloudrun_enabled" {
Expand All @@ -214,11 +219,6 @@ output "istio_enabled" {
value = local.cluster_istio_enabled
}

output "dns_cache_enabled" {
description = "Whether DNS Cache enabled"
value = local.cluster_dns_cache_enabled
}

output "pod_security_policy_enabled" {
description = "Whether pod security policy is enabled"
value = local.cluster_pod_security_policy_enabled
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ locals {
}] : []


cluster_dns_cache_enabled = var.dns_cache
cluster_maintenance_window_is_recurring = var.maintenance_recurrence != "" && var.maintenance_end_time != "" ? [1] : []
cluster_maintenance_window_is_daily = length(local.cluster_maintenance_window_is_recurring) > 0 ? [] : [1]
}
Expand Down
1 change: 1 addition & 0 deletions modules/beta-autopilot-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ module "gke" {
enable_private_endpoint = true
enable_private_nodes = true
master_ipv4_cidr_block = "10.0.0.0/28"
dns_cache = false
}
```
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-autopilot-private-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ locals {

# BETA features
cluster_istio_enabled = !local.cluster_output_istio_disabled
cluster_dns_cache_enabled = var.dns_cache
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled

# /BETA features

cluster_dns_cache_enabled = var.dns_cache
cluster_maintenance_window_is_recurring = var.maintenance_recurrence != "" && var.maintenance_end_time != "" ? [1] : []
cluster_maintenance_window_is_daily = length(local.cluster_maintenance_window_is_recurring) > 0 ? [] : [1]
}
Expand Down
10 changes: 5 additions & 5 deletions modules/beta-autopilot-private-cluster/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ output "peering_name" {
value = local.cluster_peering_name
}

output "dns_cache_enabled" {
description = "Whether DNS Cache enabled"
value = local.cluster_dns_cache_enabled
}

output "cloudrun_enabled" {
description = "Whether CloudRun enabled"
value = false
Expand All @@ -169,11 +174,6 @@ output "istio_enabled" {
value = local.cluster_istio_enabled
}

output "dns_cache_enabled" {
description = "Whether DNS Cache enabled"
value = local.cluster_dns_cache_enabled
}

output "pod_security_policy_enabled" {
description = "Whether pod security policy is enabled"
value = local.cluster_pod_security_policy_enabled
Expand Down
1 change: 1 addition & 0 deletions modules/beta-autopilot-public-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ module "gke" {
ip_range_services = "us-central1-01-gke-01-services"
horizontal_pod_autoscaling = true
filestore_csi_driver = false
dns_cache = false
}
```
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-autopilot-public-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ locals {

# BETA features
cluster_istio_enabled = !local.cluster_output_istio_disabled
cluster_dns_cache_enabled = var.dns_cache
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled

# /BETA features

cluster_dns_cache_enabled = var.dns_cache
cluster_maintenance_window_is_recurring = var.maintenance_recurrence != "" && var.maintenance_end_time != "" ? [1] : []
cluster_maintenance_window_is_daily = length(local.cluster_maintenance_window_is_recurring) > 0 ? [] : [1]
}
Expand Down
10 changes: 5 additions & 5 deletions modules/beta-autopilot-public-cluster/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ output "tpu_ipv4_cidr_block" {



output "dns_cache_enabled" {
description = "Whether DNS Cache enabled"
value = local.cluster_dns_cache_enabled
}

output "cloudrun_enabled" {
description = "Whether CloudRun enabled"
value = false
Expand All @@ -159,11 +164,6 @@ output "istio_enabled" {
value = local.cluster_istio_enabled
}

output "dns_cache_enabled" {
description = "Whether DNS Cache enabled"
value = local.cluster_dns_cache_enabled
}

output "pod_security_policy_enabled" {
description = "Whether pod security policy is enabled"
value = local.cluster_pod_security_policy_enabled
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,13 @@ locals {

# BETA features
cluster_istio_enabled = !local.cluster_output_istio_disabled
cluster_dns_cache_enabled = var.dns_cache
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled

# /BETA features

cluster_dns_cache_enabled = var.dns_cache
cluster_maintenance_window_is_recurring = var.maintenance_recurrence != "" && var.maintenance_end_time != "" ? [1] : []
cluster_maintenance_window_is_daily = length(local.cluster_maintenance_window_is_recurring) > 0 ? [] : [1]
}
Expand Down
10 changes: 5 additions & 5 deletions modules/beta-private-cluster-update-variant/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ output "peering_name" {
value = local.cluster_peering_name
}

output "dns_cache_enabled" {
description = "Whether DNS Cache enabled"
value = local.cluster_dns_cache_enabled
}

output "cloudrun_enabled" {
description = "Whether CloudRun enabled"
value = local.cluster_cloudrun_enabled
Expand All @@ -195,11 +200,6 @@ output "istio_enabled" {
value = local.cluster_istio_enabled
}

output "dns_cache_enabled" {
description = "Whether DNS Cache enabled"
value = local.cluster_dns_cache_enabled
}

output "pod_security_policy_enabled" {
description = "Whether pod security policy is enabled"
value = local.cluster_pod_security_policy_enabled
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,13 @@ locals {

# BETA features
cluster_istio_enabled = !local.cluster_output_istio_disabled
cluster_dns_cache_enabled = var.dns_cache
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled

# /BETA features

cluster_dns_cache_enabled = var.dns_cache
cluster_maintenance_window_is_recurring = var.maintenance_recurrence != "" && var.maintenance_end_time != "" ? [1] : []
cluster_maintenance_window_is_daily = length(local.cluster_maintenance_window_is_recurring) > 0 ? [] : [1]
}
Expand Down
10 changes: 5 additions & 5 deletions modules/beta-private-cluster/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ output "peering_name" {
value = local.cluster_peering_name
}

output "dns_cache_enabled" {
description = "Whether DNS Cache enabled"
value = local.cluster_dns_cache_enabled
}

output "cloudrun_enabled" {
description = "Whether CloudRun enabled"
value = local.cluster_cloudrun_enabled
Expand All @@ -195,11 +200,6 @@ output "istio_enabled" {
value = local.cluster_istio_enabled
}

output "dns_cache_enabled" {
description = "Whether DNS Cache enabled"
value = local.cluster_dns_cache_enabled
}

output "pod_security_policy_enabled" {
description = "Whether pod security policy is enabled"
value = local.cluster_pod_security_policy_enabled
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,13 @@ locals {

# BETA features
cluster_istio_enabled = !local.cluster_output_istio_disabled
cluster_dns_cache_enabled = var.dns_cache
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled

# /BETA features

cluster_dns_cache_enabled = var.dns_cache
cluster_maintenance_window_is_recurring = var.maintenance_recurrence != "" && var.maintenance_end_time != "" ? [1] : []
cluster_maintenance_window_is_daily = length(local.cluster_maintenance_window_is_recurring) > 0 ? [] : [1]
}
Expand Down
10 changes: 5 additions & 5 deletions modules/beta-public-cluster-update-variant/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ output "mesh_certificates_config" {
}


output "dns_cache_enabled" {
description = "Whether DNS Cache enabled"
value = local.cluster_dns_cache_enabled
}

output "cloudrun_enabled" {
description = "Whether CloudRun enabled"
value = local.cluster_cloudrun_enabled
Expand All @@ -185,11 +190,6 @@ output "istio_enabled" {
value = local.cluster_istio_enabled
}

output "dns_cache_enabled" {
description = "Whether DNS Cache enabled"
value = local.cluster_dns_cache_enabled
}

output "pod_security_policy_enabled" {
description = "Whether pod security policy is enabled"
value = local.cluster_pod_security_policy_enabled
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,13 @@ locals {

# BETA features
cluster_istio_enabled = !local.cluster_output_istio_disabled
cluster_dns_cache_enabled = var.dns_cache
cluster_telemetry_type_is_set = var.cluster_telemetry_type != null
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled

# /BETA features

cluster_dns_cache_enabled = var.dns_cache
cluster_maintenance_window_is_recurring = var.maintenance_recurrence != "" && var.maintenance_end_time != "" ? [1] : []
cluster_maintenance_window_is_daily = length(local.cluster_maintenance_window_is_recurring) > 0 ? [] : [1]
}
Expand Down
10 changes: 5 additions & 5 deletions modules/beta-public-cluster/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ output "mesh_certificates_config" {
}


output "dns_cache_enabled" {
description = "Whether DNS Cache enabled"
value = local.cluster_dns_cache_enabled
}

output "cloudrun_enabled" {
description = "Whether CloudRun enabled"
value = local.cluster_cloudrun_enabled
Expand All @@ -185,11 +190,6 @@ output "istio_enabled" {
value = local.cluster_istio_enabled
}

output "dns_cache_enabled" {
description = "Whether DNS Cache enabled"
value = local.cluster_dns_cache_enabled
}

output "pod_security_policy_enabled" {
description = "Whether pod security policy is enabled"
value = local.cluster_pod_security_policy_enabled
Expand Down
2 changes: 2 additions & 0 deletions modules/private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ module "gke" {
enable_private_endpoint = true
enable_private_nodes = true
master_ipv4_cidr_block = "10.0.0.0/28"
dns_cache = false

node_pools = [
{
Expand Down Expand Up @@ -275,6 +276,7 @@ Then perform the following commands on the root folder:
|------|-------------|
| ca\_certificate | Cluster ca certificate (base64 encoded) |
| cluster\_id | Cluster ID |
| dns\_cache\_enabled | Whether DNS Cache enabled |
| endpoint | Cluster endpoint |
| fleet\_membership | Fleet membership (if registered) |
| gateway\_api\_channel | The gateway api channel of this cluster. |
Expand Down
1 change: 1 addition & 0 deletions modules/private-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ locals {
}] : []


cluster_dns_cache_enabled = var.dns_cache
cluster_maintenance_window_is_recurring = var.maintenance_recurrence != "" && var.maintenance_end_time != "" ? [1] : []
cluster_maintenance_window_is_daily = length(local.cluster_maintenance_window_is_recurring) > 0 ? [] : [1]
}
Expand Down
5 changes: 5 additions & 0 deletions modules/private-cluster-update-variant/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ output "peering_name" {
value = local.cluster_peering_name
}

output "dns_cache_enabled" {
description = "Whether DNS Cache enabled"
value = local.cluster_dns_cache_enabled
}

output "fleet_membership" {
description = "Fleet membership (if registered)"
value = local.fleet_membership
Expand Down
2 changes: 2 additions & 0 deletions modules/private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ module "gke" {
enable_private_endpoint = true
enable_private_nodes = true
master_ipv4_cidr_block = "10.0.0.0/28"
dns_cache = false

node_pools = [
{
Expand Down Expand Up @@ -253,6 +254,7 @@ Then perform the following commands on the root folder:
|------|-------------|
| ca\_certificate | Cluster ca certificate (base64 encoded) |
| cluster\_id | Cluster ID |
| dns\_cache\_enabled | Whether DNS Cache enabled |
| endpoint | Cluster endpoint |
| fleet\_membership | Fleet membership (if registered) |
| gateway\_api\_channel | The gateway api channel of this cluster. |
Expand Down
1 change: 1 addition & 0 deletions modules/private-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ locals {
}] : []


cluster_dns_cache_enabled = var.dns_cache
cluster_maintenance_window_is_recurring = var.maintenance_recurrence != "" && var.maintenance_end_time != "" ? [1] : []
cluster_maintenance_window_is_daily = length(local.cluster_maintenance_window_is_recurring) > 0 ? [] : [1]
}
Expand Down
5 changes: 5 additions & 0 deletions modules/private-cluster/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ output "peering_name" {
value = local.cluster_peering_name
}

output "dns_cache_enabled" {
description = "Whether DNS Cache enabled"
value = local.cluster_dns_cache_enabled
}

output "fleet_membership" {
description = "Fleet membership (if registered)"
value = local.fleet_membership
Expand Down
Loading

0 comments on commit 3d5cc9f

Please sign in to comment.