Cloudflare: Installation & Configuration

The Pulumi Cloudflare provider uses the Cloudflare SDK to manage resources.

Installation

The Cloudflare provider is available as a package in all Pulumi languages:

Configuring The Provider

Pulumi relies on the Cloudflare SDK to authenticate requests from your computer to Cloudflare. Your credentials are never sent to pulumi.com. Once the credentials are obtained, there are two ways to communicate your configuration parameters to Pulumi:

  1. Set the environment variable CLOUDFLARE_API_TOKEN (or the legacy CLOUDFLARE_EMAIL and CLOUDFLARE_API_KEY):

    $ export CLOUDFLARE_API_TOKEN=YYYYYY
    # Legacy
    $ export CLOUDFLARE_EMAIL=XXXXXX
    $ export CLOUDFLARE_API_KEY=YYYYYY
    
  2. If you prefer that they be stored alongside your Pulumi stack for easy multi-user access:

    $ pulumi config set cloudflare:apiToken --secret
    # Legacy
    $ pulumi config set cloudflare:email XXXXXX
    $ pulumi config set cloudflare:apiKey YYYYYY --secret
    

The complete list of configuration parameters is in the Cloudflare provider README.