You need to move a resource from stack A's state to stack B's state. `terraform state mv` with `-state-out` isn't working with the S3 backend.
AdvancedTroubleshootingImport, Already Exists and State Surgery
Answer
Likely causes → -state / -state-out work on local files only; with remote backends you must use pull/push or a declarative approach.
Diagnose → The command complains about local state options or updates only a local file.
Fix → The safest approach in 1.7+: in stack A add removed { from = aws_sqs_queue.jobs lifecycle { destroy = false } } and apply; in stack B add the resource plus an import block and apply. No hand-edited state, and both steps are reviewed plans.
Prevent → Plan stack boundaries early; when moving, always use the removed + import pattern.
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