-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terraform kubernetes provider unable to evaluate google_container_cluster data source #30929
Comments
Hi @itsavvy-ankur, I suspect the kubernetes provider in this case is attempting to connect in order to refresh or plan a resource, but the If the We use GitHub issues for tracking bugs and enhancements, rather than for questions. While we can sometimes help with certain simple problems here, it's better to use the community forum where there are more people ready to help. Thanks! |
Thank you @jbardin for your comments on this. I was able to resolve it by separating the dependency between creation of composer environment and kubernetes secret and then passing the cluster name as an output instead of having to read it in the data source from a computed value. The docs here also help validate the behaviour https://www.terraform.io/language/data-sources#data-source-lifecycle |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Given terraform configuration for Composer v2 instance
when the GKE cluster is already created
and you define a data source to read the cluster configuration
and a kubernetes provider to inject a secret into the cluster
then the kubernetes provider fails to evaluate the data source config unless the cluster name is hardcoded
Terraform Version
Terraform Configuration Files
Debug Output
Expected Behavior
The kubernetes provider should read the value of the cluster from data source defined in google_container_cluster
Actual Behavior
Terraform errors out on the provider as it is unable to fetch the correct cluster details
Steps to Reproduce
Additional Context
I have verified that the data source configuration is correct by setting it in a output variable and statically typing the cluster name, the issue seems to exist when the cluster name is dynamically read in the data source
References
Could this be similar to hashicorp/terraform-provider-kubernetes#1028 ?
The text was updated successfully, but these errors were encountered: