DevOps & CI/CD
Bug Report
Terraform "Invalid for_each argument": sensitive values cannot be used as for_each keys
After marking a variable sensitive to keep database passwords out of plan output, terraform plan failed with Invalid for_each argument. Sensitive values cannot be for_each keys because keys appear in resource addresses. How we restructured the input so keys stay public and secrets stay hidden.