Skip to content
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

Changes to Bucket Versioning Configuration outside of terraform not detected. #171

Closed
mviamari opened this issue Apr 5, 2023 · 0 comments · Fixed by #172
Closed

Changes to Bucket Versioning Configuration outside of terraform not detected. #171

mviamari opened this issue Apr 5, 2023 · 0 comments · Fixed by #172
Labels
bug 🐛 An issue with the system

Comments

@mviamari
Copy link
Contributor

mviamari commented Apr 5, 2023

When the Versioning configuration (Enabled/Suspended) is changed outside of Terraform, the change is not detected by the module and the configuration persists on the bucket, even when the module has versioning disabled.

It seems that this is because the module enables versioning by adding/removing the aws_s3_bucket_versioning resource, instead of changing the aws_s3_bucket_versioning.versioning_configuration.status from Enabled to Suspended. This seems correct according to the docs, which note that deleting the resource will set the versioning to suspended. However, without the aws_s3_bucket_versioning resource changes made external to the terraform do not appear to be detected/corrected.

Expected Behavior

If the versioning configuration is changed outside of terraform, the change is detected and a diff is generated to match the configuration to the terraform.

Steps to Reproduce

  1. Deploy S3 bucket with versioning_enabled=False
  2. Change the versioning to enabled the Console (or at least outside of the terraform configuration).
  3. Re-run terraform to see if the change is detected.

Environment

Terraform v1.2.8
AWS provider v4.50.0
Cloudposse s3_bucket module 3.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant