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
When using 2.10.0 of the module, I get an error about using sensitive values in a for_each loop
Expected behavior
I expected the module to create my DB and not fail with an error
Observed behavior
The following error appears:
╷
│ Error: Invalid for_each argument
│
│ on .terraform/modules/my-db/modules/postgresql/main.tf line 254, in resource "random_password" "additional_passwords":
│ 254: for_each = local.users
│ ├────────────────
│ │ local.users 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.
╵
TL;DR
When using 2.10.0 of the module, I get an error about using sensitive values in a
for_each
loopExpected behavior
I expected the module to create my DB and not fail with an error
Observed behavior
The following error appears:
Here is the line where it is failing.
Terraform Configuration
Terraform Version
Additional information
Tried on terraform 1.7 and 1.8
Official docs on
for_each
and sensitive valuesThe text was updated successfully, but these errors were encountered: