Skip to content

Commit

Permalink
Merge pull request #77 from JordanP/implicit_depends_on
Browse files Browse the repository at this point in the history
Node pool create: add an implicit dependency on parent cluster
  • Loading branch information
morgante committed Mar 27, 2019
2 parents 2a39908 + 1b7276d commit a9df188
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
4 changes: 1 addition & 3 deletions autogen/cluster_regional.tf
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ resource "google_container_node_pool" "pools" {
name = "${lookup(var.node_pools[count.index], "name")}"
project = "${var.project_id}"
region = "${var.region}"
cluster = "${var.name}"
cluster = "${google_container_cluster.primary.name}"
version = "${lookup(var.node_pools[count.index], "auto_upgrade", false) ? "" : lookup(var.node_pools[count.index], "version", local.node_version_regional)}"
initial_node_count = "${lookup(var.node_pools[count.index], "initial_node_count", lookup(var.node_pools[count.index], "min_count", 1))}"

Expand Down Expand Up @@ -144,8 +144,6 @@ resource "google_container_node_pool" "pools" {
update = "30m"
delete = "30m"
}

depends_on = ["google_container_cluster.primary"]
}

resource "null_resource" "wait_for_regional_cluster" {
Expand Down
4 changes: 1 addition & 3 deletions autogen/cluster_zonal.tf
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ resource "google_container_node_pool" "zonal_pools" {
name = "${lookup(var.node_pools[count.index], "name")}"
project = "${var.project_id}"
zone = "${var.zones[0]}"
cluster = "${var.name}"
cluster = "${google_container_cluster.zonal_primary.name}"
version = "${lookup(var.node_pools[count.index], "auto_upgrade", false) ? "" : lookup(var.node_pools[count.index], "version", local.node_version_zonal)}"
initial_node_count = "${lookup(var.node_pools[count.index], "initial_node_count", lookup(var.node_pools[count.index], "min_count", 1))}"

Expand Down Expand Up @@ -144,8 +144,6 @@ resource "google_container_node_pool" "zonal_pools" {
update = "30m"
delete = "30m"
}

depends_on = ["google_container_cluster.zonal_primary"]
}

resource "null_resource" "wait_for_zonal_cluster" {
Expand Down
4 changes: 1 addition & 3 deletions cluster_regional.tf
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ resource "google_container_node_pool" "pools" {
name = "${lookup(var.node_pools[count.index], "name")}"
project = "${var.project_id}"
region = "${var.region}"
cluster = "${var.name}"
cluster = "${google_container_cluster.primary.name}"
version = "${lookup(var.node_pools[count.index], "auto_upgrade", false) ? "" : lookup(var.node_pools[count.index], "version", local.node_version_regional)}"
initial_node_count = "${lookup(var.node_pools[count.index], "initial_node_count", lookup(var.node_pools[count.index], "min_count", 1))}"

Expand Down Expand Up @@ -137,8 +137,6 @@ resource "google_container_node_pool" "pools" {
update = "30m"
delete = "30m"
}

depends_on = ["google_container_cluster.primary"]
}

resource "null_resource" "wait_for_regional_cluster" {
Expand Down
4 changes: 1 addition & 3 deletions cluster_zonal.tf
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ resource "google_container_node_pool" "zonal_pools" {
name = "${lookup(var.node_pools[count.index], "name")}"
project = "${var.project_id}"
zone = "${var.zones[0]}"
cluster = "${var.name}"
cluster = "${google_container_cluster.zonal_primary.name}"
version = "${lookup(var.node_pools[count.index], "auto_upgrade", false) ? "" : lookup(var.node_pools[count.index], "version", local.node_version_zonal)}"
initial_node_count = "${lookup(var.node_pools[count.index], "initial_node_count", lookup(var.node_pools[count.index], "min_count", 1))}"

Expand Down Expand Up @@ -137,8 +137,6 @@ resource "google_container_node_pool" "zonal_pools" {
update = "30m"
delete = "30m"
}

depends_on = ["google_container_cluster.zonal_primary"]
}

resource "null_resource" "wait_for_zonal_cluster" {
Expand Down

0 comments on commit a9df188

Please sign in to comment.