> ## Documentation Index
> Fetch the complete documentation index at: https://ravion-b90c0359-mintlify-710044b6.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ravion terraform

> Manage Terraform Cloud credentials, providers, state workspaces, and resources connected to Ravion from the `ravion terraform` CLI command group.

## `ravion terraform`

terraform manages Terraform credential helpers and related resources. Use
`ravion terraform shell` to spawn either an interactive \$SHELL -i (no `-- cmd`) or the
command after `--` once, with TF\_CLOUD\_HOSTNAME, TF\_CLOUD\_ORGANIZATION,
TF\_WORKSPACE, and TF\_TOKEN\_\<host> wired so terraform/tofu talks directly
to the Ravion cloud using your CLI session access token.

**Aliases:** `tf`

```bash theme={null}
ravion terraform [command]
```

### `ravion terraform execution-summary`

Manage terraform execution summaries

**Aliases:** `execution-summaries`

#### `ravion terraform execution-summary get`

Get terraform execution summary

```bash theme={null}
ravion terraform execution-summary get <id> [flags]
```

**Flags:**

| Flag     | Required | Description           |
| -------- | -------- | --------------------- |
| `--json` |          | emit response as JSON |

#### `ravion terraform execution-summary list`

List persisted Terraform execution summaries. Runs that fail before Terraform report generation do not produce a summary; use `ravion pipeline run list --stack-id &lt;id&gt;` to list every execution attempt.

```bash theme={null}
ravion terraform execution-summary list [flags]
```

**Flags:**

| Flag                           | Required | Description                                                                                                                                   |
| ------------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `--json`                       |          | emit response as JSON                                                                                                                         |
| `--pipeline-id <string>`       |          | Pipeline ID to filter by - returns available summaries for runs of this pipeline                                                              |
| `--pipeline-run-id <string>`   |          | Pipeline run ID to filter by                                                                                                                  |
| `--stack-id <string>`          |          | Stack ID to filter by. Runs without a Terraform report are excluded; use ravion pipeline run list --stack-id STACK\_ID to list every attempt. |
| `--step-execution-id <string>` |          | Step execution ID to filter by (optional)                                                                                                     |
| `-v, --verbose`                |          | show full output                                                                                                                              |

### `ravion terraform resource`

Manage terraform resources

**Aliases:** `resources`

#### `ravion terraform resource change-summary`

Get resource change summary

```bash theme={null}
ravion terraform resource change-summary <address> [flags]
```

**Flags:**

| Flag                     | Required | Description                                         |
| ------------------------ | -------- | --------------------------------------------------- |
| `--pipeline-id <string>` | yes      | Pipeline ID to get changelog from (required)        |
| `--from-run-id <string>` |          | Filter to runs starting from this run ID (optional) |
| `--json`                 |          | emit response as JSON                               |
| `--to-run-id <string>`   |          | Filter to runs up to this run ID (optional)         |

#### `ravion terraform resource get`

Get terraform resource

```bash theme={null}
ravion terraform resource get <id> [flags]
```

**Flags:**

| Flag     | Required | Description           |
| -------- | -------- | --------------------- |
| `--json` |          | emit response as JSON |

#### `ravion terraform resource list`

List terraform resources

```bash theme={null}
ravion terraform resource list [flags]
```

**Flags:**

| Flag                           | Required | Description                                                                                       |
| ------------------------------ | -------- | ------------------------------------------------------------------------------------------------- |
| `--cursor <string>`            |          | cursor                                                                                            |
| `--json`                       |          | emit response as JSON                                                                             |
| `--limit <int>`                |          | limit                                                                                             |
| `--pipeline-run-id <string>`   |          | Pipeline run ID to filter by (mutually exclusive with stackId)                                    |
| `--run-type <string>`          |          | Run type to filter by (optional, requires pipelineRunId). Available values: PLAN, APPLY, DESTROY. |
| `--stack-id <string>`          |          | Stack ID to filter by (mutually exclusive with pipelineRunId)                                     |
| `--step-execution-id <string>` |          | Step execution ID to filter by (optional, requires pipelineRunId)                                 |
| `-v, --verbose`                |          | show full output                                                                                  |

### `ravion terraform shell`

shell spawns either an interactive \$SHELL -i (no `-- cmd`) or the
command after `--` once, with TF\_CLOUD\_HOSTNAME, TF\_CLOUD\_ORGANIZATION,
TF\_WORKSPACE, and TF\_TOKEN\_\<host> wired so terraform/tofu talks directly
to the Ravion cloud using your CLI session access token.

Pass --workspace \<name> to select a Terraform state workspace non-interactively (skips the picker);
the module-instance delete output prints the exact value to back up its state.

**Aliases:** `sh`

```bash theme={null}
ravion terraform shell [--workspace <name>] [-- cmd args...] [flags]
```

**Flags:**

| Flag                   | Required | Description                                                                    |
| ---------------------- | -------- | ------------------------------------------------------------------------------ |
| `--workspace <string>` |          | Select this Terraform state workspace by name, skipping the interactive picker |

### `ravion terraform state`

state forwards state subcommands to the Terraform or OpenTofu tool used by a managed Ravion state workspace,
wiring up the cloud backend in a local cache first — no local config or manual initialization
needed. Examples:

ravion terraform state pull --workspace \<name> > backup.tfstate
ravion terraform state list --workspace \<name>
ravion terraform state show \<address> --workspace \<name>

\--workspace is consumed by ravion; every other flag and arg is passed straight through
to the selected tool's `state` command.

```bash theme={null}
ravion terraform state --workspace <name> <subcommand> [args...]
```

### `ravion terraform workspace`

workspace groups commands that operate on the Terraform state workspaces of the active organization. Run `ravion switch` first to choose an organization. State workspace selection happens when you run `ravion terraform shell` or pass `--workspace` to `ravion terraform state`.

#### `ravion terraform workspace list`

List Terraform state workspaces in the active organization

```bash theme={null}
ravion terraform workspace list
```
