2014-07-25 18:28:11 +02:00
---
layout: "cloudflare"
page_title: "Provider: Cloudflare"
sidebar_current: "docs-cloudflare-index"
2014-10-22 05:21:56 +02:00
description: |-
2017-03-18 13:34:07 +01:00
The Cloudflare provider is used to interact with the DNS resources supported by Cloudflare. The provider needs to be configured with the proper credentials before it can be used.
2014-07-25 18:28:11 +02:00
---
2017-03-18 13:34:07 +01:00
# Cloudflare Provider
2014-07-25 18:28:11 +02:00
2017-03-18 13:34:07 +01:00
The Cloudflare provider is used to interact with the
DNS resources supported by Cloudflare. The provider needs to be configured
2014-07-25 18:28:11 +02:00
with the proper credentials before it can be used.
Use the navigation to the left to read about the available resources.
## Example Usage
2017-04-10 18:12:48 +02:00
```hcl
2017-03-18 13:34:07 +01:00
# Configure the Cloudflare provider
2014-07-25 18:28:11 +02:00
provider "cloudflare" {
2017-02-18 23:48:50 +01:00
email = "${var.cloudflare_email}"
token = "${var.cloudflare_token}"
2014-07-25 18:28:11 +02:00
}
# Create a record
resource "cloudflare_record" "www" {
2017-02-18 23:48:50 +01:00
# ...
2014-07-25 18:28:11 +02:00
}
```
## Argument Reference
The following arguments are supported:
2015-04-09 21:25:21 +02:00
* `email` - (Required) The email associated with the account. This can also be
specified with the `CLOUDFLARE_EMAIL` shell environment variable.
* `token` - (Required) The Cloudflare API token. This can also be specified
with the `CLOUDFLARE_TOKEN` shell environment variable.