Creates a new CloudStackReferenceV2 instance.
The name of the stack to reference. Can be a short name (e.g., "my-stack") or a fully qualified name (e.g., "org/project/stage").
Configuration options for the reference.
Optionalstage?: stringThe stage to target. Required if using a short stack name, unless implied by the current environment (e.g., PULUMI_STACK).
ReadonlynameReadonlyorganizationReadonlyoutputsReadonlystageRetrieves an output value from the referenced stack.
The expected type of the output value. Defaults to any.
The name of the output to retrieve.
The output value typed as T, or undefined if the output does not exist.
Retrieves a required output value from the referenced stack.
The expected type of the output value. Defaults to any.
The name of the output to retrieve.
The output value typed as T.
Typed access to outputs from other Pulumi stacks within SST applications.
Unlike the original CloudStackReference, this version directly queries the Pulumi Cloud backend using the CLI, ensuring access to the most up-to-date stack outputs. Outputs are cached per stack to minimize CLI calls, and stack names resolve across organizations and stages.
Example