Surprising diff on imported aws_s3_bucket_logging with expected_bucket_owner #26627
Labels
bug
Addresses a defect in current functionality.
good first issue
Call to action for new contributors looking for a place to start. Smaller or straightforward issues.
service/s3
Issues and PRs that pertain to the s3 service.
Milestone
Terraform CLI and Terraform AWS Provider Version
Terraform v1.2.8 on linux_amd64
Provider hashicorp/aws v4.29.0
Affected Resource(s)
aws_s3_bucket_logging
I’m upgrading from AWS provider 3.6 to 4.29, and so I am adding a new aws_s3_bucket_logging resource, specifying that the account that owns it is different from the one in the TF provider:
So then I import it:
So far so good! And then I run Terraform plan:
Expected behavior: I expected no diffs between the configuration and the state.
Actual behavior: I am surprised that the account ID appears in the bucket field. Did the terraform import put the whole ID in the bucket name by mistake? Was there another way I should have done the import?
I confirmed that the bucket looks like this in the statefile:
To reproduce this, you might need two AWS accounts, one to be expected_bucket_owner and one to run Terraform.
Thanks!
The text was updated successfully, but these errors were encountered: