DEV Community

Discussion on: How to convert aws sam into terraform ?

Collapse
 
loujaybee profile image
Lou (🚀 Open Up The Cloud ☁️) • Edited

I've not heard of any way to directly convert the two, but you can use your infra as a source of truth. Terraform can import resources into state to be managed. terraform.io/docs/cli/import/index...

You can also use the "show" command to convert state into TF code: terraform.io/docs/cli/commands/sta...

I've also used: github.com/dtan4/terraforming in the past.

Hope that helps !

Collapse
 
soumyaranjannaik profile image
Soumya Ranjan Naik

Ohh thanks for the information and resources.