Skip to main content

atmos terraform state list

Use this command to list resources in the Terraform state for an Atmos component in a stack.

atmos terraform state list --help

Usage

Execute the terraform state list command like this:

atmos terraform state list <component> -s <stack> [options]

This command lists all resource instances tracked in the Terraform state for the specified component. Use it to inspect what resources Terraform is managing.

tip

Run atmos terraform state list --help to see all the available options

Examples

# List all resources in the state
atmos terraform state list vpc -s dev

# Filter resources by address
atmos terraform state list vpc -s dev aws_subnet.public

Arguments

component (required)

Atmos terraform component.

Flags

--stack (alias -s) (required)

Atmos stack.

--dry-run (optional)

Show what would be executed without actually running the command.

atmos terraform state list vpc -s dev --dry-run
--skip-init (optional)

Skip running terraform init before executing the command.

atmos terraform state list vpc -s dev --skip-init

Native Terraform Flags

The atmos terraform state list command supports native terraform state list flags. Pass them directly or use -- to separate Atmos flags from Terraform flags.

-state=FILE

Path to a local state file to list resources from, instead of the configured backend.

atmos terraform state list vpc -s dev -state=terraform.tfstate
-id=ID

Filter the results to include only resources whose ID attribute matches the given string.

atmos terraform state list vpc -s dev -id=i-abc123

See Also