Skip to main content
⏳ Estimated read time: 2 min read

Import IaC into StackGen

StackGen allows you to seamlessly import existing infrastructure into the Topology Canvas, enabling you to visualize and manage your cloud resources. Whether starting from scratch or integrating existing configurations, importing Terraform state (.tfstate) or JSON files provides a quick and efficient way to work with your infrastructure.

Import IaC

You can import your existing infrastructure in the following ways:

Import Terraform State (.tfstate)

note

Use this method to import resources that are already deployed and managed via Terraform.

This option allows you to import Terraform-managed infrastructure into StackGen for visualization and further configuration.

  1. Navigate to the Topology Canvas.
  2. Click Import IaC and select Terraform State (.tfstate).
  3. Upload your .tfstate file.
  4. StackGen will automatically parse the file and render the imported resources in the Topology Canvas.
  5. Modify and connect the resources as needed.

Import JSON Files

note

Use this method if you have JSON-based infrastructure definitions from other IaC tools.

This option allows you to import JSON-based infrastructure configurations into StackGen.

  1. Navigate to the Topology Canvas.
  2. Click Import IaC and select JSON File.
  3. Upload your JSON file.
  4. StackGen will process the file and display the resources within the Topology Canvas.
  5. You can adjust the configurations and establish dependencies between resources.

Best Practices

  • Ensure that the Terraform State (.tfstate) or JSON file is correctly structured and contains the relevant resource configurations.
  • After importing, review resource dependencies and make necessary adjustments before exporting IaC.
  • Use the Import Logs feature to check for best practices violations, misconfigurations, or security risks.

By integrating your existing infrastructure into StackGen, you can simplify management, enhance visibility, and enforce governance policies across your cloud resources.