Docs
Plugins
Sources
Cloudflare
Overview

Cloudflare Source Plugin

Latest: v3.3.1

The CloudQuery Cloudflare plugin pulls configuration out of Cloudflare resources and loads it into any supported CloudQuery destination (e.g. PostgreSQL, BigQuery, Snowflake, and more).

Authentication

In order to fetch information from Cloudflare, cloudquery needs to be authenticated. There are a few options for authentication:

  • Export the CLOUDFLARE_API_TOKEN environment variable
  • Export the CLOUDFLARE_EMAIL and CLOUDFLARE_API_KEY environment variables
  • Specify either the api_token or api_email, api_key parameters in the YAML configuration (See Configuration for more details).

The plugin requires only read permissions. To start, Cloudflare has a read all resources API token template (opens in a new tab) that will grant CloudQuery the necessary permissions to fetch information from Cloudflare. As necessary, those permissions can be refined and modified further to meet your needs.

Query Examples

Find all zones with dev_mode enabled

SELECT id, account_id, host_name, name, original_ns FROM cloudflare_zones WHERE dev_mode = true;

Find all DNS records

SELECT id, account_id, zone_id, name, type FROM cloudflare_dns_records;