> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ubiquex.io/llms.txt
> Use this file to discover all available pages before exploring further.

# meta

> The meta block sets per-stack deployment configuration — execution context, engine, runtime, and overrides.

The `meta` block configures how a single stack is deployed. It appears inside a `stack` body (at most one per stack) and overrides settings inherited from the workspace or a `context` block — selecting the execution context, engine, runtime, state backend, providers, and other per-stack options. It has no label.

## Syntax

```xcl theme={"theme":"css-variables","languages":{"custom":["/languages/xcl.json"]}}
stack networking {
  meta {
    context = "prod"
    engine  = "pulumi"
    runtime = "python"
  }

  vpc = aws.ec2.Vpc {
    cidr_block = "10.0.0.0/16"
  }
}
```

## Fields

| Field     | Type   | Description                                                      |
| --------- | ------ | ---------------------------------------------------------------- |
| `name`    | string | Explicit Pulumi stack name override                              |
| `context` | string | Name of a declared `context` block to inherit from               |
| `engine`  | string | Execution engine: `native`, `pulumi`, `terraform`, or `opentofu` |
| `runtime` | string | Target runtime (see pairing below)                               |

All fields are optional; unset values fall back to the workspace or context defaults.

## Engine and runtime

`engine` and `runtime` must be paired consistently:

| Engine      | Valid runtimes               |
| ----------- | ---------------------------- |
| `native`    | `xcl`                        |
| `pulumi`    | `python`, `typescript`, `go` |
| `terraform` | — (no runtime)               |

Using `runtime = "xcl"` with any engine other than `native`, or a Pulumi runtime with any engine other than `pulumi`, is a type error.

## Context reference

`context` must name a `context` block declared elsewhere in the program; an unknown name is a type error.

```xcl theme={"theme":"css-variables","languages":{"custom":["/languages/xcl.json"]}}
context "prod" {
  engine  = "pulumi"
  runtime = "python"
}

stack app {
  meta {
    context = "prod"
  }
  // ...
}
```

## Nested blocks

`meta` can also carry per-stack overrides as nested blocks:

* `backend <type> { … }` — state backend for this stack (see [backend](/v1/xcl/language/backend))
* `provider <name> { … }` — provider configuration
* `labels { … }` and `tags { … }` — key/value metadata
* `hooks { … }` — lifecycle hooks

```xcl theme={"theme":"css-variables","languages":{"custom":["/languages/xcl.json"]}}
stack networking {
  meta {
    engine  = "pulumi"
    runtime = "python"

    backend s3 {
      bucket = "my-state-bucket"
      key    = "ubx/networking"
    }

    tags {
      team = "platform"
    }
  }
  // ...
}
```

## Labels

A `labels { }` block attaches key/value labels to the stack:

```xcl theme={"theme":"css-variables","languages":{"custom":["/languages/xcl.json"]}}
stack database {
  meta {
    labels {
      tier = "prod"
    }
  }
  // ...
}
```

These are the labels a `workspace` [`match { }`](/v1/xcl/language/workspace#match-conditional-workspaces) selector matches against to decide which conditional `workspace` blocks apply to this stack. Unlike `tags`, they select configuration rather than being propagated to provisioned resources.
