sparse-intern-71089
05/06/2023, 10:16 AMmillions-furniture-75402
05/08/2023, 11:01 AMvariables:
vpcId: ${shared-infrastructure.outputs["vpcId"]}
resources:
shared-infrastructure:
type: pulumi:pulumi:StackReference
properties:
name: ${sharedInfrastructureStackName}
shared-vpc:
type: aws:ec2/vpc:Vpc
get:
# This fails as a stack reference, but succeeds if I hardcode the VPC ID here
id: ${vpcId}
millions-furniture-75402
05/08/2023, 11:02 AMmillions-furniture-75402
05/08/2023, 11:02 AMechoing-dinner-19531
05/08/2023, 11:53 AMpulumi convert --language typescript
and see what TS code it gives you and see if that program works as expected. If it does then it's probably a bug in the yaml runtime.millions-furniture-75402
05/08/2023, 1:30 PMconst sharedInfrastructure = new pulumi.StackReference("shared-infrastructure", {name: sharedInfrastructureStackName});
const vpcId = sharedInfrastructure.outputs.vpcId;
const sharedVpc = new aws.ec2.Vpc("shared-vpc", {});
echoing-dinner-19531
05/08/2023, 1:31 PMmillions-furniture-75402
05/08/2023, 1:31 PMmillions-furniture-75402
05/08/2023, 1:32 PM--out
flag, it overwrote my Pulumi.yaml
millions-furniture-75402
05/08/2023, 1:33 PMechoing-dinner-19531
05/08/2023, 1:35 PMpulumi new
and require --out to be empty. Worth raising another issue at https://github.com/pulumi/pulumi/issues to point out this UX is not ideal as is though, we can take some ideas of what would be the most preferable behaviour.millions-furniture-75402
05/08/2023, 1:36 PMmillions-furniture-75402
05/08/2023, 5:46 PM