Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pulumi-stacks provide example #13807

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Jeroendevr
Copy link

A little example how the stack and stacks work together

Proposed changes

The pulumi-stacks documentation was not directly clear to me. The variables stacks and stack made it a little bit confusing.

Comment

I am a beginner in Pulumi so I came across this documentation.
For a maintainer or a experiences user I would also like an example how you could use different stacks together. Now vpcInfra is linked to the vpc-infra project on the dev stack. But I guess its use is to set the vpcId based on the current stack and not hard to the vpc-infra/dev.

So something like

values:
  stackRefs:
    fn::open::pulumi-stacks:
       stacks:
        vpcInfra:
          stack: vpc-infra/{current-stack}

or is there a better way to do this?

A little example how the stack and stacks work together
@Jeroendevr Jeroendevr marked this pull request as ready for review January 14, 2025 10:41
@Jeroendevr Jeroendevr requested a review from a team as a code owner January 14, 2025 10:41
@Jeroendevr
Copy link
Author

Perhaps I understand it a little bit better now. One should not simply create a dynamic environment (one which loads the current stack). But create two seperate environments en load each environment into the appropriate stack. This would have just a little bit of duplicated code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant