Skip to content

Add ack-resource-adoption-from-iac custom transformation#74

Open
brunokktro wants to merge 2 commits into
aws-samples:mainfrom
brunokktro:add-ack-resource-adoption-from-iac
Open

Add ack-resource-adoption-from-iac custom transformation#74
brunokktro wants to merge 2 commits into
aws-samples:mainfrom
brunokktro:add-ack-resource-adoption-from-iac

Conversation

@brunokktro

Copy link
Copy Markdown

Summary

Adds a new community-sourced custom transformation for AWS Transform: ACK Resource Adoption from IaC.

Analyzes CloudFormation, Terraform, and Pulumi code and generates ACK (AWS Controllers for Kubernetes) adoption manifests that bring existing AWS resources under Kubernetes/GitOps management without recreating, modifying, or deleting anything - using the ResourceAdoption feature gate with adopt-or-create policy and deletion-policy: retain on every manifest. IaC modules and CloudFormation nested stacks are translated into kro ResourceGraphDefinitions, preserving reusable composition as Kubernetes-native APIs.

What's included

community-sourced-transformations/ack-resource-adoption-from-iac/
├── README.md            # Overview, getting started, troubleshooting, repository structure
├── SKILL.md             # Transformation definition: objective, scope, workflow, exit criteria
├── BENCHMARKS.md        # End-to-end test results (atx custom def exec against a real test repo)
└── references/
    ├── iac-to-ack-mapping.md      # CFN/Terraform/Pulumi -> ACK Kind mapping (26 resource types)
    ├── adoption-fields-ref.md     # Per-Kind adoption-fields reference with discovery commands
    ├── kro-patterns.md            # Module/nested stack -> ResourceGraphDefinition translation rules
    └── examples-iac-to-ack.md     # 6 worked before/after examples

Testing

Validated end-to-end via atx custom def exec against a mixed Terraform test repository (flat resources + reusable module + unsupported type). Results in BENCHMARKS.md:

  • 5/5 generated ACK manifests carry adopt-or-create + deletion-policy: retain (programmatic annotation audit, including templates inside the RGD)
  • Terraform module correctly translated to a kro RGD + instance CR, with module inputs as schema fields and internal references as CEL expressions
  • aws_iam_role_policy_attachment correctly folded into the Role spec
  • Unsupported resource (CloudWatch Log Group) flagged in ADOPTION_REPORT.md with guidance, never guessed
  • Source IaC byte-identical after the run; zero IaC syntax remnants in outputs

Notes for reviewers

This submission already follows the review guidance from PR #72 (eks-version-upgrade-readiness): no internal links, BENCHMARKS.md with real execution results, a Troubleshooting section, and a Repository Structure tree in the README.

Bruno Lopes added 2 commits July 24, 2026 13:41
Generates ACK adoption manifests (adopt-or-create + deletion-policy retain)
from CloudFormation, Terraform, and Pulumi code, translating IaC modules and
nested stacks into kro ResourceGraphDefinitions. Includes BENCHMARKS.md with
end-to-end test results, Troubleshooting, and full reference set.
…ation, Pulumi)

Two additional end-to-end runs via atx custom def exec:
- CloudFormation: nested stack -> kro RGD with CEL wiring, VPC discovery TODO,
  conservative flag on an unmapped type (never guessed)
- Pulumi (Python): ComponentResource -> kro RGD, per-instance override
  (maxReceiveCount: 3) captured correctly

14/14 annotation audit across all runs, zero IaC syntax remnants, sources
byte-identical. Also adds AWS::SNS::Subscription to the mapping table
(gap surfaced by the CFN benchmark).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant