New to Kestra?
Use blueprints to kickstart your first workflows.
Automate a Cloudflare canary release with Kestra: upsert DNS to a canary IP, purge cache, allow test traffic, pause for validation, then promote or roll back.
Ship production changes behind Cloudflare safely with a canary deployment that shifts traffic to a new backend IP, gives you a validation window, and rolls back automatically if you do not promote. This blueprint solves the classic problem of risky DNS cutovers: instead of flipping a record and hoping, it sequences the DNS change, cache purge, and WAF allow rule, then waits for human or metric driven sign off before committing. It uses the official Kestra Cloudflare plugin, so the entire canary release lives in declarative, version controlled YAML rather than scattered scripts and console clicks.
upsert_canary_dns (io.kestra.plugin.cloudflare.dns.records.Upsert) points host_name at canary_ip for the given record_type, with a low TTL so the change propagates fast.purge_canary (io.kestra.plugin.cloudflare.cache.Purge) clears the cached URL for the hostname so live requests reach the canary instead of stale cached responses.allow_canary_source (io.kestra.plugin.cloudflare.waf.accessrules.Create) adds a temporary whitelist IP access rule for allow_ip, letting your test source through the WAF.wait_for_validation (io.kestra.plugin.core.flow.Pause) holds for pause_duration (default PT15M) while you check traffic, metrics, and health.cleanup (io.kestra.plugin.core.flow.Switch) branches on the promote input: true logs the promotion and keeps DNS as is, while false reverts DNS to original_ip (Upsert) and deletes the temporary access rule (io.kestra.plugin.cloudflare.waf.accessrules.Delete).Cloudflare gives you DNS, cache, and WAF APIs, but it has no native scheduler to sequence them into a guarded release with a wait gate and conditional rollback. Kestra adds event triggers and APIs to kick the canary off from CI or a webhook, retries on transient API failures, full execution lineage so every DNS flip and rule change is recorded, and a declarative YAML definition you can version and review. The Pause and Switch tasks turn promote or rollback into first class workflow logic instead of manual console steps.
CLOUDFLARE_API_TOKEN: a scoped Cloudflare API token with Zone:Read, Zone:DNS:Edit, Zone:Cache Purge:Edit, and Firewall:Edit (or equivalent granular scopes).CLOUDFLARE_API_TOKEN.zone_id, host_name, canary_ip, and original_ip. Optionally set allow_ip, record_type (default A), and pause_duration.promote set to true to keep it or false to roll back.Pause with an automated health check (HTTP request plus a conditional task) that sets promote for you.Schedule or webhook trigger to start canaries straight from your CI pipeline.