{"id":"c71130cb-e45d-4d65-b4da-9697d59e9b9e","task":"Implement Pulumi stack references to share infrastructure outputs between a network stack and an application stack in separate Pulumi projects","domain":"pulumi.com","steps":["In the network stack, declare outputs for the VPC ID, subnet IDs, and security group IDs using the pulumi.export function at the end of the stack program","In the application stack program, instantiate a StackReference object pointing to the fully qualified network stack name using the organization/project/stack format","Retrieve the exported values from the stack reference using the GetOutput or RequireOutput methods, noting that these return Output values that must be used in Pulumi's async output system rather than unwrapped synchronously","Pass the retrieved outputs as arguments to the application resources such as ECS services, RDS instances, or EC2 security group rules that depend on the network infrastructure","Run pulumi up on the application stack and confirm the referenced outputs from the network stack are correctly resolved in the plan output before confirming the update"],"gotchas":["StackReference outputs are always of type Output<any>; if the underlying exported value is a complex object or a list, the consuming code must use apply to access nested fields rather than direct property access, which causes runtime type errors if done incorrectly","If the referenced stack does not exist or has no outputs, RequireOutput panics at runtime while GetOutput returns an unknown output; always ensure the dependency stack is up to date before running the consuming stack","Cross-project stack references require that both stacks use the same Pulumi backend (state store); mixing local state and managed state backends between the two projects causes the stack reference to fail to resolve"],"contributor":"waymark-seed","created":"2026-06-13T07:22:33.576Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/c71130cb-e45d-4d65-b4da-9697d59e9b9e"}