turbot/cloudflare

steampipe plugin install cloudflaresteampipe plugin install cloudflare

Cloudflare

Query your Cloudflare infrastructure including zones, DNS records, accounts and more.

Installation

Download and install the latest Cloudflare plugin:

steampipe plugin install cloudflare

Connection Configuration

Connection configurations are defined using HCL in one or more Steampipe config files. Steampipe will load ALL configuration files from ~/.steampipe/config that have a .spc extension. A config file may contain multiple connections.

Installing the latest cloudflare plugin will create a connection file (~/.steampipe/config/cloudflare.spc) with a single connection named cloudflare. You must modify this connection to include your personal credentials.

An API Token is the recommended way to set credentials. Read scope is required (write is not):

connection "cloudflare" {
plugin = "cloudflare"
token = "psth3GX0qHavRYE-hd5y7_iL7piII6C8jR3FOuW3"
}

It's also valid to use an email and API key:

connection "cloudflare" {
plugin = "cloudflare"
email = "pam@dundermifflin.com"
api_key = "2980b99351d629a537f1440e12b5b97a135b7"
}

Credentials are resolved in this order:

  1. token in Steampipe config.
  2. email and api_key in Steampipe config.
  3. CLOUDFLARE_API_TOKEN environment variable (like Terraform).
  4. CLOUDFLARE_EMAIL and CLOUDFLARE_API_KEY environment variables (like Terraform).
  5. CF_API_TOKEN environment variable (like flarectl).
  6. CF_API_EMAIL and CF_API_KEY environment variables (like flarectl).

Scope

A Cloudflare connection is scoped to a single Cloudflare account, with a single set of credentials.