New to Kestra?
Use blueprints to kickstart your first workflows.
Run an emergency Fastly purge-all safely with Kestra. A confirmation gate blocks accidental runs and every purge leaves a Slack audit trail.
Sometimes the right answer is to burn the whole cache: poisoned content, a leaked document cached at the edge, a config change that corrupted responses site-wide. Fastly's purge-all API is one call, which is exactly the problem, one call that empties every cached object and points all traffic at origin. This blueprint wraps that call in the two things a break-glass action needs: a safety catch and an audit trail. The flow fails immediately unless the confirm input is explicitly set to true, and when it does run, io.kestra.plugin.fastly.purge.All empties the service cache and Slack gets an audit message naming the service, the status, and the execution.
require_confirmation (io.kestra.plugin.core.flow.If) checks the confirm input, which defaults to false. Unconfirmed, the nested abort_unconfirmed task (io.kestra.plugin.core.execution.Fail) stops the flow with a message spelling out what the purge would have done.purge_everything (io.kestra.plugin.fastly.purge.All) purges the entire cache of service_id. Its status output feeds the audit message.audit_message posts the service, purge status, flow, and execution ID to Slack, with a reminder to watch origin load while the cache refills.errors block posts to the same channel on any failure, which includes refused unconfirmed attempts, so even someone poking the button leaves a trace.The Fastly console and API will happily purge everything with no confirmation, no record beyond an API log, and no notification to the team about to see origin load spike. Kestra adds the guardrails without slowing the emergency: the confirmation gate is one input toggle in the execution form, the audit lands in Slack automatically, and every attempt, refused or executed, is preserved in the execution history for the postmortem.
FASTLY_API_TOKEN: Fastly API token with purge scope.SLACK_WEBHOOK_URL: Slack incoming webhook URL.service_id set and confirm it refuses with the confirmation message.confirm set to true against a staging service and check the Slack audit message.io.kestra.plugin.core.flow.Pause for a second approval step, so one person requests and another approves from the Kestra UI.io.kestra.plugin.fastly.purge.Keys for anything short of a true emergency, as the CMS surrogate purge blueprint shows.