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

Cloud Asset Discovery

Overview

Discover your existing cloud infrastructure before creating an appStack. StackGen supports Day-0 Resource Discovery, allowing you to detect changes before creating an appStack by importing Terraform state (.tfstate) files.

Pre-appStack Creation: Day-0 Resource Discovery

Cloud Asset Discovery can be performed before creating an appStack to ensure that the imported infrastructure aligns with its intended configuration.

  1. Access Cloud Asset Discovery

    1. From the StackGen Home Page, click Cloud Asset Discovery from the navigation panel on the left.

    2. Click Start Discovery to begin importing your infrastructure.

      Start Discovery

      note

      After the first discovery, the UI will change to show a + New button.

      New Button

  2. Import a Terraform State File (.tfstate): Upload an existing .tfstate file to retrieve infrastructure details. You can either drag your deployment file or click the Click to upload IaC files panel to upload your file, then click Proceed.

    Upload tfstate

    note

    StackGen supports both UI and CLI-based imports.

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

    Discovered Resources

  4. Click Create appStack from this Discovery to create your appStack.

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

    • To unselect a resource, select the resources and click the back arrow .

      Select Resources

  5. Click Create appStack, you will be redirected to the Topology Canvas.

    appStack from Discovery

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

      Edit appStack Name

Modify Resource Selection After Creation

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

  1. Click the Source icon from the appStack details menu.

    source

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

    Add Resources

    note

    You cannot remove resources added while creating the base appStack.

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

    Discovery appStack

Post-appStack Creation – Continuous Drift Monitoring

You can now run Day 0 drift on the selected resources in your appStack and continue to monitor for drift on an ongoing basis. Check out the Drift Detection document to learn more.

You can also create appStacks from your .tfstate discoveries. Refer to the IaC from Cloud Discovery article for detailed steps.