output block declares values that are exported from a stack. Outputs become pulumi.export() calls in the generated Python program. Other stacks can consume them via @stackName.outputName cross-stack references.
Syntax
Example
Referencing outputs from other stacks
Once a stack exports an output, a sibling stack can reference it with@stackName.outputName:
What expressions are valid
Output field values can reference:- Resource outputs:
vpc.id,subnets.id - Input fields:
input.vpc_cidr - Locals fields:
locals.computed_value - Cross-stack refs:
@otherStack.someOutput - Literals:
"static",42,true
Duplicate field names
Output field names must be unique across alloutput blocks in the stack:
Multiple output blocks
A stack may have multipleoutput blocks (typically one per file). All field names share a flat namespace.
