I’m trying to interact with pulumi-cloudflare, tho...
# general
i
I’m trying to interact with pulumi-cloudflare, though it is not clear to me how the pulumi lib maps to the api. Specifically I’m looking to purge cache by url after a pulumi deployment (https://api.cloudflare.com/#zone-purge-files-by-url). Neither the reference docs nor github have given me a clue here how to essentially
POST zones/:identifier/purge_cache
. What am I missing? Any pointers to samples or docs?
Now how does this translate to pulumi?
w
That code you linked is not in the Terraform provider, it’s in the vendored cloudflare SDK. Given that this is a very “imperative” action, it’s possible it is not directly supported in the Terraform/Pulumi resource model. That said, you should be able to use the CloudFlare JS sdk directly to do this inside an apply callback to script the imperative action into your Pulumi deployment.
👍 1
h
tbh, i'm a little surprised pulumi doesn't do this?
i
it is imperative vs declarative, so makes sense.
w
tbh, i'm a little surprised pulumi doesn't do this?
Doesn't do what exactly?
h
like, if pulumi detects a change, it should ask the CDN to flush?