Skip to main content

atmos terraform state show

Use this command to show the attributes of a single resource in the Terraform state for an Atmos component in a stack.

atmos terraform state show --help

Usage

Execute the terraform state show command like this:

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

This command displays detailed information about a single resource instance in the Terraform state. This is useful for inspecting the current attributes and metadata of a managed resource.

tip

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

Examples

# Show details of a specific resource
atmos terraform state show vpc -s dev aws_vpc.main

# Show a resource within a module
atmos terraform state show vpc -s dev module.web.aws_instance.main

# Show an indexed resource
atmos terraform state show vpc -s dev 'aws_subnet.public[0]'

Arguments

component (required)

Atmos terraform component.

address (required)

The address of the resource instance to show.

Flags

--stack (alias -s) (required)

Atmos stack.

--dry-run (optional)

Show what would be executed without actually running the command.

atmos terraform state show vpc -s dev --dry-run aws_vpc.main
--skip-init (optional)

Skip running terraform init before executing the command.

atmos terraform state show vpc -s dev --skip-init aws_vpc.main

Native Terraform Flags

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

-state=FILE

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

atmos terraform state show vpc -s dev -state=terraform.tfstate aws_vpc.main

See Also