Why migrate?

Terraform and CloudFormation are both infrastructure-as-code (IaC) tools that allow users to manage cloud resources in a declarative way. CloudFormation is an IaC technology proprietary to AWS; Terraform is owned by Hashicorp. There are some advantages to using Terraform over CloudFormation that cause many organizations to spend the effort to migrate from CloudFormation to Terraform:

  1. Multi-Cloud Support: While CloudFormation is specifically designed for AWS, Terraform can be used to manage infrastructure across multiple cloud providers, including AWS, Azure, Google Cloud, and others. This makes it easier for organizations that use a multi-cloud strategy to maintain a consistent workflow.
  2. Modular Architecture: Terraform has a modular architecture that allows users to break down infrastructure into smaller components that can be reused and combined in different ways. This makes it easier to manage large and complex infrastructure projects.
  3. Third-Party Providers: Terraform has a large ecosystem of third-party providers that allow users to manage infrastructure resources beyond the cloud providers themselves. This includes providers for services like DNS, databases, and load balancers. Firefly can help you manage any Terraform provider via IaC.

Overall, while CloudFormation may be easier to use for simple AWS-specific deployments, Terraform offers more flexibility and supports a wider range of cloud providers, making it a more powerful tool for managing infrastructure at scale.

Challenges for DIY migration

If you’ve tried to tackle this migration without using Firefly, no doubt you’ve encountered challenges such as finding all of your CloudFormation and validating that it was properly aligned to the actual underlying cloud configurations. Determining where existing Terraform modules might be used for newly migrated assets. And, what about cloud resources not yet covered by IaC? It’s a bit of a spaghetti bowl that needs to be untangled.

3 Easy Steps to Migrate to Terraform using Firefly

When migrating from CloudFormation to Terraform, Firefly can turn the existing CloudFormation assets into Terraform code without needing recreation or altering the cloud asset (no downtime).

Step 1 - Find your CloudFormation

Firefly supports both CloudFormation and Terraform, making it easy to see what you have and its current state. Use the Firefly Inventory. Scroll down to filter for IaC Type = Cloud Formation.

This will show you all of your assets managed by CloudFormation.

Step 2 Codify these assets

Choose an asset, or a group of assets in the Inventory.

Click on Codify (top right).

You can choose to create explicit values, codify unmanaged dependencies, use an existing Terraform module, or create a new module.

Step 3 Import Terraform

Copy the Terraform code, and push to your Git Repo.

Copy the Terraform Import statements, and run them in your terminal.

That’s it! All assets are now managed with Terraform, and you can make all changes in the Firefly-generated code. 

Additional uses

The process will be the same from any IaC to Terraform migration using Firefly.

You can codify cloud assets that are not yet covered by any IaC or migrate from older versions of Terraform to the current version. In the inventory tab, filter for unmanaged assets or Terraform managed assets. Choose which to codify and follow step 2 as before.

In addition to codification, Firefly’s comprehensive Cloud Asset Management platform helps you manage changes, roll-backs, and drift while ensuring all of your cloud assets are consistently governed by policies that meet your business needs. 

Contact us for a demo or help planning your migration.