Skip to content

Commit

Permalink
add missing dns_cache output in non beta
Browse files Browse the repository at this point in the history
Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com>
  • Loading branch information
DrFaust92 committed Feb 2, 2024
1 parent 5a407bc commit 3f53971
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 @@ -238,6 +239,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 |
| gateway\_api\_channel | The gateway api channel of this cluster. |
| horizontal\_pod\_autoscaling\_enabled | Whether horizontal pod autoscaling enabled |
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 @@ -229,7 +229,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 @@ -239,6 +238,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 @@ -168,6 +168,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 @@ -125,12 +125,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 @@ -124,12 +124,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 @@ -188,13 +188,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 @@ -188,13 +188,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 @@ -187,13 +187,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 @@ -187,13 +187,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 @@ -271,6 +272,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 |
| gateway\_api\_channel | The gateway api channel of this cluster. |
| horizontal\_pod\_autoscaling\_enabled | Whether horizontal pod autoscaling enabled |
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 @@ -169,6 +169,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 @@ -184,3 +184,8 @@ output "peering_name" {
description = "The name of the peering between this cluster and the Google owned VPC."
value = local.cluster_peering_name
}

output "dns_cache_enabled" {
description = "Whether DNS Cache enabled"
value = local.cluster_dns_cache_enabled
}
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 @@ -249,6 +250,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 |
| gateway\_api\_channel | The gateway api channel of this cluster. |
| horizontal\_pod\_autoscaling\_enabled | Whether horizontal pod autoscaling enabled |
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 @@ -169,6 +169,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 @@ -184,3 +184,8 @@ output "peering_name" {
description = "The name of the peering between this cluster and the Google owned VPC."
value = local.cluster_peering_name
}

output "dns_cache_enabled" {
description = "Whether DNS Cache enabled"
value = local.cluster_dns_cache_enabled
}
5 changes: 5 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,8 @@ output "mesh_certificates_config" {
]
}


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

0 comments on commit 3f53971

Please sign in to comment.