-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Operator ... does not work with variables #24033
Comments
I am encountering the same issue, but with a locals {
# Define databases, and their roles with privileges
databases = {
for db in var.databases:
db => {
"${db}" = ["ALL"]
"${db}_read" = ["CONNECT", "SELECT", "TEMP", "EXECUTE", "USAGE"] #readonly
}
}
}
resource "aws_secretsmanager_secret" "db_credentials" {
for_each = keys(merge(values(local.databases)...))
name = "RDSRole-${each.value}-${random_id.secret_id.hex}"
rotation_lambda_arn = aws_lambda_function.rds_secret_rotator_lambda.arn
rotation_rules {
automatically_after_days = 30
}
} This code results in the same error:
|
This appears to be a duplicate of #22404 and it has a workaround for this issue. |
Hello! 🤖 This issue seems to be covering the same problem or request as #22404, so we're going to close it just to consolidate the discussion over there. Thanks! |
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. |
Terraform Version
Terraform Configuration Files
Expected Behavior
Should output this:
Actual Behavior
Steps to Reproduce
terraform init
terraform apply
Additional Context
If we replace
var.codes
withlocal.codes
then it works.To make it work with
var.codes
there is a workaround - comment out the first assignment tox
and uncomment the second one which useszipmap
References
https://stackoverflow.com/questions/60067168/terraform-is-unable-to-apply-the-operator
-->
The text was updated successfully, but these errors were encountered: