Skip to content
Start here

Zones

resource cloudflare_zone

required Expand Collapse
name: String

The domain name. Per RFC 1035 the overall zone name can be up to 253 characters, with each segment ("label") not exceeding 63 characters.

account: Attributes
id?: String

Identifier

optional Expand Collapse
paused?: Bool

Indicates whether the zone is only using Cloudflare DNS services. A true value means the zone will not receive security or performance benefits.

type?: String

A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup.

vanity_name_servers?: List[String]

An array of domains used for custom name servers. This is only available for Business and Enterprise plans.

computed Expand Collapse
id: String

Identifier

activated_on: Time

The last time proof of ownership was detected and the zone was made active.

cname_suffix: String

Allows the customer to use a custom apex. Tenants Only Configuration.

created_on: Time

When the zone was created.

development_mode: Float64

The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is 0.

modified_on: Time

When the zone was last modified.

original_dnshost: String

DNS host at the time of switching to Cloudflare.

original_registrar: String

Registrar for the domain at the time of switching to Cloudflare.

status: String

The zone status on Cloudflare.

verification_key: String

Verification key for partial zone setup.

name_servers: List[String]

The name servers Cloudflare assigns to a zone.

original_name_servers: List[String]

Original name servers before moving to Cloudflare.

Deprecatedpermissions: List[String]
This has been replaced by Account memberships.

Legacy permissions based on legacy user membership information.

meta: Attributes

Metadata about the zone.

cdn_only: Bool

The zone is only configured for CDN.

custom_certificate_quota: Int64

Number of Custom Certificates the zone can have.

dns_only: Bool

The zone is only configured for DNS.

foundation_dns: Bool

The zone is setup with Foundation DNS.

page_rule_quota: Int64

Number of Page Rules a zone can have.

phishing_detected: Bool

The zone has been flagged for phishing.

step: Int64
owner: Attributes

The owner of the zone.

id: String

Identifier

name: String

Name of the owner.

type: String

The type of owner.

Deprecatedplan: Attributes
Please use the `/zones/{zone_id}/subscription` API to update a zone's plan. Changing this value will create/cancel associated subscriptions. To view available plans for this zone, see [Zone Plans](https://developers.cloudflare.com/api/resources/zones/subresources/plans/).

A Zones subscription information.

id: String

Identifier

can_subscribe: Bool

States if the subscription can be activated.

currency: String

The denomination of the customer.

externally_managed: Bool

If this Zone is managed by another company.

frequency: String

How often the customer is billed.

is_subscribed: Bool

States if the subscription active.

legacy_discount: Bool

If the legacy discount applies to this Zone.

legacy_id: String

The legacy name of the plan.

name: String

Name of the owner.

price: Float64

How much the customer is paying.

tenant: Attributes

The root organizational unit that this zone belongs to (such as a tenant or organization).

id: String

Identifier

name: String

The name of the Tenant account.

tenant_unit: Attributes

The immediate parent organizational unit that this zone belongs to (such as under a tenant or sub-organization).

id: String

Identifier

cloudflare_zone

resource "cloudflare_zone" "example_zone" {
  account = {
    id = "023e105f4ecef8ad9ca31a8372d0c353"
  }
  name = "example.com"
  type = "full"
}

data cloudflare_zone

optional Expand Collapse
zone_id?: String

Identifier

filter?: Attributes
account?: Attributes
id?: String

Filter by an account ID.

name?: String

An account Name. Optional filter operators can be provided to extend refine the search:

  • equal (default)
  • not_equal
  • starts_with
  • ends_with
  • contains
  • starts_with_case_sensitive
  • ends_with_case_sensitive
  • contains_case_sensitive
direction?: String

Direction to order zones.

match?: String

Whether to match all search requirements or at least one (any).

name?: String

A domain name. Optional filter operators can be provided to extend refine the search:

  • equal (default)
  • not_equal
  • starts_with
  • ends_with
  • contains
  • starts_with_case_sensitive
  • ends_with_case_sensitive
  • contains_case_sensitive
order?: String

Field to order zones by.

status?: String

Specify a zone status to filter by.

computed Expand Collapse
id: String

Identifier

activated_on: Time

The last time proof of ownership was detected and the zone was made active.

cname_suffix: String

Allows the customer to use a custom apex. Tenants Only Configuration.

created_on: Time

When the zone was created.

development_mode: Float64

The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is 0.

modified_on: Time

When the zone was last modified.

name: String

The domain name. Per RFC 1035 the overall zone name can be up to 253 characters, with each segment ("label") not exceeding 63 characters.

original_dnshost: String

DNS host at the time of switching to Cloudflare.

original_registrar: String

Registrar for the domain at the time of switching to Cloudflare.

paused: Bool

Indicates whether the zone is only using Cloudflare DNS services. A true value means the zone will not receive security or performance benefits.

status: String

The zone status on Cloudflare.

type: String

A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup.

verification_key: String

Verification key for partial zone setup.

name_servers: List[String]

The name servers Cloudflare assigns to a zone.

original_name_servers: List[String]

Original name servers before moving to Cloudflare.

Deprecatedpermissions: List[String]
This has been replaced by Account memberships.

Legacy permissions based on legacy user membership information.

vanity_name_servers: List[String]

An array of domains used for custom name servers. This is only available for Business and Enterprise plans.

account: Attributes

The account the zone belongs to.

id: String

Identifier

name: String

The name of the account.

meta: Attributes

Metadata about the zone.

cdn_only: Bool

The zone is only configured for CDN.

custom_certificate_quota: Int64

Number of Custom Certificates the zone can have.

dns_only: Bool

The zone is only configured for DNS.

foundation_dns: Bool

The zone is setup with Foundation DNS.

page_rule_quota: Int64

Number of Page Rules a zone can have.

phishing_detected: Bool

The zone has been flagged for phishing.

step: Int64
owner: Attributes

The owner of the zone.

id: String

Identifier

name: String

Name of the owner.

type: String

The type of owner.

Deprecatedplan: Attributes
Please use the `/zones/{zone_id}/subscription` API to update a zone's plan. Changing this value will create/cancel associated subscriptions. To view available plans for this zone, see [Zone Plans](https://developers.cloudflare.com/api/resources/zones/subresources/plans/).

A Zones subscription information.

id: String

Identifier

can_subscribe: Bool

States if the subscription can be activated.

currency: String

The denomination of the customer.

externally_managed: Bool

If this Zone is managed by another company.

frequency: String

How often the customer is billed.

is_subscribed: Bool

States if the subscription active.

legacy_discount: Bool

If the legacy discount applies to this Zone.

legacy_id: String

The legacy name of the plan.

name: String

Name of the owner.

price: Float64

How much the customer is paying.

tenant: Attributes

The root organizational unit that this zone belongs to (such as a tenant or organization).

id: String

Identifier

name: String

The name of the Tenant account.

tenant_unit: Attributes

The immediate parent organizational unit that this zone belongs to (such as under a tenant or sub-organization).

id: String

Identifier

cloudflare_zone

data "cloudflare_zone" "example_zone" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

data cloudflare_zones

optional Expand Collapse
direction?: String

Direction to order zones.

name?: String

A domain name. Optional filter operators can be provided to extend refine the search:

  • equal (default)
  • not_equal
  • starts_with
  • ends_with
  • contains
  • starts_with_case_sensitive
  • ends_with_case_sensitive
  • contains_case_sensitive
order?: String

Field to order zones by.

status?: String

Specify a zone status to filter by.

account?: Attributes
id?: String

Filter by an account ID.

name?: String

An account Name. Optional filter operators can be provided to extend refine the search:

  • equal (default)
  • not_equal
  • starts_with
  • ends_with
  • contains
  • starts_with_case_sensitive
  • ends_with_case_sensitive
  • contains_case_sensitive
match?: String

Whether to match all search requirements or at least one (any).

max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

id: String

Identifier

account: Attributes

The account the zone belongs to.

id: String

Identifier

name: String

The name of the account.

activated_on: Time

The last time proof of ownership was detected and the zone was made active.

created_on: Time

When the zone was created.

