Skip to content
Start here

Addressing

AddressingRegional Hostnames

resource cloudflare_regional_hostname

required Expand Collapse
hostname: String

DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com

zone_id: String

Identifier.

region_key: String

Identifying key for the region

optional Expand Collapse
routing?: String

Configure which routing method to use for the regional hostname

computed Expand Collapse
id: String

DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com

created_on: Time

When the regional hostname was created

cloudflare_regional_hostname

resource "cloudflare_regional_hostname" "example_regional_hostname" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  hostname = "foo.example.com"
  region_key = "ca"
  routing = "dns"
}

data cloudflare_regional_hostname

required Expand Collapse
hostname: String

DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com

zone_id: String

Identifier.

computed Expand Collapse
id: String

DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com

created_on: Time

When the regional hostname was created

region_key: String

Identifying key for the region

routing: String

Configure which routing method to use for the regional hostname

cloudflare_regional_hostname

data "cloudflare_regional_hostname" "example_regional_hostname" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  hostname = "foo.example.com"
}

data cloudflare_regional_hostnames

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

DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com

created_on: Time

When the regional hostname was created

hostname: String

DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com

region_key: String

Identifying key for the region

routing: String

Configure which routing method to use for the regional hostname

cloudflare_regional_hostnames

data "cloudflare_regional_hostnames" "example_regional_hostnames" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

AddressingAddress Maps

resource cloudflare_address_map

required Expand Collapse
account_id: String

Identifier of a Cloudflare account.

optional Expand Collapse
ips?: List[String]
memberships?: List[Attributes]

Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership.

identifier?: String

The identifier for the membership (eg. a zone or account tag).

kind?: String

The type of the membership.

default_sni?: String

If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.

description?: String

An optional description field which may be used to describe the types of IPs or zones on the map.

enabled?: Bool

Whether the Address Map is enabled or not. Cloudflare’s DNS will not respond with IP addresses on an Address Map until the map is enabled.

computed Expand Collapse
id: String

Identifier of an Address Map.

can_delete: Bool

If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.

can_modify_ips: Bool

If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps.

created_at: Time
modified_at: Time

cloudflare_address_map

resource "cloudflare_address_map" "example_address_map" {
  account_id = "258def64c72dae45f3e4c8516e2111f2"
  description = "My Ecommerce zones"
  enabled = true
  ips = ["192.0.2.1"]
  memberships = [{
    identifier = "023e105f4ecef8ad9ca31a8372d0c353"
    kind = "zone"
  }]
}

data cloudflare_address_map

required Expand Collapse
address_map_id: String

Identifier of an Address Map.

account_id: String

Identifier of a Cloudflare account.

computed Expand Collapse
id: String

Identifier of an Address Map.

can_delete: Bool

If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.

can_modify_ips: Bool

If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps.

created_at: Time
default_sni: String

If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.

description: String

An optional description field which may be used to describe the types of IPs or zones on the map.

enabled: Bool

Whether the Address Map is enabled or not. Cloudflare’s DNS will not respond with IP addresses on an Address Map until the map is enabled.

modified_at: Time
ips: List[Attributes]

The set of IPs on the Address Map.

created_at: Time
ip: String

An IPv4 or IPv6 address.

memberships: List[Attributes]

Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership.

can_delete: Bool

Controls whether the membership can be deleted via the API or not.

created_at: Time
identifier: String

The identifier for the membership (eg. a zone or account tag).

kind: String

The type of the membership.

cloudflare_address_map

data "cloudflare_address_map" "example_address_map" {
  account_id = "258def64c72dae45f3e4c8516e2111f2"
  address_map_id = "055817b111884e0227e1be16a0be6ee0"
}

data cloudflare_address_maps

required Expand Collapse
account_id: String

Identifier of a Cloudflare account.

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

Identifier of an Address Map.

can_delete: Bool

If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.

can_modify_ips: Bool

If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps.

created_at: Time
default_sni: String

If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.

description: String

An optional description field which may be used to describe the types of IPs or zones on the map.

enabled: Bool

Whether the Address Map is enabled or not. Cloudflare’s DNS will not respond with IP addresses on an Address Map until the map is enabled.

modified_at: Time

cloudflare_address_maps

data "cloudflare_address_maps" "example_address_maps" {
  account_id = "258def64c72dae45f3e4c8516e2111f2"
}

AddressingPrefixes

resource cloudflare_byo_ip_prefix

required Expand Collapse
account_id: String

Identifier of a Cloudflare account.

asn: Int64

Autonomous System Number (ASN) the prefix will be advertised under. Use 13335 for Cloudflare’s ASN, or your own ASN as an integer without the AS prefix. The IRR route and RPKI ROA must authorize this ASN.

cidr: String

IP Prefix in Classless Inter-Domain Routing format.

optional Expand Collapse
loa_document_id?: String

Identifier for the uploaded LOA document.

delegate_loa_creation?: Bool

Whether Cloudflare is allowed to generate the LOA document on behalf of the prefix owner.

description?: String

Description of the prefix.

computed Expand Collapse
id: String

Identifier of an IP Prefix.

Deprecatedadvertised: Bool

Prefer the BGP Prefixes API instead, which allows for advertising multiple BGP routes within a single IP Prefix.

Prefix advertisement status to the Internet. This field is only not ‘null’ if on demand is enabled.

Deprecatedadvertised_modified_at: Time

Prefer the BGP Prefixes API instead, which allows for advertising multiple BGP routes within a single IP Prefix.

Last time the advertisement status was changed. This field is only not ‘null’ if on demand is enabled.

approved: String

Approval state of the prefix (P = pending, V = approved). Approval does not advertise the prefix or activate traffic.

asn_ownership_validation_state: String

State of ASN ownership validation for a customer-owned Autonomous System Number (ASN). Returned when an ASN ownership validation result exists. Omitted when validation does not apply, such as for Cloudflare-owned ASNs. Verification is reused for prefixes with the same account and ASN. Refer to ASN ownership validation states for state meanings and resolutions.

aspa_validation_state: String

State of Autonomous System Provider Authorization (ASPA) validation for a customer-owned ASN. Returned when an ASPA validation result exists. Publishing an ASPA is optional. A published ASPA must authorize AS13335 as a provider. An invalid result blocks approval. If omitted, no ASPA validation result is available. Omission does not indicate successful validation or confirm that no ASPA exists. Refer to ASPA validation states for state meanings and resolutions, and ASPA authorization for publication guidance.

created_at: Time
irr_validation_state: String

State of one kind of validation for an IP prefix.

modified_at: Time
Deprecatedon_demand_enabled: Bool

Prefer the BGP Prefixes API instead, which allows for advertising multiple BGP routes within a single IP Prefix.

Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.

Deprecatedon_demand_locked: Bool

Prefer the BGP Prefixes API instead, which allows for advertising multiple BGP routes within a single IP Prefix.

Whether advertisement status of the prefix is locked, meaning it cannot be changed.

ownership_validation_state: String

State of one kind of validation for an IP prefix.

ownership_validation_token: String

Token used to verify ownership of the prefix and, when applicable, its ASN. Use the same token for both checks. Refer to the BYOIP onboarding guide for verification instructions.

rpki_validation_state: String

State of one kind of validation for an IP prefix.

cloudflare_byo_ip_prefix

resource "cloudflare_byo_ip_prefix" "example_byo_ip_prefix" {
  account_id = "258def64c72dae45f3e4c8516e2111f2"
  asn = 13335
  cidr = "192.0.2.0/24"
  delegate_loa_creation = true
  description = "Internal test prefix"
  loa_document_id = "d933b1530bc56c9953cf8ce166da8004"
}

data cloudflare_byo_ip_prefix

required Expand Collapse
prefix_id: String

Identifier of an IP Prefix.

account_id: String

Identifier of a Cloudflare account.

computed Expand Collapse
id: String

Identifier of an IP Prefix.

Deprecatedadvertised: Bool

Prefer the BGP Prefixes API instead, which allows for advertising multiple BGP routes within a single IP Prefix.

Prefix advertisement status to the Internet. This field is only not ‘null’ if on demand is enabled.

Deprecatedadvertised_modified_at: Time

Prefer the BGP Prefixes API instead, which allows for advertising multiple BGP routes within a single IP Prefix.

Last time the advertisement status was changed. This field is only not ‘null’ if on demand is enabled.

approved: String

Approval state of the prefix (P = pending, V = approved). Approval does not advertise the prefix or activate traffic.

asn: Int64

Autonomous System Number (ASN) the prefix will be advertised under. Use 13335 for Cloudflare’s ASN, or your own ASN as an integer without the AS prefix. The IRR route and RPKI ROA must authorize this ASN.

asn_ownership_validation_state: String

State of ASN ownership validation for a customer-owned Autonomous System Number (ASN). Returned when an ASN ownership validation result exists. Omitted when validation does not apply, such as for Cloudflare-owned ASNs. Verification is reused for prefixes with the same account and ASN. Refer to ASN ownership validation states for state meanings and resolutions.

aspa_validation_state: String

State of Autonomous System Provider Authorization (ASPA) validation for a customer-owned ASN. Returned when an ASPA validation result exists. Publishing an ASPA is optional. A published ASPA must authorize AS13335 as a provider. An invalid result blocks approval. If omitted, no ASPA validation result is available. Omission does not indicate successful validation or confirm that no ASPA exists. Refer to ASPA validation states for state meanings and resolutions, and ASPA authorization for publication guidance.

cidr: String

IP Prefix in Classless Inter-Domain Routing format.

created_at: Time
delegate_loa_creation: Bool

Whether Cloudflare is allowed to generate the LOA document on behalf of the prefix owner.

description: String

Description of the prefix.

irr_validation_state: String

State of one kind of validation for an IP prefix.

loa_document_id: String

Identifier for the uploaded LOA document.

modified_at: Time
Deprecatedon_demand_enabled: Bool

Prefer the BGP Prefixes API instead, which allows for advertising multiple BGP routes within a single IP Prefix.

Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.

Deprecatedon_demand_locked: Bool

Prefer the BGP Prefixes API instead, which allows for advertising multiple BGP routes within a single IP Prefix.

Whether advertisement status of the prefix is locked, meaning it cannot be changed.

ownership_validation_state: String

State of one kind of validation for an IP prefix.

ownership_validation_token: String

Token used to verify ownership of the prefix and, when applicable, its ASN. Use the same token for both checks. Refer to the BYOIP onboarding guide for verification instructions.

rpki_validation_state: String

State of one kind of validation for an IP prefix.

cloudflare_byo_ip_prefix

data "cloudflare_byo_ip_prefix" "example_byo_ip_prefix" {
  account_id = "258def64c72dae45f3e4c8516e2111f2"
  prefix_id = "2af39739cc4e3b5910c918468bb89828"
}

data cloudflare_byo_ip_prefixes

required Expand Collapse
account_id: String

Identifier of a Cloudflare account.

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

Identifier of an IP Prefix.

account_id: String

Identifier of a Cloudflare account.

Deprecatedadvertised: Bool

Prefer the BGP Prefixes API instead, which allows for advertising multiple BGP routes within a single IP Prefix.

Prefix advertisement status to the Internet. This field is only not ‘null’ if on demand is enabled.

Deprecatedadvertised_modified_at: Time

Prefer the BGP Prefixes API instead, which allows for advertising multiple BGP routes within a single IP Prefix.

Last time the advertisement status was changed. This field is only not ‘null’ if on demand is enabled.

approved: String

Approval state of the prefix (P = pending, V = approved). Approval does not advertise the prefix or activate traffic.

asn: Int64

Autonomous System Number (ASN) the prefix will be advertised under. Use 13335 for Cloudflare’s ASN, or your own ASN as an integer without the AS prefix. The IRR route and RPKI ROA must authorize this ASN.

asn_ownership_validation_state: String

State of ASN ownership validation for a customer-owned Autonomous System Number (ASN). Returned when an ASN ownership validation result exists. Omitted when validation does not apply, such as for Cloudflare-owned ASNs. Verification is reused for prefixes with the same account and ASN. Refer to ASN ownership validation states for state meanings and resolutions.

aspa_validation_state: String

State of Autonomous System Provider Authorization (ASPA) validation for a customer-owned ASN. Returned when an ASPA validation result exists. Publishing an ASPA is optional. A published ASPA must authorize AS13335 as a provider. An invalid result blocks approval. If omitted, no ASPA validation result is available. Omission does not indicate successful validation or confirm that no ASPA exists. Refer to ASPA validation states for state meanings and resolutions, and ASPA authorization for publication guidance.

cidr: String

IP Prefix in Classless Inter-Domain Routing format.

created_at: Time
delegate_loa_creation: Bool

Whether Cloudflare is allowed to generate the LOA document on behalf of the prefix owner.

description: String

Description of the prefix.

irr_validation_state: String

State of one kind of validation for an IP prefix.

loa_document_id: String

Identifier for the uploaded LOA document.

modified_at: Time
Deprecatedon_demand_enabled: Bool

Prefer the BGP Prefixes API instead, which allows for advertising multiple BGP routes within a single IP Prefix.

Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.

Deprecatedon_demand_locked: Bool

Prefer the BGP Prefixes API instead, which allows for advertising multiple BGP routes within a single IP Prefix.

Whether advertisement status of the prefix is locked, meaning it cannot be changed.

ownership_validation_state: String

State of one kind of validation for an IP prefix.

ownership_validation_token: String

Token used to verify ownership of the prefix and, when applicable, its ASN. Use the same token for both checks. Refer to the BYOIP onboarding guide for verification instructions.

rpki_validation_state: String

State of one kind of validation for an IP prefix.

cloudflare_byo_ip_prefixes

data "cloudflare_byo_ip_prefixes" "example_byo_ip_prefixes" {
  account_id = "258def64c72dae45f3e4c8516e2111f2"
}