I confirmed this, but is there a way to output with the command without having to deploy that code?
l
little-cartoon-10569
05/29/2022, 8:13 PM
No. Stack outputs reflect what's in the Pulumi state, not what's in the code. If you have an output set to value 4, then
up
, then set the value to 5, then the stack output is still 4: it is intentionally the deployed value.
little-cartoon-10569
05/29/2022, 8:14 PM
This is the model required by declarative deployment technologies. Code expresses the intention, not necessarily what is deployed. State describes what (Pulumi) believes is deployed.
s
sticky-answer-6826
05/30/2022, 8:18 PM
Makes sense. That's what I figured from my understanding but it's great to hear from the experts. Thanks!
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.