`Error: Moved object still exists` after adding a `moved` block.
IntermediateTroubleshootingImport, Already Exists and State Surgery
Answer
Likely causes → The from address is still declared in code, so it isn't actually moved (you copied the block instead of renaming it).
Diagnose → grep -rn 'resource "aws_s3_bucket" "logs"' . finds both old and new blocks.
Fix → Delete or rename the old resource block so only the to address exists.
Prevent → Rename and add the moved block in the same commit; review that the old address disappears.
More on Import, Already Exists and State Surgery
Apply fails with `EntityAlreadyExists: Role with name app-role already exists.`Beginner`terraform apply` on a new bucket fails with `BucketAlreadyExists`. You have never created that bucket.Beginner`Error: Resource already managed by Terraform` when running `terraform import aws_s3_bucket.logs acme-logs`.Beginner`Error: Cannot import non-existent remote object` for a resource you can see in the console.Intermediate`Error: Configuration for import target does not exist` when running `terraform plan` with an `import` block.Beginner`terraform plan -generate-config-out=generated.tf` fails with `Conflicting configuration arguments` in the generated file.Intermediate