You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Invalid count argument
on .terraform/modules/gke_cluster.asm_managed_control_plane.cpr/main.tf line 57, in resource "random_id" "cache":
57: count = (!local.skip_download) ? 1 : 0
The "count" value depends on resource attributes that cannot be determined
until apply, so Terraform cannot predict how many instances will be created.
To work around this, use the -target argument to first apply only the
resources that the count depends on.
Expected behavior
No response
Observed behavior
No response
Terraform Configuration
# Managed ASM inside GKEmodule"asm_managed_control_plane" {
depends_on=[
google_container_cluster.gke_cluster
]
count=var.asm_managed_control_plane_enabled==true?1:0source="github.com/terraform-google-modules/terraform-google-kubernetes-engine//modules/asm?ref=v21.0.0"project_id=var.project_idcluster_name=var.cluster_namecluster_location=var.regionenable_cni=trueenable_fleet_registration=trueenable_mesh_feature=false
}
# The above depends on the below GKE cluster resource.resource"google_container_cluster""gke_cluster" {
provider=google-beta
name=var.cluster_namelocation=var.region...
}
Terraform Version
Terraform version: "0.14.8"
Additional information
I was initially pointing to master and then updated it to v21.0.0 after #1189 was merged and released. It had been working last week when I created a new cluster with managed ASM control plane, but facing this error now.
The text was updated successfully, but these errors were encountered:
#1189 works around this by making the GKE module cluster_name output a computed attribute. You can use the GKE module instead of the google_container_cluster resource or follow a similar approach of making the cluster_name computed.
TL;DR
Expected behavior
No response
Observed behavior
No response
Terraform Configuration
Terraform Version
Terraform version: "0.14.8"
Additional information
I was initially pointing to master and then updated it to v21.0.0 after #1189 was merged and released. It had been working last week when I created a new cluster with managed ASM control plane, but facing this error now.
The text was updated successfully, but these errors were encountered: