This message was deleted.
s
This message was deleted.
e
No. There's no synchronisation like that between stacks.
c
Can I create such mechanism by polling the output? I'm using python.
e
You could use a shell script or the automation api to keep asking for "stack output" till you get something and then run "pulumi up" after
c
I want to ask it while the deployment is running do
pulumi up
to all and when I need the output do the poling.
e
Right you can do that using automation api. It's a bit of an odd program setup because it's going to just block "pulumi up" till the outputs resolve, but it's possible: https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/pulumi/automation/#Workspace-stackOutputs
c
I thought of something like this:
Copy code
while True:
      my_stack = pulumi.StackReference("my-stack")
      value = my_stack.get_output(key)
      if value:
         return value
      time.sleep(10)
e
That will crash in a pulumi program because it will try to create two resources called "my-stack"
You need to use automation api to do this
c
I'm using automation and LocalWorkspace I will need to refresh the stack each time I query the outputs right?`
e
stackOutputs
will do a fetch each time you call it
c
Thanks!