sparse-intern-71089
03/31/2022, 11:47 AMlimited-rainbow-51650
03/31/2022, 11:49 AMlimited-rainbow-51650
03/31/2022, 11:50 AMechoing-postman-88590
03/31/2022, 11:51 AMlimited-rainbow-51650
03/31/2022, 11:56 AMlimited-rainbow-51650
03/31/2022, 12:00 PMStackReferences
.echoing-postman-88590
03/31/2022, 12:22 PMSTackReferences
?
Thank you very muchechoing-postman-88590
03/31/2022, 12:29 PMechoing-postman-88590
03/31/2022, 12:29 PMechoing-postman-88590
04/04/2022, 11:39 AM$ tail */*
==> company/Pulumi.yaml <==
name: stackreference-company
runtime: python
description: company
template:
description: A minimal AWS TypeScript Pulumi program
config:
companyName:
description: The company name to use
==> company/__main__.py <==
import pulumi
config = pulumi.Config()
companyName = config.require("companyName")
==> department/Pulumi.yaml <==
name: stackreference-department
runtime: python
description: department
template:
description: A minimal AWS TypeScript Pulumi program
config:
departmentName:
description: The department name to use
==> department/__main__.py <==
import pulumi
config = pulumi.Config()
companyName = config.require("departmentName")
==> team/Pulumi.yaml <==
description: team
template:
description: A minimal AWS TypeScript Pulumi program
config:
companyStack:
description: The stack to reference company properties from
departmentStack:
description: The stack to reference department properties from
teamName:
description: The team name to use
==> team/__main__.py <==
import pulumi
config = pulumi.Config()
companyStack = pulumi.StackReference(config.require("companyStack"))
departmentStack = pulumi.StackReference(config.require("departmentStack"))
If I run:
$ pulumi login --local
$ pulumi stack init dev
Created stack 'dev'
$ pulumi config set companyName 'ACME Widget Company'
$ pulumi up --yes
Previewing update (dev):
Type Name Plan
+ pulumi:pulumi:Stack stackreference-company-dev create
Resources:
+ 1 to create
Updating (dev):
Type Name Status
+ pulumi:pulumi:Stack stackreference-company-dev created
Resources:
+ 1 created
Duration: 1s
$ cd ../department
$ pulumi stack init dev
error: stack 'dev' already exists
Am I missing something?
Thankslimited-rainbow-51650
04/04/2022, 11:53 AMdev
for more than 1 project. Getting a number of these issues resolved seems to be on the roadmap for Q2-2022: https://github.com/orgs/pulumi/projects/44/views/1
The issue you are most interested in is this one: https://github.com/pulumi/pulumi/issues/4605
To get around your problem, in ./department
, you could name your stack dev-department
to not have an overlap.No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by