-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
aws_s3_bucket_notifications can be silently overwritten #22147
Comments
Hi @zestysoft 👋 Thank you for submitting this and this is an excellent use case of somewhere that Terraform and the Terraform AWS Provider could be much more helpful since in many cases they have enough information to return an error upfront during planning instead of unexpected behavior during apply. I believe this falls under the provider-wide enhancement proposal of #14394, so by adding this link here it will add a reference to that issue so we can include it as a use case when thinking about the implementation details. Since this is likely something we will want more broadly across many resources, I'm going to close this particular issue to consolidate discussions, efforts, and prioritization on the topic while the reference would serve as the cue to make this specific resource one of the initial implementations. I would suggest those 👍 upvoting and subscribing here to do so on #14394 so we can appropriately gauge interest. Please feel free to provide feedback there. |
Relates #501. |
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. |
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform v1.1.0
on darwin_amd64
Also happens with Terraform v0.14.7 and aws provider v3.68.0
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Expected Behavior
Add the queue to the existing list of queues
or
Warn that applying will change / overwrite what's existing
Actual Behavior
With TF v0.14.7, after previously applying the configuration file above, uncommenting the second aws_s3_bucket_notification block and running
terraform plan
only shows new code will be added to AWS without any notice that existing queues will be replaced:The same thing happens with v1.1.0, but includes an incorrect notice that objects have changed outside of Terraform:
Looking at the s3 bucket's details in the AWS console after applying, only shows the single audio queue:
Steps to Reproduce
The text was updated successfully, but these errors were encountered: