https://pulumi.com logo
#getting-started
Title
# getting-started
c

creamy-knife-93354

05/09/2021, 2:35 PM
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?
b

billowy-army-68599

05/09/2021, 4:27 PM
☝️ 1
m

miniature-musician-31262

05/09/2021, 5:09 PM
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
c

creamy-knife-93354

05/10/2021, 7:18 AM
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
3 Views