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

IaC from State Files

For Platform and DevOps Engineers

Ingest your existing IaC files, enhance and remediate them to ensure reliable, standardized, and secure IaC. Generate IaC for resources created manually or by ClickOps.

note

Ensure that your deployment files are saved in .tfstate or .json format.

Follow these steps to create an appStack using existing deployment files.

  1. Click the + New appStack button.

    + New appStack

  2. Select From Deployment Files.

    From Deployment Files

  3. You can either drag your deployment file or click the Click to upload IaC files panel to upload your file, and click Proceed.

    Upload Files

    note
    • Click the Identify modules and nested resources from uploaded tfstate toggle to allow StackGen to automatically identify and represent your module nesting. If you use this option:

      1. StackGen will prompt you to Create appStack directly.

      2. Select the Cloud Provider.

      3. You will be redirected to the topology canvas with the resources automatically mapped and configured.

        Dependencies

      4. You can edit the appStack name and description via the Edit appStack Details modal.

        newappstackfromscratch

    • Your deployment file should be saved as a .tfstate file using the Cloud to Code CLI for this feature to work.

  4. StackGen will identify all the resources within your .tfstate file.

    • You can select all resources or a few and click the forward arrow to create your appStack.

    • To unselect a resource, click the back arrow .

      Select Resources

  5. Click the Create appStack button. You will be redirected to the Topology Canvas.

    You can edit the appStack name and description via the Edit appStack Details modal.

    newappstackfromscratch

  6. At any point in time, if you want to go back and select or unselect resources from your appStack:

    1. Click Source icon from the appstack details menu.

      Source

    2. You can select the resources required, and click the forward arrow to include them in your appStack.

      editappstack

      note

      You cannot remove the resources that you've added while creating the base appStack.

    3. Click Update Topology. Your appStack will be updated with the selected resources.

      editappstack