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
bugconfirmeda Terraform Core team member has reproduced this issueexplaineda Terraform Core team member has described the root cause of this issue in codev0.15Issues (primarily bugs) reported against v0.15 releases
Propagation of "sensitive" property is sometimes overzealous, so resources can't be constructed with for_each from a map that has sensitive values, but not sensitive keys.
│ Error: Invalid for_each argument
│
│ on test.tf line 15, in resource "null_resource" "service_a_secrets":
│ 15: for_each = local.service_a_secrets
│ ├────────────────
│ │ local.service_a_secrets has a sensitive value
│
│ Sensitive values, or values derived from sensitive values, cannot be used as for_each arguments. If used, the sensitive value could be exposed as a resource instance key.
╵
alisdair
added
confirmed
a Terraform Core team member has reproduced this issue
v0.15
Issues (primarily bugs) reported against v0.15 releases
and removed
new
new issue not yet triaged
labels
May 7, 2021
In this case the problem is the lookup function, which was fixed in cty to fully support sensitivity marks in zclconf/go-cty#98, but I didn't notice that Terraform has its own implementation of lookup. We need to make the same improvements here.
alisdair
added
the
explained
a Terraform Core team member has described the root cause of this issue in code
label
May 7, 2021
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.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bugconfirmeda Terraform Core team member has reproduced this issueexplaineda Terraform Core team member has described the root cause of this issue in codev0.15Issues (primarily bugs) reported against v0.15 releases
Propagation of "sensitive" property is sometimes overzealous, so resources can't be constructed with for_each from a map that has sensitive values, but not sensitive keys.
Terraform Version
Terraform Configuration Files
Debug Output
Crash Output
Expected Behavior
Terraform should create the resource.
Actual Behavior
It throws an error:
Steps to Reproduce
terraform init
terraform apply
Additional Context
References
similar to #28426
The text was updated successfully, but these errors were encountered: