Skip to content

Conversation

@Jeroendevr
Copy link
Contributor

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
Contributor 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.

@shughes26
Copy link
Contributor

Hi Jeroen, thanks for contributing!

Because ESC only supports YAML, the example code provided in python will not work. We would otherwise like to use your stacks description clarification. If you could remove the python code sample and add a period to the end of the stacks description, that would be amazing!

remove python code part and add period
@Jeroendevr
Copy link
Contributor Author

Thanks for reviewing and accepting the contribution. Here you go.

Copy link
Contributor

@thoward thoward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making those changes, @Jeroendevr. We appreciate the contribution!

@thoward thoward merged commit be68b81 into pulumi:master May 15, 2025
7 of 8 checks passed
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.

3 participants