# atmos terraform state list

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

## Usage

Execute the `terraform state list` command like this:

```shell
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

```shell
# 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.
  ```shell
  atmos terraform state list vpc -s dev --dry-run
  ```
- **`--skip-init` (optional)**

  Skip running `terraform init` before executing the command.
  ```shell
  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.
  ```shell
  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.
  ```shell
  atmos terraform state list vpc -s dev -id=i-abc123
  ```

## See Also

- [`atmos terraform state`](/cli/commands/terraform/state) - State management overview
- [`atmos terraform state show`](/cli/commands/terraform/state/show) - Show a resource in the state
- [`atmos terraform state mv`](/cli/commands/terraform/state/mv) - Move an item in the state
