[Bug]: Extended s3 bucket properties like website, lifecycle_rule gets removed after migrate to new style #28068
Labels
bug
Addresses a defect in current functionality.
service/s3
Issues and PRs that pertain to the s3 service.
Terraform Core Version
1.3.5
AWS Provider Version
3.75.2
Affected Resource(s)
aws_s3_bucket
Expected Behavior
The second apply should update nothing.
Actual Behavior
The second apply removes website setting of s3 bucket.
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
resource "aws_s3_bucket" "bucket" {
bucket = "test-bucket-name"
}
resource "aws_s3_bucket_website_configuration" "bucket-website" {
bucket = aws_s3_bucket.bucket.bucket
index_document { suffix = "index.html" }
error_document { key = "error.html" }
}
Steps to Reproduce
Reproduce steps:
Create a resource with deprecated style:
Migrate it to new style:
Run terraform apply, the first apply will successful.
Run terraform apply again, then I see this modification:
And If I continue the website setting of this bucket will become disabled.
Because of this bug I have to keep the depreacted style of s3 resources.
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No response
The text was updated successfully, but these errors were encountered: