What's generally the way one would access Pulumi s...
# getting-started
What's generally the way one would access Pulumi stack outputs in other non-Pulumi projects? For example I've got a CICD workflow where I want to push a new container image to a ECR repo. Said repo gets created by my Pulumi stack.. Any suggestions on how to pass along the details of that ECR repo to my workflow?
☝️ 1
A common way is by “shelling out” to the Pulumi CLI and just calling
pulumi stack output
, passing the stack and the output as arguments. We do this, for example, to fetch URLs produced by other stacks in the organization, such as here, where pulumi.com needs a URL produced by another stack in the organization: https://github.com/pulumi/docs/blob/0f7f91843ba78fc09b0dfad37fc47b83c2ed08c3/scripts/build-site.sh#L8
And then the website (a Hugo static site) refers to that environment variable at build-time: https://github.com/pulumi/pulumi-hugo/blob/3a224af22df190b3f89164237b05ac338d8ed8a9/themes/default/layouts/partials/convert.html#L18
Ah, of course! I was actually aware of stack outputs, but I never thought of the idea of just simply using the pulumi CLI wherever I need it 😄 Thanks a lot guys!
👍 1