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
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Summary
Hi folks,
The AWS provider 3.x series now has backported aws_s3_bucket_* resources from the 4.x provider. Notably, if you're going to use these, you must also add a lifecycle { ignore_changes = ... } to avoid a perpetual diff that will alternately destroy part of your configuration.
This is extremely surprising behavior, and there should be much more visible warnings about this in documentation in the upgrade guide and ideally in the latest AWS provider documentation.
Currently, the upgrade guide has numerous examples of using the new style resources, but zero examples of including the ignore_changes block necessary to make this safe for people who still pin to the 3.x provider. And anyone who does a web search for the new resources will be led first to the latest version of the docs, which also makes no mention of this warning or the necessary ignore_changes block.
I just had a minor incident due to this. And I was only able to uncover the cause after much searching by finding the old documentation for the new resources in the 3.75.2 AWS provider documentation.
This was really upsetting, particularly because I previously read the upgrade guide and followed the examples therein, which turned out not to be safe to follow.
There should be more caveats that these instructions are dangerous to follow if you are still using the 3.x provider!
Thank you.
Terraform CLI and Terraform AWS Provider Version
AWS provider 3.75.2
Affected Resource(s)
aws_s3_bucket_*
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
...
No changes. Your infrastructure matches the configuration.
Terraform has compared your real infrastructure against your configuration and found no differences, so no changes
are needed.
After implementing them separately, I would like not to add all resources on the lifecycle.ignore_changes. it's a suggestion from you in the terraform documentation because they are deprecated parameters.
Community Note
Summary
Hi folks,
The AWS provider 3.x series now has backported
aws_s3_bucket_*
resources from the 4.x provider. Notably, if you're going to use these, you must also add alifecycle { ignore_changes = ... }
to avoid a perpetual diff that will alternately destroy part of your configuration.This is extremely surprising behavior, and there should be much more visible warnings about this in documentation in the upgrade guide and ideally in the latest AWS provider documentation.
Currently, the upgrade guide has numerous examples of using the new style resources, but zero examples of including the ignore_changes block necessary to make this safe for people who still pin to the 3.x provider. And anyone who does a web search for the new resources will be led first to the latest version of the docs, which also makes no mention of this warning or the necessary ignore_changes block.
I just had a minor incident due to this. And I was only able to uncover the cause after much searching by finding the old documentation for the new resources in the 3.75.2 AWS provider documentation.
This was really upsetting, particularly because I previously read the upgrade guide and followed the examples therein, which turned out not to be safe to follow.
There should be more caveats that these instructions are dangerous to follow if you are still using the 3.x provider!
Thank you.
Terraform CLI and Terraform AWS Provider Version
AWS provider 3.75.2
Affected Resource(s)
aws_s3_bucket_*
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Compare against lifecycle ignore_changes that isn't documented in the upgrade guide
Expected Behavior
I expected deterministic behavior with the ACL set correctly.
Actual Behavior
A perpetual diff ensued, with Terraform creating the new resource in one apply and destroying it in the next apply.
Steps to Reproduce
terraform apply
Important Factoids
References
aws_s3_bucket
resource in AWS Provider version 4.0 #23106The text was updated successfully, but these errors were encountered: