Loading...
Loading...
### Terraform Version ```shell Terraform v1.10.1 on darwin_arm64 ``` ### Terraform Configuration Files ``` resource "aws_s3_bucket_acl" "west" { provider = aws.west bucket = aws_s3_bucket.west.id expected_bucket_owner = data.aws_caller_identity.current.account_id access_control_policy { grant { grantee { id = data.aws_canonical_user_id.current_user.id type = "CanonicalUser" } permission = "FULL_CONTROL" } owner { id = data.aws_canonical_user_id.current_user.id display_name = "aws" } } } ``` ### Debug Output ``` # module.essentials.aws_s3_bucket_acl.west must be replaced -/+ resource "aws_s3_bucket_acl" "west" { ~ bucket = "west.xx" -> (known after apply) # forces replacement ~ id = "west.xx,000000000" -> (known after apply) # (2 unchanged attributes hidden) ~ access_control_policy { - grant { - permission = "FULL_CONTROL" -> null - grantee { - display_name = "aws" -> null - id = "XXX" -> null - type = "CanonicalUser" -> null # (2 unchanged attributes hidden) } } + grant { + permission = "FULL_CONTROL" + grantee { + display_name = (known after apply) + id = "XXX" + type = "CanonicalUser" # (2 unchanged attributes hidden) } } # (1 unchanged block hidden) } } ``` At the `terraform.tfstate` I can see: `"module": "module.essentials",` appeared  ### Expected Behavior When resource state was moved terraform should not recreate S3 resource. ``` terraform state mv -state=./state.d/terraform.tfstate aws_s3_bucket_acl.west module.essentials.aws_s3_bucket_acl.west Move "aws_s3_bucket_acl.west" to "module.essentials.aws_s3_bucket_acl.west" Successfully moved 1 object(s). ``` ### Actual Behavior ``` # module.essentials.aws_s3_bucket_acl.west must be replaced ``` See debug output above ### Steps to Reproduce 1. `terraform state mv -state=./state.d/terraform.tfstate aws_s3_bucket_acl.west module.essentials.aws_s3_bucket_acl.west` 2. `terraform plan` ### Additional Context _No response_ ### References _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.