Skip to content

Commit a9613ef

Browse files
committed
Fix autogen formatting
1 parent 6bc917c commit a9613ef

File tree

5 files changed

+28
-24
lines changed

5 files changed

+28
-24
lines changed

autogen/cluster_regional.tf

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ resource "google_container_cluster" "primary" {
2626
description = "${var.description}"
2727
project = "${var.project_id}"
2828

29-
region = "${var.region}"
30-
node_locations = ["${coalescelist(compact(var.zones), sort(random_shuffle.available_zones.result))}"]
29+
region = "${var.region}"
30+
node_locations = ["${coalescelist(compact(var.zones), sort(random_shuffle.available_zones.result))}"]
3131
cluster_ipv4_cidr = "${var.cluster_ipv4_cidr}"
32-
network = "${replace(data.google_compute_network.gke_network.self_link, "https://www.googleapis.com/compute/v1/", "")}"
32+
network = "${replace(data.google_compute_network.gke_network.self_link, "https://www.googleapis.com/compute/v1/", "")}"
3333

3434
network_policy {
3535
enabled = "${var.network_policy}"
@@ -74,6 +74,7 @@ resource "google_container_cluster" "primary" {
7474
disabled = "${var.network_policy ? 0 : 1}"
7575
}
7676
{% if beta_cluster %}
77+
7778
istio_config {
7879
disabled = "${var.istio ? 0 : 1}"
7980
}
@@ -114,12 +115,14 @@ resource "google_container_cluster" "primary" {
114115
}
115116
}
116117
{% if private_cluster %}
118+
117119
private_cluster_config {
118120
enable_private_endpoint = "${var.enable_private_endpoint}"
119121
enable_private_nodes = "${var.enable_private_nodes}"
120122
master_ipv4_cidr_block = "${var.master_ipv4_cidr_block}"
121123
}
122124
{% endif %}
125+
123126
remove_default_node_pool = "${var.remove_default_node_pool}"
124127
{% if beta_cluster %}
125128
database_encryption = ["${var.database_encryption}"]

autogen/cluster_zonal.tf

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ resource "google_container_cluster" "zonal_primary" {
2626
description = "${var.description}"
2727
project = "${var.project_id}"
2828

29-
zone = "${var.zones[0]}"
30-
node_locations = ["${slice(var.zones,1,length(var.zones))}"]
29+
zone = "${var.zones[0]}"
30+
node_locations = ["${slice(var.zones,1,length(var.zones))}"]
3131
cluster_ipv4_cidr = "${var.cluster_ipv4_cidr}"
32-
network = "${replace(data.google_compute_network.gke_network.self_link, "https://www.googleapis.com/compute/v1/", "")}"
32+
network = "${replace(data.google_compute_network.gke_network.self_link, "https://www.googleapis.com/compute/v1/", "")}"
3333

3434
network_policy {
3535
enabled = "${var.network_policy}"
@@ -74,6 +74,7 @@ resource "google_container_cluster" "zonal_primary" {
7474
disabled = "${var.network_policy ? 0 : 1}"
7575
}
7676
{% if beta_cluster %}
77+
7778
istio_config {
7879
disabled = "${var.istio ? 0 : 1}"
7980
}
@@ -114,12 +115,14 @@ resource "google_container_cluster" "zonal_primary" {
114115
}
115116
}
116117
{% if private_cluster %}
118+
117119
private_cluster_config {
118120
enable_private_endpoint = "${var.enable_private_endpoint}"
119121
enable_private_nodes = "${var.enable_private_nodes}"
120122
master_ipv4_cidr_block = "${var.master_ipv4_cidr_block}"
121123
}
122124
{% endif %}
125+
123126
remove_default_node_pool = "${var.remove_default_node_pool}"
124127
{% if beta_cluster %}
125128
database_encryption = ["${var.database_encryption}"]

autogen/main.tf

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -163,21 +163,19 @@ locals {
163163
cluster_master_auth_list_layer1 = "${local.cluster_type_output_master_auth[local.cluster_type]}"
164164
cluster_master_auth_list_layer2 = "${local.cluster_master_auth_list_layer1[0]}"
165165
cluster_master_auth_map = "${local.cluster_master_auth_list_layer2[0]}"
166-
167166
# cluster locals
168-
cluster_name = "${local.cluster_type_output_name[local.cluster_type]}"
169-
cluster_location = "${local.cluster_type_output_location[local.cluster_type]}"
170-
cluster_region = "${local.cluster_type_output_region[local.cluster_type]}"
171-
cluster_zones = "${sort(local.cluster_type_output_zones[local.cluster_type])}"
172-
cluster_endpoint = "${local.cluster_type_output_endpoint[local.cluster_type]}"
173-
cluster_ca_certificate = "${lookup(local.cluster_master_auth_map, "cluster_ca_certificate")}"
174-
cluster_master_version = "${local.cluster_type_output_master_version[local.cluster_type]}"
175-
cluster_min_master_version = "${local.cluster_type_output_min_master_version[local.cluster_type]}"
176-
cluster_logging_service = "${local.cluster_type_output_logging_service[local.cluster_type]}"
177-
cluster_monitoring_service = "${local.cluster_type_output_monitoring_service[local.cluster_type]}"
178-
cluster_node_pools_names = "${local.cluster_type_output_node_pools_names[local.cluster_type]}"
179-
cluster_node_pools_versions = "${local.cluster_type_output_node_pools_versions[local.cluster_type]}"
180-
167+
cluster_name = "${local.cluster_type_output_name[local.cluster_type]}"
168+
cluster_location = "${local.cluster_type_output_location[local.cluster_type]}"
169+
cluster_region = "${local.cluster_type_output_region[local.cluster_type]}"
170+
cluster_zones = "${sort(local.cluster_type_output_zones[local.cluster_type])}"
171+
cluster_endpoint = "${local.cluster_type_output_endpoint[local.cluster_type]}"
172+
cluster_ca_certificate = "${lookup(local.cluster_master_auth_map, "cluster_ca_certificate")}"
173+
cluster_master_version = "${local.cluster_type_output_master_version[local.cluster_type]}"
174+
cluster_min_master_version = "${local.cluster_type_output_min_master_version[local.cluster_type]}"
175+
cluster_logging_service = "${local.cluster_type_output_logging_service[local.cluster_type]}"
176+
cluster_monitoring_service = "${local.cluster_type_output_monitoring_service[local.cluster_type]}"
177+
cluster_node_pools_names = "${local.cluster_type_output_node_pools_names[local.cluster_type]}"
178+
cluster_node_pools_versions = "${local.cluster_type_output_node_pools_versions[local.cluster_type]}"
181179
cluster_network_policy_enabled = "${local.cluster_type_output_network_policy_enabled[local.cluster_type] ? false : true}"
182180
cluster_http_load_balancing_enabled = "${local.cluster_type_output_http_load_balancing_enabled[local.cluster_type] ? false : true}"
183181
cluster_horizontal_pod_autoscaling_enabled = "${local.cluster_type_output_horizontal_pod_autoscaling_enabled[local.cluster_type] ? false : true}"

autogen/outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ output "service_account" {
112112
description = "The service account to default running nodes as if not overridden in `node_pools`."
113113
value = "${local.service_account}"
114114
}
115-
116115
{% if beta_cluster %}
116+
117117
output "istio_enabled" {
118118
description = "Whether Istio is enabled"
119119
value = "${local.cluster_istio_enabled}"
@@ -124,8 +124,8 @@ output "cloudrun_enabled" {
124124
value = "${local.cluster_cloudrun_enabled}"
125125
}
126126
{% endif %}
127-
128127
{% if private_cluster %}
128+
129129
output "pod_security_policy_enabled" {
130130
description = "Whether pod security policy is enabled"
131131
value = "${local.cluster_pod_security_policy_enabled}"

autogen/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ variable "service_account" {
251251
description = "The service account to run nodes as if not overridden in `node_pools`. The default value will cause a cluster-specific service account to be created."
252252
default = "create"
253253
}
254-
255254
{% if private_cluster %}
255+
256256
variable "deploy_using_private_endpoint" {
257257
description = "(Beta) A toggle for Terraform and kubectl to connect to the master's internal IP address during deployment."
258258
default = "false"
@@ -273,8 +273,8 @@ variable "master_ipv4_cidr_block" {
273273
default = "10.0.0.0/28"
274274
}
275275
{% endif %}
276-
277276
{% if beta_cluster %}
277+
278278
variable "istio" {
279279
description = "(Beta) Enable Istio addon"
280280
default = false

0 commit comments

Comments
 (0)