Skip to content

Commit 6381911

Browse files
Fix diffs from code autogeneration caught by new function
1 parent 1f2dcfc commit 6381911

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

autogen/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ The resources/services/activations/deletions that this module will create/trigge
99
- Activate network policy if `network_policy` is true
1010
- Add `ip-masq-agent` configmap with provided `non_masquerade_cidrs` if `network_policy` is true
1111

12+
{% if private_cluster %}
13+
**Note**: You must run Terraform from a VM on the same VPC as your cluster, otherwise there will be issues connecting to the GKE master.
14+
15+
{% endif %}
1216
## Usage
1317
There are multiple examples included in the [examples](./examples/) folder but simple usage is as follows:
1418

modules/private-cluster/cluster_regional.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ resource "google_container_node_pool" "pools" {
101101
name = "${lookup(var.node_pools[count.index], "name")}"
102102
project = "${var.project_id}"
103103
region = "${var.region}"
104-
cluster = "${var.name}"
104+
cluster = "${google_container_cluster.primary.name}"
105105
version = "${lookup(var.node_pools[count.index], "auto_upgrade", false) ? "" : lookup(var.node_pools[count.index], "version", local.node_version_regional)}"
106106
initial_node_count = "${lookup(var.node_pools[count.index], "initial_node_count", lookup(var.node_pools[count.index], "min_count", 1))}"
107107

@@ -142,8 +142,6 @@ resource "google_container_node_pool" "pools" {
142142
update = "30m"
143143
delete = "30m"
144144
}
145-
146-
depends_on = ["google_container_cluster.primary"]
147145
}
148146

149147
resource "null_resource" "wait_for_regional_cluster" {

modules/private-cluster/cluster_zonal.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ resource "google_container_node_pool" "zonal_pools" {
101101
name = "${lookup(var.node_pools[count.index], "name")}"
102102
project = "${var.project_id}"
103103
zone = "${var.zones[0]}"
104-
cluster = "${var.name}"
104+
cluster = "${google_container_cluster.zonal_primary.name}"
105105
version = "${lookup(var.node_pools[count.index], "auto_upgrade", false) ? "" : lookup(var.node_pools[count.index], "version", local.node_version_zonal)}"
106106
initial_node_count = "${lookup(var.node_pools[count.index], "initial_node_count", lookup(var.node_pools[count.index], "min_count", 1))}"
107107

@@ -142,8 +142,6 @@ resource "google_container_node_pool" "zonal_pools" {
142142
update = "30m"
143143
delete = "30m"
144144
}
145-
146-
depends_on = ["google_container_cluster.zonal_primary"]
147145
}
148146

149147
resource "null_resource" "wait_for_zonal_cluster" {

0 commit comments

Comments
 (0)