-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Data source used in logging config causes logging: should be a list
during validation
#5315
Comments
Hi @brainsik 👋 Are you able to workaround this by adjusting your resource definition to the below? resource "aws_s3_bucket" "private_bucket" {
bucket = "${local.bucket_id}"
logging = ["${local.logging_config["enabled"]}"]
} There can be some oddities with the configuration language when working with computed values inside complex types. You might want to check the Terraform core repository for similar issues and other possible resolutions or workarounds. This classification of configuration issue might be fixed or manifest differently in the upcoming Terraform 0.12 release, as underlying configuration language for Terraform (HCL) will support much richer type information as well as |
Hi, @bflad. I tried wrapping that line in |
Hi again @brainsik 👋 Since the last time we discussed this, Terraform 0.12 was released, which has a few important and related changes with regards to this situation:
We would suggest upgrading (if you haven't already) and checking out the situation again. Since we will very shortly be no longer supporting Terraform 0.11, I'm going to opt to close this issue. If this is still an issue in Terraform 0.12, please file a new issue and we can take another look. If you're looking for general assistance, please note that we use GitHub issues in this repository for tracking bugs and enhancements with the Terraform AWS Provider codebase rather than for questions. While we may be able to help with certain simple problems here it's generally better to use the community forums where there are far more people ready to help, whereas the GitHub issues here are generally monitored only by a few maintainers and dedicated community members interested in code development of the Terraform AWS Provider itself. |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/brainsik/d0d07a0a48cdbd4ef7dbfba26e581efb
Panic Output
N/A
Expected Behavior
Terraform should validate.
Actual Behavior
Steps to Reproduce
terraform validate
If you replace
data.aws_iam_account_alias.current.account_alias
with a non-data source, then everything works fine.Important Factoids
N/A
References
logging: should be a list
error when aws_s3_bucket resource has local variables in the logging #5037The text was updated successfully, but these errors were encountered: