-
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
S3 Lifecycle Rule Unnecessarily Updates on Each Terraform Apply #291
Comments
Is this issue still open? |
This is still an issue. The cause of the issue is that AWS doesn't support |
I ran into this same issue when trying to set expired_object_delete_marker = true in the same lifecycle rule that I was setting current version expiration and noncurrent_version_expiration. Terraform would run without errors but the plan would show setting the expired_object_delete_marker = false (see below) expiration { lifecycle_rule.1.expiration.3591068768.expired_object_delete_marker: "true" => "false" The solution is to create a second lifecycle rule that sets the expired_object_delete_marker = true
|
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you! |
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! |
This issue was originally opened by @josh-padnick as hashicorp/terraform#9119. It was migrated here as part of the provider split. The original body of the issue is below.
I encountered an issue where adding a lifecycle configuration to an S3 Bucket causes terraform to keep destroying and re-adding the same lifecycle on every subsequent
terraform apply
.Terraform Version
Terraform v0.7.4
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/josh-padnick/aea607bd08cc771344e5c9063f30a495
Panic Output
N/A
Expected Behavior
After the initial apply, subsequent
terraform apply
orterraform plan
should result in no changes.Actual Behavior
The S3 bucket is created successfully and without error on the initial
terraform apply
. But without any changes to the template, runningterraform plan
immediately after shows this pointless change:Steps to Reproduce
terraform apply
terraform plan
Important Factoids
Interestingly, I also discovered what is probably a race condition while preparing this issue. In about 25% of cases, doing a simple
terraform apply
would error out with the following:This is unrelated to this issue, but probably warrants a separate issue if one doesn't already exist.
The text was updated successfully, but these errors were encountered: