DEV Community

Soumya Ranjan Naik
Soumya Ranjan Naik

Posted on

How to convert aws sam into terraform ?

I have a AWS SAM app and I want the equivalent Terraform code for that because our organization uses another tool to manage AWS which only accepts terraform.

I want atleast the sam template to convert into terraform.

If you have any idea on how to do it or any reference then please comment.

Top comments (2)

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.

You can also use the "show" command to convert state into TF code:

I've also used: in the past.

Hope that helps !

soumyaranjannaik profile image
Soumya Ranjan Naik

Ohh thanks for the information and resources.

An Animated Guide to Node.js Event Loop

>> Check out this classic DEV post <<