# atmos terraform modules

Use this command to list all Terraform modules used by an Atmos component in a stack.

## Usage

Execute the `terraform modules` command like this:

```shell
atmos terraform modules <component> -s <stack> [options]
```

This command shows all modules referenced in the configuration, including their source locations and versions.

:::info Atmos Behavior
Atmos provides standard setup for this command including automatic `terraform init` and workspace selection. The module listing is handled by native Terraform.
:::

## Examples

### List Modules

```shell
# Show all modules in the configuration
atmos terraform modules vpc -s dev
```

### JSON Output

```shell
# Get module list in JSON format
atmos terraform modules vpc -s dev -json
```

## Arguments

- **`component` (required)**

  Atmos component name.

## Flags

- **`--stack` / `-s` (required)**

  Atmos stack name where the component is defined.
- **`--skip-init` (optional)**

  Skip running `terraform init` before executing the command.
  ```shell
  atmos terraform modules vpc -s dev --skip-init
  ```
- **`--dry-run` (optional)**

  Show what would be executed without actually running the command.
  ```shell
  atmos terraform modules vpc -s dev --dry-run
  ```

## Native Terraform Flags

This command supports native `terraform modules` flags such as `-json` for JSON output.

## Related Commands

- [`atmos terraform plan`](/cli/commands/terraform/plan) - Generate execution plan
- [`atmos terraform apply`](/cli/commands/terraform/apply) - Apply changes
- [`atmos terraform init`](/cli/commands/terraform/init) - Initialize working directory
