r/devops • • Sep 17 '26

Tools Migrating existing CloudFormation resources to OpenTofu -recommended approach?

Hi everyone,

We’re planning to migrate a large number of existing AWS resources currently managed through CloudFormation to OpenTofu.

Our environments are fairly siloed per customer, and each environment can include resources such as EC2 instances, load balancers, Auto Scaling Groups, VPCs, security groups, and other AWS services.

I’m looking for recommendations from anyone who has gone through a similar migration.

Specifically:

- Are there any tools that can help convert or migrate existing CloudFormation stacks to OpenTofu?

- What is the best approach for importing existing resources into OpenTofu state?

- How did you handle dependencies between resources during the migration?

- Would you recommend migrating one CloudFormation stack/customer environment at a time?

- Are there any common pitfalls or state-management issues we should watch out for?

- What approach would minimize the risk of OpenTofu trying to modify or recreate existing production resources after import?

Our main priority is to make the migration as safe and predictable as possible, with minimal disruption to existing customer environments.

Would appreciate hearing about any tools, workflows, or lessons learned from real-world migrations.

20 Upvotes

15 comments sorted by

View all comments

1

u/Miserable_Hippo1503 Sep 22 '26

The way this is framed makes the migration sound a lot safer than it actually is. Importing resources is the easy part, keeping CloudFormation and OpenTofu from fighting over the same stuff is where the real mess starts. You've got dependencies, drift, names, deletion policies and all the weird little differences between customer stacks, so trying to figure those out during the production move is asking for trouble. This is where having someone who actually does migration work, even an outside provider similar to trusted tech, can be useful before touching the live environments. Prove the process on the most different stacks first and get a clean no-op plan, otherwise you're basically testing in production.