Generate Terraform code from Lucidchart diagrams

Written by:  Shanna S
Last updated:  

With this beta functionality in Lucidchart you can convert a Lucidchart diagram built using the AWS shapes shape library into Terraform code.

Diagram to code is available for accounts with the Cloud Accelerator. Contact sales to purchase the Cloud Accelerator for your Enterprise account. 

Diagram to Terraform

This beta functionality allows you to generate Terraform code from a Lucidchart diagram. To do so, follow these steps:

  1. From a Lucidchart document, enable an AWS shape library.
  2. Add AWS shapes to the canvas.
  3. Use lines to connect and represent relationships between AWS shapes.
  4. Add AWS containers and place AWS shapes inside to represent containment relationships.
  5. From the Primary Toolbar, select the terraform-export-icon.jpg Terraform export icon.
  6. Click Generate.
  7. If there are any issues with the generated code, you will see a warning pop-up.
    • Click Resolve and follow the prompts to resolve the issue.
  8. Optionally, you can use the Contextual Panel on the right side of the canvas to add custom data to your shapes.
  9. Click copy-icon.png the copy to clipboard icon or select Download .tf file at the bottom of the Terraform export menu.

Give feedback on this article

Have feedback about this article? Tell us about your experience here.

Did you find what you were looking for?

Still have a question or want to share what you have learned? Visit our Community   to get help and collaborate with others.