Skip to content

Commit 79b1268

Browse files
committed
Updating code using autogen
1 parent 1f6e0bb commit 79b1268

File tree

8 files changed

+18
-18
lines changed

8 files changed

+18
-18
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Extending the adopted spec, each change should have a link to its corresponding
1010

1111
## [v1.0.0] - 2019-03-25
1212
### Added
13+
* Fix empty zone list. [#132]
1314
* Allow creation of service accounts. [#80]
1415
* Add support for private clusters via submodule. [#69]
1516
* Add `remove_default_node_pool` set to `false` by default. Fixes [#15]. [#55]
@@ -72,6 +73,7 @@ Extending the adopted spec, each change should have a link to its corresponding
7273
[#42]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/42
7374
[#15]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/15
7475

76+
[#132]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/132
7577
[#109]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/109
7678
[#108]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/108
7779
[#106]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/106

autogen/cluster_regional.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ resource "google_container_cluster" "primary" {
2727
project = "${var.project_id}"
2828

2929
region = "${var.region}"
30-
additional_zones = ["${coalescelist(compact(var.zones), sort(random_shuffle.available_zones.result))}"]
30+
node_locations = ["${coalescelist(compact(var.zones), sort(random_shuffle.available_zones.result))}"]
3131

3232
network = "${replace(data.google_compute_network.gke_network.self_link, "https://www.googleapis.com/compute/v1/", "")}"
3333
subnetwork = "${replace(data.google_compute_subnetwork.gke_subnetwork.self_link, "https://www.googleapis.com/compute/v1/", "")}"

autogen/cluster_zonal.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ resource "google_container_cluster" "zonal_primary" {
2727
project = "${var.project_id}"
2828

2929
zone = "${var.zones[0]}"
30-
additional_zones = ["${slice(var.zones,1,length(var.zones))}"]
30+
node_locations = ["${slice(var.zones,1,length(var.zones))}"]
3131

3232
network = "${replace(data.google_compute_network.gke_network.self_link, "https://www.googleapis.com/compute/v1/", "")}"
3333
subnetwork = "${replace(data.google_compute_subnetwork.gke_subnetwork.self_link, "https://www.googleapis.com/compute/v1/", "")}"

autogen/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ locals {
5555
zonal = "${var.region}"
5656
}
5757

58-
cluster_type_output_regional_zones = "${concat(google_container_cluster.primary.*.additional_zones, list(list()))}"
59-
cluster_type_output_zonal_zones = "${concat(slice(var.zones,1,length(var.zones)), list(list()))}"
58+
cluster_type_output_regional_zones = "${flatten(google_container_cluster.primary.*.node_locations)}"
59+
cluster_type_output_zonal_zones = "${slice(var.zones, 1, length(var.zones))}"
6060

6161
cluster_type_output_zones = {
62-
regional = "${local.cluster_type_output_regional_zones[0]}"
63-
zonal = "${concat(google_container_cluster.zonal_primary.*.zone, local.cluster_type_output_zonal_zones[0])}"
62+
regional = "${local.cluster_type_output_regional_zones}"
63+
zonal = "${concat(google_container_cluster.zonal_primary.*.zone, local.cluster_type_output_zonal_zones)}"
6464
}
6565

6666
cluster_type_output_endpoint = {

cluster_regional.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ 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

3232
network = "${replace(data.google_compute_network.gke_network.self_link, "https://www.googleapis.com/compute/v1/", "")}"
3333
subnetwork = "${replace(data.google_compute_subnetwork.gke_subnetwork.self_link, "https://www.googleapis.com/compute/v1/", "")}"

cluster_zonal.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ 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

3232
network = "${replace(data.google_compute_network.gke_network.self_link, "https://www.googleapis.com/compute/v1/", "")}"
3333
subnetwork = "${replace(data.google_compute_subnetwork.gke_subnetwork.self_link, "https://www.googleapis.com/compute/v1/", "")}"

main.tf

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ data "google_container_engine_versions" "zone" {
161161
//
162162
// data.google_container_engine_versions.zone: Cannot determine zone: set in this resource, or set provider-level zone.
163163
//
164-
zone = "${var.zones[0] == "" ? data.google_compute_zones.available.names[0] : var.zones[0]}"
165-
166-
project = "${var.project_id}"
167-
}
164+
zone = "${var.zones[0] == "" ? data.google_compute_zones.available.names[0] : var.zones[0]}"
165+
project = "${var.project_id}"
166+
}

modules/private-cluster/main.tf

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ data "google_container_engine_versions" "zone" {
161161
//
162162
// data.google_container_engine_versions.zone: Cannot determine zone: set in this resource, or set provider-level zone.
163163
//
164-
zone = "${var.zones[0] == "" ? data.google_compute_zones.available.names[0] : var.zones[0]}"
165-
166-
project = "${var.project_id}"
167-
}
164+
zone = "${var.zones[0] == "" ? data.google_compute_zones.available.names[0] : var.zones[0]}"
165+
project = "${var.project_id}"
166+
}

0 commit comments

Comments
 (0)