Does anyone have an example where they have automa...
# automation-api
b
Does anyone have an example where they have automation reference a stack in a different project? Ideally such that that project's pulumi.yaml and stack config are not accessible to the automation? To put this in context: I have a project called "baseline-infra" which is your traditional pull-request based IaC with automation pipeline. Next, I'm going to have a k8s-components which, ideally, should have stacks which reference their reciprocal stacks.. i.e. Baseline-Infra::dev.infra.project1 is the source stack for k8s-components::dev.k8s.project1 .. if it helps, both projects will keep their state in the same azure blob.
l
g
BTW stack references can only be used when using Pulumi Service, or can be used for example with S3 as a backend?
b
there don't seem to be any options indicating how it would be able to retrieve a stack from a specified backend..
b
You can use stack references from any backend. A user wrote a blog post on this recently which I'm just hunting out
👀 1
b
yup - read that - just didn't see how it magically figured out where that stack was located.. I'm presuming that the stack location MUST be in the same backend (whatever that might be) as the current project configuration right?
b
Yes, it has to be in the same backend
b
well, might as well test it out 🙂 /me crosses fingers that I don't magically wipe things out 😄
g
awesome stuff
thanks for sharing
@brave-planet-10645
b
🙂
So the stack reference is read only. You're basically reading in the outputs from other stacks
g
great, totally reasonable
b
Also, if you change the value of an output, the "reader" stack won't get the new value until you run pulumi up on that one
g
great 👍