development_mode: Float64

The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is 0.

meta: Attributes

Metadata about the zone.

cdn_only: Bool

The zone is only configured for CDN.

custom_certificate_quota: Int64

Number of Custom Certificates the zone can have.

dns_only: Bool

The zone is only configured for DNS.

foundation_dns: Bool

The zone is setup with Foundation DNS.

page_rule_quota: Int64

Number of Page Rules a zone can have.

phishing_detected: Bool

The zone has been flagged for phishing.

step: Int64
modified_on: Time

When the zone was last modified.

name: String

The domain name. Per RFC 1035 the overall zone name can be up to 253 characters, with each segment ("label") not exceeding 63 characters.

name_servers: List[String]

The name servers Cloudflare assigns to a zone.

original_dnshost: String

DNS host at the time of switching to Cloudflare.

original_name_servers: List[String]

Original name servers before moving to Cloudflare.

original_registrar: String

Registrar for the domain at the time of switching to Cloudflare.

owner: Attributes

The owner of the zone.

id: String

Identifier

name: String

Name of the owner.

type: String

The type of owner.

Deprecatedplan: Attributes
Please use the `/zones/{zone_id}/subscription` API to update a zone's plan. Changing this value will create/cancel associated subscriptions. To view available plans for this zone, see [Zone Plans](https://developers.cloudflare.com/api/resources/zones/subresources/plans/).

A Zones subscription information.

id: String

Identifier

can_subscribe: Bool

States if the subscription can be activated.

currency: String

The denomination of the customer.

externally_managed: Bool

If this Zone is managed by another company.

frequency: String

How often the customer is billed.

is_subscribed: Bool

States if the subscription active.

legacy_discount: Bool

If the legacy discount applies to this Zone.

legacy_id: String

The legacy name of the plan.

name: String

Name of the owner.

price: Float64

How much the customer is paying.

cname_suffix: String

Allows the customer to use a custom apex. Tenants Only Configuration.

paused: Bool

Indicates whether the zone is only using Cloudflare DNS services. A true value means the zone will not receive security or performance benefits.

Deprecatedpermissions: List[String]
This has been replaced by Account memberships.

Legacy permissions based on legacy user membership information.

status: String

The zone status on Cloudflare.

tenant: Attributes

The root organizational unit that this zone belongs to (such as a tenant or organization).

id: String

Identifier

name: String

The name of the Tenant account.

tenant_unit: Attributes

The immediate parent organizational unit that this zone belongs to (such as under a tenant or sub-organization).

id: String

Identifier

type: String

A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup.

vanity_name_servers: List[String]

An array of domains used for custom name servers. This is only available for Business and Enterprise plans.

verification_key: String

Verification key for partial zone setup.

cloudflare_zones

data "cloudflare_zones" "example_zones" {
  account = {
    id = "id"
    name = "name"
  }
  direction = "desc"
  name = "name"
  order = "status"
  status = "initializing"
}

ZonesSettings

resource cloudflare_zone_setting

required Expand Collapse
setting_id: String

Setting name

zone_id: String

Identifier

optional Expand Collapse
value?: JSON

Value of the zone setting.

enabled?: Bool

ssl-recommender enrollment setting.

computed Expand Collapse
id: String

Setting name

editable: Bool

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

modified_on: Time

last time this setting was modified.

time_remaining: Float64

Value of the zone setting. Notes: The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is false.

cloudflare_zone_setting

resource "cloudflare_zone_setting" "example_zone_setting" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  setting_id = "always_online"
  enabled = true
}

data cloudflare_zone_setting

required Expand Collapse
setting_id: String

Setting name

zone_id: String

Identifier

computed Expand Collapse
id: String

Setting name

editable: Bool

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

enabled: Bool

ssl-recommender enrollment setting.

modified_on: Time

last time this setting was modified.

time_remaining: Float64

Value of the zone setting. Notes: The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is false.

value: String

Current value of the zone setting.

cloudflare_zone_setting

data "cloudflare_zone_setting" "example_zone_setting" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  setting_id = "always_online"
}

data cloudflare_zone_settings

required Expand Collapse
zone_id: String

Identifier

optional Expand Collapse
max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

id: String

ID of the zone setting.

value: String

Current value of the zone setting.

editable: Bool

Whether or not this setting can be modified for this zone (based on your Cloudflare plan level).

modified_on: Time

last time this setting was modified.

time_remaining: Float64

Value of the zone setting. Notes: The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is false.

enabled: Bool

ssl-recommender enrollment setting.

cloudflare_zone_settings

data "cloudflare_zone_settings" "example_zone_settings" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

ZonesHolds

resource cloudflare_zone_hold

required Expand Collapse
zone_id: String

Identifier.

optional Expand Collapse
hold_after?: String

If hold_after is provided and future-dated, the hold will be temporarily disabled, then automatically re-enabled by the system at the time specified in this RFC3339-formatted timestamp. A past-dated hold_after value will have no effect on an existing, enabled hold. Providing an empty string will set its value to the current time.

include_subdomains?: Bool

If true, the zone hold will extend to block any subdomain of the given zone, as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with the hostname 'example.com' and include_subdomains=true will block 'example.com', 'staging.example.com', 'api.staging.example.com', etc.

computed Expand Collapse
id: String

Identifier.

hold: Bool

cloudflare_zone_hold

resource "cloudflare_zone_hold" "example_zone_hold" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

data cloudflare_zone_hold

required Expand Collapse
zone_id: String

Identifier.

computed Expand Collapse
id: String

Identifier.

hold: Bool
hold_after: String
include_subdomains: String

cloudflare_zone_hold

data "cloudflare_zone_hold" "example_zone_hold" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

ZonesSubscriptions

resource cloudflare_zone_subscription

required Expand Collapse
zone_id: String

Identifier

optional Expand Collapse
frequency?: String

How often the subscription is renewed automatically.

rate_plan?: Attributes

The rate plan applied to the subscription.

id?: String

The ID of the rate plan.

currency?: String

The currency applied to the rate plan subscription.

externally_managed?: Bool

Whether this rate plan is managed externally from Cloudflare.

is_contract?: Bool

Whether a rate plan is enterprise-based (or newly adopted term contract).

public_name?: String

The full name of the rate plan.

scope?: String

The scope that this rate plan applies to.

sets?: List[String]

The list of sets this rate plan applies to. Returns array of strings.

computed Expand Collapse
id: String

Identifier

currency: String

The monetary unit in which pricing information is displayed.

current_period_end: Time

The end of the current period and also when the next billing is due.

current_period_start: Time

When the current billing period started. May match initial_period_start if this is the first period.

price: Float64

The price of the subscription that will be billed, in US dollars.

state: String

The state that the subscription is in.

cloudflare_zone_subscription

resource "cloudflare_zone_subscription" "example_zone_subscription" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  frequency = "monthly"
  rate_plan = {
    id = "free"
    currency = "USD"
    externally_managed = false
    is_contract = false
    public_name = "Business Plan"
    scope = "zone"
    sets = ["string"]
  }
}

data cloudflare_zone_subscription

required Expand Collapse
zone_id: String

Identifier

computed Expand Collapse
id: String

Identifier

currency: String

The monetary unit in which pricing information is displayed.

current_period_end: Time

The end of the current period and also when the next billing is due.

current_period_start: Time

When the current billing period started. May match initial_period_start if this is the first period.

frequency: String

How often the subscription is renewed automatically.

price: Float64

The price of the subscription that will be billed, in US dollars.

state: String

The state that the subscription is in.

rate_plan: Attributes

The rate plan applied to the subscription.

id: String

The ID of the rate plan.

currency: String

The currency applied to the rate plan subscription.

externally_managed: Bool

Whether this rate plan is managed externally from Cloudflare.

is_contract: Bool

Whether a rate plan is enterprise-based (or newly adopted term contract).

public_name: String

The full name of the rate plan.

scope: String

The scope that this rate plan applies to.

sets: List[String]

The list of sets this rate plan applies to. Returns array of strings.

cloudflare_zone_subscription

data "cloudflare_zone_subscription" "example_zone_subscription" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
}