When setting create_service_account to false in the private-cluster module, the random_string.cluster_service_account_suffix resource is still being evaluated and generating a random suffix even though it should not be created.
Expected behavior
When create_service_account is set to false, the random_string.cluster_service_account_suffix resource should not be evaluated or generate a random suffix.
Observed behavior
The random_string.cluster_service_account_suffix resource is being evaluated and generating a random suffix even when create_service_account is set to false.
Terraform v1.4.5
on darwin_arm64
+ provider registry.terraform.io/hashicorp/google v5.7.0
+ provider registry.terraform.io/hashicorp/kubernetes v2.24.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
Your version of Terraform is out of date! The latest version
is 1.6.5. You can update by downloading from https://www.terraform.io/downloads.html
TL;DR
When setting
create_service_account
to false in the private-cluster module, therandom_string.cluster_service_account_suffix
resource is still being evaluated and generating a random suffix even though it should not be created.Expected behavior
When
create_service_account
is set to false, therandom_string.cluster_service_account_suffix
resource should not be evaluated or generate a random suffix.Observed behavior
The
random_string.cluster_service_account_suffix
resource is being evaluated and generating a random suffix even whencreate_service_account
is set to false.https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/blob/24ccc6ba3a938d1e2ef88a0173c7849d6fa26d0c/sa.tf#L34-L39
Terraform Configuration
Terraform Version
Additional information