-
Notifications
You must be signed in to change notification settings - Fork 115
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
Provide random data sources #351
Comments
Perhaps this stems from #121 |
Also running into this issue with AWS EKS. │ Error: Invalid for_each argument |
Hi folks 👋 Creating data source equivalents of the existing The Since #121 already exists and having that linked in this comment will automatically create a link back to this particular use case, I'm going to close this issue as a duplicate. If you do feel like the mentioned data source behavior is actually beneficial, please raise a separate issue describing your particular use case. Thank you! |
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. |
Terraform CLI and Provider Versions
Terraform v1.3.7
on darwin_arm64
Use Cases or Problem Statement
I am trying to generate passwords with the
random_password
resource, pass that intokustomization_overlay
data source, and deploy the output of kustomize with thekubectl_manifest
resource. However, kustomize outputs the yaml documents it generates as a list of strings, sokubectl_manifest
needs tofor_each
over those.If the values passed into kustomize are static then this works. However, if the values are generated by
random_password
, then I get the"for_each" set includes values derived from resource attributes that cannot be determined until apply
error.To get around this - in a separate TF stack I can put
random_password
into an AWS SSM parameter, and then in the original TF stack use theaws_ssm_parameter
data source and Terraform will be happy with this.Proposal
random_password
and the otherrandom_*
resources could have data source equivalents that allow it to be used withfor_each
.How much impact is this issue causing?
Medium
Additional Information
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: