Cloudflare DNS
dns.cloudflare
Protects against destructive Cloudflare DNS operations like record deletion, zone deletion, and targeted Terraform destroy.
- 4blocking rules
- 3safe patterns
- 1Critical
- 3High
[packs]
enabled = ["dns.cloudflare"]Evaluated when a command contains wrangler, cloudflare, api.cloudflare.com, dns-records.
Blocking rules
Each rule ID is dns.cloudflare:<name>. Use it in allowlists and [policy.rules].
Criticalcloudflare-api-delete-zonecurl -X DELETE against /zones/{id} deletes a Cloudflare zone.
Explanation
Deleting a zone removes ALL DNS records, page rules, firewall rules, and settings for that domain. This can cause complete outage for all services on the domain with no easy recovery. Safer alternatives: - Export full zone configuration first - Remove individual records instead of the entire zone - Transfer domain to another Cloudflare account if needed
Highcloudflare-api-delete-dns-recordcurl -X DELETE against /dns_records/{id} deletes a Cloudflare DNS record.
Explanation
API deletion of a DNS record takes effect immediately across Cloudflare's network. There is no confirmation prompt when using curl directly. Safer alternatives: - GET the record first to verify the ID is correct - Use Terraform or Pulumi for auditable, reversible changes - Export zone configuration as backup before deletion
Highcloudflare-terraform-destroy-recordterraform destroy -target=cloudflare_record deletes specific DNS records.
Explanation
Terraform destroy removes DNS records from Cloudflare. While Terraform state tracks the change, the DNS deletion is immediate and can break services. Safer alternatives: - terraform plan -destroy -target=... to preview first - Remove from terraform config and run terraform apply instead - Use terraform state rm to stop managing without deleting
Highcloudflare-wrangler-dns-deletewrangler dns-records delete removes a Cloudflare DNS record.
Explanation
Deleting a DNS record can immediately break connectivity to your website, API, or mail server. Propagation is fast on Cloudflare, so traffic may fail within seconds. Safer alternatives: - wrangler dns-records list to review records first - Export zone file as backup before deletion - Use Cloudflare dashboard for confirmation prompts
Safe patterns
Checked first. A command that matches one is never blocked by this pack.
cloudflare-wrangler-dns-listcloudflare-wrangler-whoamicloudflare-api-get