How would you migrate from CloudFormation to Terraform?
AdvancedProductionRefactoring, Migration and Drift
Answer
Per stack, not all at once. Import the real resources into Terraform, set the CloudFormation stack's DeletionPolicy: Retain on everything, then delete the CFN stack (or retain-resources) so resources survive without a manager. Confirm with an empty Terraform plan before removing the CFN stack. Tools such as former2 help to draft code, though results need cleanup.
More on Refactoring, Migration and Drift
What is your workflow for refactoring Terraform safely?IntermediateHow do you rename a resource inside a shared module without breaking consumers?AdvancedHow do you split one state into two without downtime?AdvancedHow do you merge two states?IntermediateHow do you import a large existing environment efficiently?IntermediateHow do you upgrade a major version of the AWS provider?Advanced