https://pulumi.com logo
#automation-api
Title
# automation-api
f

flaky-school-82490

05/11/2022, 9:23 AM
Hi, is it possible to observe the status of a resource (in particular whether the resource creation is complete) using the #automation-api? The problem I am trying to solve is waiting for an Azure resource to be asynchronously provisioned before starting to create another resource that depends on it.
b

billowy-army-68599

05/11/2022, 2:12 PM
@flaky-school-82490 you don't need automation api for this. Are you using depends on? Pulumi should handle this automatically
f

flaky-school-82490

05/11/2022, 2:54 PM
Thanks for the quick reply @billowy-army-68599 . I have not tried DependsOn. Does it handle cases where resources are created asynchronously and may take a little while?
b

billowy-army-68599

05/11/2022, 2:58 PM
Yes
f

flaky-school-82490

05/11/2022, 2:58 PM
Awesome thanks!
(out of curiosity, do you have any links that explains how it works under the hood? Does pulumi repeatedly ping the resource until it is ready?)
f

flaky-school-82490

05/11/2022, 3:08 PM
Thanks. From "When the operation to create this bucket is complete, the engine records information about the newly created resource in its state file.", my question is: How does Pulumi know the bucket creation is complete? https://www.pulumi.com/docs/intro/concepts/how-pulumi-works/#:~:text=When%20the%20operation%20to%20create%20this%20bucket%20is%20complete%2C%20the%20engine%20records%20information%20about%20the%20newly%20created%20resource%20in%20its%20state%20file.
b

billowy-army-68599

05/11/2022, 3:15 PM
The cloud provider outputs are resolved. It pools the api waiting for the properties to appear
🙌 1
f

flaky-school-82490

05/11/2022, 3:17 PM
Got it, thanks again @billowy-army-68599!
5 Views