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

# ravion stack

> Manage Ravion-managed Terraform stacks, inspect resources and state, and trigger plan and apply runs from the `ravion stack` commands.

## `ravion stack`

Manage stacks

**Aliases:** `stacks`

### `ravion stack get`

Get Stack by id

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

**Flags:**

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

### `ravion stack get-lock`

Read a stack's Terraform state lock

```bash theme={null}
ravion stack get-lock <id> [flags]
```

**Flags:**

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

### `ravion stack list`

List Stacks

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

**Flags:**

| Flag                        | Required | Description           |
| --------------------------- | -------- | --------------------- |
| `--cursor <string>`         |          | cursor                |
| `--environment-id <string>` |          | environmentId         |
| `--json`                    |          | emit response as JSON |
| `--limit <int>`             |          | limit                 |
| `--project-id <string>`     |          | projectId             |
| `-v, --verbose`             |          | show full output      |

### `ravion stack resource-count`

Count current-state terraform resources for stacks

```bash theme={null}
ravion stack resource-count [flags]
```

**Flags:**

| Flag             | Required | Description                                     |
| ---------------- | -------- | ----------------------------------------------- |
| `--id <strings>` | yes      | Stack IDs to count current-state resources for. |
| `--json`         |          | emit response as JSON                           |

### `ravion stack trigger-pipeline`

Trigger a pipeline run for a stack

```bash theme={null}
ravion stack trigger-pipeline <id> [flags]
```

**Flags:**

| Flag                       | Required | Description                                                         |
| -------------------------- | -------- | ------------------------------------------------------------------- |
| `--description <string>`   | yes      | User-provided description of this pipeline run                      |
| `--pipeline-type <string>` | yes      | Which stack pipeline to trigger. Available values: change, destroy. |
| `--autoapprove`            |          | Pass autoapprove=true to stack change pipeline runs when supported. |
| `--json`                   |          | emit response as JSON                                               |

### `ravion stack unlock`

Force-release a stack's Terraform state lock

```bash theme={null}
ravion stack unlock <id> [flags]
```

**Flags:**

| Flag        | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ----------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--force`   |          | Release the lock while a run is still active on the stack. This covers a run that never completes and does not respond to cancellation, which is not expected behaviour. That run keeps going, and its state write is refused once the lock is gone, so the run fails and any cloud resources it already changed go unrecorded. State from completed operations is untouched. Cancel the run first whenever cancellation succeeds. |
| `--json`    |          | emit response as JSON                                                                                                                                                                                                                                                                                                                                                                                                              |
| `-y, --yes` |          | skip confirmation prompt                                                                                                                                                                                                                                                                                                                                                                                                           |
