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
Terraform CLI and Terraform AWS Provider Version
Terraform v1.1.9
on darwin_arm64
+ provider registry.terraform.io/hashicorp/aws v4.15.1
Affected Resource(s)
aws_s3_bucket_lifecycle_configuration
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.
NOTE: The following resource declaration was one of the removed resources. The others were similar, but for different buckets. The HCL below was successfully applied by terraform apply, prior to the removal of the HCL (which was followed by the unsuccessful/no-op terraform apply).
Removing the HCL for an already-provisioned aws_s3_bucket_lifecycle_configuration resource should cause terraform apply to destroy/delete the actual resources/rules within the AWS env.
Actual Behavior
After removing the HCL for an already-provisioned aws_s3_bucket_lifecycle_configuration resource, the subsequent terraform apply did not update or remove/destroy any S3-related resources. The corresponding AWS S3 buckets now appear to have "orphaned" lifecycle rules, which are visible within the AWS console, but which no longer have any corresponding TF HCL resource declarations.
Steps to Reproduce
Migrated existing AWS v3.x-style HCL to use the new v4.x-style aws_s3_bucket_lifecycle_configuration resources.
terraform apply
Removed the new aws_s3_bucket_lifecycle_configuration resources from the HCL.
terraform apply (Note that the TF plan shows nothing to destroy/modify, even though HCL resource declarations were removed.)
Important Factoids
I couldn't find any documentation (at the locations below) which would indicate that the unexpected behavior (as described above) is intentional. Therefore, I assume that this is
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Community Note
Terraform CLI and Terraform AWS Provider Version
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.
NOTE: The following resource declaration was one of the removed resources. The others were similar, but for different buckets. The HCL below was successfully applied by
terraform apply
, prior to the removal of the HCL (which was followed by the unsuccessful/no-opterraform apply
).Debug Output
Panic Output
Expected Behavior
Removing the HCL for an already-provisioned
aws_s3_bucket_lifecycle_configuration
resource should causeterraform apply
to destroy/delete the actual resources/rules within the AWS env.Actual Behavior
After removing the HCL for an already-provisioned
aws_s3_bucket_lifecycle_configuration
resource, the subsequentterraform apply
did not update or remove/destroy any S3-related resources. The corresponding AWS S3 buckets now appear to have "orphaned" lifecycle rules, which are visible within the AWS console, but which no longer have any corresponding TF HCL resource declarations.Steps to Reproduce
aws_s3_bucket_lifecycle_configuration
resources.terraform apply
aws_s3_bucket_lifecycle_configuration
resources from the HCL.terraform apply
(Note that the TF plan shows nothing to destroy/modify, even though HCL resource declarations were removed.)Important Factoids
I couldn't find any documentation (at the locations below) which would indicate that the unexpected behavior (as described above) is intentional. Therefore, I assume that this is
References
aws_s3_bucket
resource in AWS Provider version 4.0 #23106The text was updated successfully, but these errors were encountered: