`terraform plan -generate-config-out=generated.tf` fails with `Conflicting configuration arguments` in the generated file.
IntermediateTroubleshootingImport, Already Exists and State Surgery
Answer
Likely causes → The generator writes every attribute it reads, including mutually exclusive ones (for example ipv6_cidr_block and ipv6_ipam_pool_id, or both name and name_prefix).
Diagnose → Read each error's attribute pair.
Fix → Delete the conflicting/computed arguments from generated.tf (keep the one you actually set), then run terraform plan again. The file remains; re-running with the same -generate-config-out path errors because the file exists.
Prevent → Treat generated config as a draft. Refactor it into variables and modules before merge.
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.BeginnerAfter importing an S3 bucket, the plan still shows `+ force_destroy = false` as an update.Beginner