Skip to content

Commit

Permalink
Fix random_id usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev25 committed Dec 16, 2019
1 parent f6c780e commit 6afd2e1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion autogen/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ resource "google_container_node_pool" "pools" {
{% endif %}
for_each = local.node_pools
{% if update_variant %}
name = random_id.name.*.hex[count.index]
name = random_id.name.*.hex[each.key]
{% else %}
name = each.key
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ resource "random_id" "name" {
resource "google_container_node_pool" "pools" {
provider = google-beta
for_each = local.node_pools
name = random_id.name.*.hex[count.index]
name = random_id.name.*.hex[each.key]
project = var.project_id
location = local.location
// use node_locations if provided, defaults to cluster level node_locations if not specified
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ resource "random_id" "name" {
resource "google_container_node_pool" "pools" {
provider = google
for_each = local.node_pools
name = random_id.name.*.hex[count.index]
name = random_id.name.*.hex[each.key]
project = var.project_id
location = local.location

Expand Down

0 comments on commit 6afd2e1

Please sign in to comment.