# atmos terraform version

Use this command to display the Terraform/OpenTofu version being used for an Atmos component in a stack.

:::info OpenTofu Support
When using OpenTofu, this command will display the OpenTofu version instead of Terraform version.
:::

## Usage

Execute the `terraform version` command like this:

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

This command displays the Terraform or OpenTofu version, along with the versions of installed providers.

:::info Atmos Behavior
This is a pure passthrough command. Atmos does not perform any special processing for `terraform version`. The command is executed directly without workspace management or variable generation.
:::

## Examples

### Show Version

```shell
# Display Terraform version
atmos terraform version vpc -s dev
```

### Detailed Version Info

```shell
# Show detailed version information
atmos terraform version vpc -s dev -json
```

## Arguments

- **`component` (required)**

  Atmos component name.

## Flags

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

  Atmos stack name where the component is defined.
- **`--dry-run` (optional)**

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

## Native Terraform Flags

This command supports native `terraform version` flags such as `-json` for JSON output with detailed version information.

## 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
