Skip to content

v0.2.0-rc7

Choose a tag to compare

@github-actions github-actions released this 05 Apr 13:14
· 554 commits to main since this release
fix: auto-import pre-existing AWS resources on Terraform apply failure

When terraform apply fails with EntityAlreadyExists or 'already exists'
errors, the adapter now:
1. Parses conflicting resources from the error output
2. Logs 'Auto-importing pre-existing resource: <addr> (<id>)' for each
3. Runs terraform import for each supported resource type
4. Re-plans and re-applies once

Supported resource types: aws_iam_role, aws_iam_instance_profile,
aws_s3_bucket, aws_security_group, aws_vpc.

If the retry also fails, the original error is returned.

Unit tests cover resource parsing, import command generation, and
edge cases (unsupported types, non-creation errors).