Is it possible to call an API in my code during a ...
# general
e
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
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
thanks
b
you could also call the API from within an
apply
or use a dynamic provider