# atmos terraform migrate list

Use `atmos terraform migrate list` to inspect which Terraform component instances have `kind: tfmigrate` hooks and which history settings Atmos will expose.

> ⚠️ Experimental

## Usage

```shell
atmos terraform migrate list [component] [options]
```

## Arguments

- **`component`**
  Optional component name filter.

## Flags

- **`--stack` / `-s`**
  Filter results to a stack.
- **`--identity` / `-i`**
  Identity to authenticate before resolving stacks and component migration context. Environment variable: 
  `ATMOS_IDENTITY`
  .
- **`--components`**
  Filter results to one or more component names.
- **`--query`**
  Filter component instances with a YQ expression.
- **`--format` / `-f`**
  Output format. Supported values: 
  `table`
  , 
  `json`
  , 
  `yaml`
  , 
  `csv`
  , 
  `tsv`
  .
- **`--columns`**
  Columns to display. Use field names such as 
  `component`
  , 
  `stack`
  , 
  `workspace`
  , 
  `hook`
  , 
  `mode`
  , 
  `history_bucket`
  , and 
  `history_key`
  .
- **`--sort`**
  Sort by column and order, for example 
  `stack:asc,component:asc`
  .
- **`--delimiter`**
  Delimiter for CSV or TSV output.

## Examples

List migration context for a stack:

```shell
atmos terraform migrate list -s plat-ue2-dev
```

List with an explicit identity:

```shell
atmos terraform migrate list -s plat-ue2-dev --identity aws-prod
```

Show history keys for matching components:

```shell
atmos terraform migrate list --query '.settings.requires_migration == true' --columns component --columns stack --columns history_key
```

Output JSON for automation (no `[component]` argument lists every component in every stack):

```shell
atmos terraform migrate list --format json
```

## Output Columns

Default columns include component, stack, workspace, hook, mode, migration, config, history storage, history bucket, history key, and history role ARN.

Atmos scopes the `history_key` value by stack, component, and workspace:

```text
tfmigrate/<stack>/<component>/<workspace>/history.json
```

## Related

- [`atmos terraform migrate`](/cli/commands/terraform/migrate)
- [`atmos terraform migrate plan`](/cli/commands/terraform/migrate-plan)
- [`atmos terraform migrate apply`](/cli/commands/terraform/migrate-apply)
