`removed` block plan fails with `Error: Removed resource block still exists`.
BeginnerTroubleshootingImport, Already Exists and State Surgery
Answer
Likely causes → The resource block is still in code; a removed block requires the block to be deleted.
Diagnose → grep -rn 'aws_sqs_queue" "jobs"' .
Fix → Delete the resource block, keep only:
removed {
from = aws_sqs_queue.jobs
lifecycle {
destroy = false
}
}
Prevent → Remember removed needs Terraform 1.7+; check CI's version too.
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