Skip to main content
The 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

remote networking {
  stack   = "prod-networking"
  backend = "s3://my-bucket/platform"  // optional
}
FieldRequiredDescription
stackyesFully-qualified name of the remote stack
backendnoState backend URL for the remote stack
A 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 as remote.<name>.<output>.
The block compiles to a Pulumi 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 with remote.<name>.<output>:
remote networking {
  stack = "prod-networking"
}

stack application {
  instance = aws.ec2.Instance {
    subnet_id       = remote.networking.subnet_id
    security_groups = remote.networking.security_group_ids
  }
}
Remote outputs are pending values — they resolve at apply time by reading the remote stack’s state. Output names are recorded as dependencies but not hard-validated, so a typo surfaces at apply time rather than at compile time.

How it works

The Pulumi engine generates a StackReference to the remote stack, and each remote.<name>.<output> becomes a get_output call:
networking_ref = pulumi.StackReference("prod-networking")
subnet_id = networking_ref.get_output("subnet_id")

vs cross-stack references

Within a single workspace, use the @stack.output syntax instead:
@stack.outputremote <name>
ScopeSame workspaceA separately deployed stack
Syntax@networking.vpc_idremote.networking.vpc_id
DeclarationImplicitExplicit remote block with stack