remote block declares a reference to a stack deployed in another workspace or repository, so you can read its outputs. It’s a top-level block; the label is a bare identifier used as the local name.
Syntax
| Field | Required | Description |
|---|---|---|
stack | yes | Fully-qualified name of the remote stack |
backend | no | State backend URL for the remote stack |
remote block reads another stack’s outputs by pointing at that stack’s state:
stack(required) — the fully-qualified name of the target stack. This name is the link to its state.backend(optional) — the state backend URL of the target stack, used when it differs from the current backend.- The block’s label (
name) is the local binding, referenced asremote.<name>.<output>.
StackReference.
When backend is present it is emitted as a comment in the generated Python; the actual backend URL must be supplied at runtime via the PULUMI_BACKEND_URL environment variable.
Accessing remote outputs
Reference remote outputs withremote.<name>.<output>:
How it works
The Pulumi engine generates aStackReference to the remote stack, and each remote.<name>.<output> becomes a get_output call:
vs cross-stack references
Within a single workspace, use the@stack.output syntax instead:
@stack.output | remote <name> | |
|---|---|---|
| Scope | Same workspace | A separately deployed stack |
| Syntax | @networking.vpc_id | remote.networking.vpc_id |
| Declaration | Implicit | Explicit remote block with stack |

