-
Notifications
You must be signed in to change notification settings - Fork 71
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
Support for 'stack output' command #868
Comments
This seems a reasonable request. I'm a little hesitant about the action just becoming a shim over everything the CLI does, and this is another small tick towards that, but I think this still has justification. You linked commit looks reasonable, I'm surprised it didn't just work. I think we can probably take that pretty much as is and go work out what little bits missing to make it work. |
TBH I dont see much wrong about the action becoming a wrapper for the CLI =D Since it only runs the command behind the scenes it feels there is not much duplication and maintenance needed. Anyway, this particular command surely has a value for CI/CD. As for the implementation, maybe it's just me testing it incorrectly. I'll make a PR and you can check it yourself. |
I'm playing a bit with Pulumi and Kubernetes with github actions and I just this issue It would be great to have this, because in my case, if nothing has changed in my pulumi folder I skip the pulumi job. Being able to access pulumi secrets / outputs in other jobs without a preview or up would be great. |
we've just found some more scenarios where we need to construct a pretty ugly and error pron bash script to get the outputs, while this feature seems to be quite close to finishing with my PR, any chances we'll see it merged soon? |
Hi Mikocot, |
Looking at the likes it's not only our project that would benefit from this one :) The PR is still up for merge |
+1 for being able to run |
This was actually released in v5.1.0 |
Cannot close issue:
Please fix these problems and try again. |
Cannot close issue:
Please fix these problems and try again. |
Actually there is an issue with this implementation, which I believe was not a problem in our CI/CD back when I did the initial PR. But it is now, when it became more complex with jobs being more isolated and have no access to the original code. As this action reuses logic for the other commands (up/preview...) it runs first the So when we replaced the original workaround:
to:
It fails with:
the same behavior is visible with CLI: |
For me, the |
From a quick look it needs a bit of a rewrite, I think it wasn't properly tested before merging my draft. How I see it done to be correct:
So long story short, create inline LocalWorkspace (as you do for createStack), use that workspace to run CLI's pulumi stack outputs, parse the outputs the same way it's done currently. |
Sounds like this should re-open to track that it's not yet usable. |
Any updates here? would love to switch to |
Hello!
Issue details
output
command support to actionsThere are multiple scenarios where it's useful to fetch outputs from a stack without having to first call
preview
orup
.. Reading outputs is fast and has no side effects. while lets you access stack configuration that may not be available anywhere else.For now we are running
pulumi stack output
as bash code in our pipeline, but this is ugly and hard to maintain. It's also especially annoying as the whole logic to pass outputs and secrets into github workflow is already there and triggered as part of callingup
/preview
/refresh
/.... All it takes is to allow that same logic by itself.Affected area/feature
I have looked into solving it myself and it looks like a very subtle change. Please see:
support for stack output
Yet, for some reason the outputs don't seem to be rendered and I don't really have the test environment and sufficient understanding of underlying system to investigate it. I guess some preconditions might need to be met before
stack.outputs()
is called or some configuration needs to be adapted.The text was updated successfully, but these errors were encountered: