https://pulumi.com logo
#general
Title
# general
e

early-intern-90238

10/20/2022, 1:29 AM
Is it possible to call an API in my code during a pulumi up? Like as the last step I want to call an API to clear my cloudflare cache for example
l

little-cartoon-10569

10/20/2022, 1:36 AM
It would be better to call this after your
pulumi up
, since your code is run before the engine does its thing and makes the changes.
You can either call
pulumi up
from another app/script, which does that work, or you can use automation-api to do that.
That allows you to embed your Pulumi code within a larger app, that includes things like using the just-provisioned infrastructure.
e

early-intern-90238

10/20/2022, 1:45 AM
thanks
b

billowy-army-68599

10/20/2022, 2:30 AM
you could also call the API from within an
apply
or use a dynamic provider
2 Views