https://pulumi.com logo
Title
k

kind-napkin-54965

09/18/2022, 2:59 PM
Am stuck here. Am wondering how do I do
pulumi refresh
in the interactive mode, if I am using the automation api? I have
stack.refresh(on_output=print)
in my code. Do I need to adjust code somehow, or is interactive mode not available for automation api? Thanks!
l

little-cartoon-10569

09/18/2022, 7:50 PM
Once created, you can access a stack without its yaml files, by using the
--stack
option (
-s
). You will need to be logged in to the correct backend (
pulumi login
), but that's all.
So this should work:
pulumi refresh --stack beautynew/gcp-pubsub-new/devnew
k

kind-napkin-54965

09/19/2022, 8:18 AM
Thanks a lot, @little-cartoon-10569!
% pulumi refresh --stack beautynew/gcp-pubsub-new/devnew
error: no Pulumi.yaml project file found (searching upwards from /Users/<...>/iac-pulumi-py-gcp-pubsub). If you have not created a project yet, use `pulumi new` to do so: no project file found
sadly can't get this workering! I've doublechecked - I have the latest version of pulumi. Any other ideas maybe? Thanks a lot!
l

little-cartoon-10569

09/26/2022, 8:18 PM
Wow, that's annoying.. it works with
pulumi destroy
. Well, the Pulumi.yaml file is very simple, you could create one in a temporary directory just for this action...
🙇‍♂️ 1