Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

Zone

Provides a Cloudflare Zone resource. Zone is the basic resource for working with Cloudflare and is roughly equivalent to a domain name that the user purchases.

Example Usage

using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Cloudflare.Zone("example", new Cloudflare.ZoneArgs
        {
            Zone = "example.com",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-cloudflare/sdk/v2/go/cloudflare"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := cloudflare.NewZone(ctx, "example", &cloudflare.ZoneArgs{
            Zone: pulumi.String("example.com"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_cloudflare as cloudflare

example = cloudflare.Zone("example", zone="example.com")
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const example = new cloudflare.Zone("example", {
    zone: "example.com",
});

Create a Zone Resource

new Zone(name: string, args: ZoneArgs, opts?: CustomResourceOptions);
def Zone(resource_name: str, opts: Optional[ResourceOptions] = None, jump_start: Optional[bool] = None, paused: Optional[bool] = None, plan: Optional[str] = None, type: Optional[str] = None, zone: Optional[str] = None)
func NewZone(ctx *Context, name string, args ZoneArgs, opts ...ResourceOption) (*Zone, error)
public Zone(string name, ZoneArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ZoneArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ZoneArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ZoneArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Zone Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Zone resource accepts the following input properties:

ZoneName string

The DNS zone name which will be added.

JumpStart bool

Boolean of whether to scan for DNS records on creation. Ignored after zone is created. Default: false.

Paused bool

Boolean of whether this zone is paused (traffic bypasses Cloudflare). Default: false.

Plan string

The name of the commercial plan to apply to the zone, can be updated once the one is created; one of free, pro, business, enterprise.

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. Valid values: full, partial. Default is full.

Zone string

The DNS zone name which will be added.

JumpStart bool

Boolean of whether to scan for DNS records on creation. Ignored after zone is created. Default: false.

Paused bool

Boolean of whether this zone is paused (traffic bypasses Cloudflare). Default: false.

Plan string

The name of the commercial plan to apply to the zone, can be updated once the one is created; one of free, pro, business, enterprise.

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. Valid values: full, partial. Default is full.

zone string

The DNS zone name which will be added.

jumpStart boolean

Boolean of whether to scan for DNS records on creation. Ignored after zone is created. Default: false.

paused boolean

Boolean of whether this zone is paused (traffic bypasses Cloudflare). Default: false.

plan string

The name of the commercial plan to apply to the zone, can be updated once the one is created; one of free, pro, business, enterprise.

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. Valid values: full, partial. Default is full.

zone str

The DNS zone name which will be added.

jump_start bool

Boolean of whether to scan for DNS records on creation. Ignored after zone is created. Default: false.

paused bool

Boolean of whether this zone is paused (traffic bypasses Cloudflare). Default: false.

plan str

The name of the commercial plan to apply to the zone, can be updated once the one is created; one of free, pro, business, enterprise.

type str

A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup. Valid values: full, partial. Default is full.

Outputs

All input properties are implicitly available as output properties. Additionally, the Zone resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Meta ZoneMeta
NameServers List<string>

Cloudflare-assigned name servers. This is only populated for zones that use Cloudflare DNS.

Status string

Status of the zone. Valid values: active, pending, initializing, moved, deleted, deactivated.

VanityNameServers List<string>

List of Vanity Nameservers (if set). * meta.wildcard_proxiable - Indicates whether wildcard DNS records can receive Cloudflare security and performance features. * meta.phishing_detected - Indicates if URLs on the zone have been identified as hosting phishing content.

VerificationKey string

Contains the TXT record value to validate domain ownership. This is only populated for zones of type partial.

Id string
The provider-assigned unique ID for this managed resource.
Meta ZoneMeta
NameServers []string

Cloudflare-assigned name servers. This is only populated for zones that use Cloudflare DNS.

Status string

Status of the zone. Valid values: active, pending, initializing, moved, deleted, deactivated.

VanityNameServers []string

List of Vanity Nameservers (if set). * meta.wildcard_proxiable - Indicates whether wildcard DNS records can receive Cloudflare security and performance features. * meta.phishing_detected - Indicates if URLs on the zone have been identified as hosting phishing content.

VerificationKey string

Contains the TXT record value to validate domain ownership. This is only populated for zones of type partial.

id string
The provider-assigned unique ID for this managed resource.
meta ZoneMeta
nameServers string[]

Cloudflare-assigned name servers. This is only populated for zones that use Cloudflare DNS.

status string

Status of the zone. Valid values: active, pending, initializing, moved, deleted, deactivated.

vanityNameServers string[]

List of Vanity Nameservers (if set). * meta.wildcard_proxiable - Indicates whether wildcard DNS records can receive Cloudflare security and performance features. * meta.phishing_detected - Indicates if URLs on the zone have been identified as hosting phishing content.

verificationKey string

Contains the TXT record value to validate domain ownership. This is only populated for zones of type partial.

id str
The provider-assigned unique ID for this managed resource.
meta ZoneMeta
name_servers Sequence[str]

Cloudflare-assigned name servers. This is only populated for zones that use Cloudflare DNS.

status str

Status of the zone. Valid values: active, pending, initializing, moved, deleted, deactivated.

vanity_name_servers Sequence[str]

List of Vanity Nameservers (if set). * meta.wildcard_proxiable - Indicates whether wildcard DNS records can receive Cloudflare security and performance features. * meta.phishing_detected - Indicates if URLs on the zone have been identified as hosting phishing content.

verification_key str

Contains the TXT record value to validate domain ownership. This is only populated for zones of type partial.

Look up an Existing Zone Resource

Get an existing Zone resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ZoneState, opts?: CustomResourceOptions): Zone
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, jump_start: Optional[bool] = None, meta: Optional[ZoneMetaArgs] = None, name_servers: Optional[Sequence[str]] = None, paused: Optional[bool] = None, plan: Optional[str] = None, status: Optional[str] = None, type: Optional[str] = None, vanity_name_servers: Optional[Sequence[str]] = None, verification_key: Optional[str] = None, zone: Optional[str] = None) -> Zone
func GetZone(ctx *Context, name string, id IDInput, state *ZoneState, opts ...ResourceOption) (*Zone, error)
public static Zone Get(string name, Input<string> id, ZoneState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

JumpStart bool

Boolean of whether to scan for DNS records on creation. Ignored after zone is created. Default: false.

Meta ZoneMetaArgs
NameServers List<string>

Cloudflare-assigned name servers. This is only populated for zones that use Cloudflare DNS.

Paused bool

Boolean of whether this zone is paused (traffic bypasses Cloudflare). Default: false.

Plan string

The name of the commercial plan to apply to the zone, can be updated once the one is created; one of free, pro, business, enterprise.

Status string

Status of the zone. Valid values: active, pending, initializing, moved, deleted, deactivated.

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. Valid values: full, partial. Default is full.

VanityNameServers List<string>

List of Vanity Nameservers (if set). * meta.wildcard_proxiable - Indicates whether wildcard DNS records can receive Cloudflare security and performance features. * meta.phishing_detected - Indicates if URLs on the zone have been identified as hosting phishing content.

VerificationKey string

Contains the TXT record value to validate domain ownership. This is only populated for zones of type partial.

ZoneName string

The DNS zone name which will be added.

JumpStart bool

Boolean of whether to scan for DNS records on creation. Ignored after zone is created. Default: false.

Meta ZoneMeta
NameServers []string

Cloudflare-assigned name servers. This is only populated for zones that use Cloudflare DNS.

Paused bool

Boolean of whether this zone is paused (traffic bypasses Cloudflare). Default: false.

Plan string

The name of the commercial plan to apply to the zone, can be updated once the one is created; one of free, pro, business, enterprise.

Status string

Status of the zone. Valid values: active, pending, initializing, moved, deleted, deactivated.

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. Valid values: full, partial. Default is full.

VanityNameServers []string

List of Vanity Nameservers (if set). * meta.wildcard_proxiable - Indicates whether wildcard DNS records can receive Cloudflare security and performance features. * meta.phishing_detected - Indicates if URLs on the zone have been identified as hosting phishing content.

VerificationKey string

Contains the TXT record value to validate domain ownership. This is only populated for zones of type partial.

Zone string

The DNS zone name which will be added.

jumpStart boolean

Boolean of whether to scan for DNS records on creation. Ignored after zone is created. Default: false.

meta ZoneMeta
nameServers string[]

Cloudflare-assigned name servers. This is only populated for zones that use Cloudflare DNS.

paused boolean

Boolean of whether this zone is paused (traffic bypasses Cloudflare). Default: false.

plan string

The name of the commercial plan to apply to the zone, can be updated once the one is created; one of free, pro, business, enterprise.

status string

Status of the zone. Valid values: active, pending, initializing, moved, deleted, deactivated.

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. Valid values: full, partial. Default is full.

vanityNameServers string[]

List of Vanity Nameservers (if set). * meta.wildcard_proxiable - Indicates whether wildcard DNS records can receive Cloudflare security and performance features. * meta.phishing_detected - Indicates if URLs on the zone have been identified as hosting phishing content.

verificationKey string

Contains the TXT record value to validate domain ownership. This is only populated for zones of type partial.

zone string

The DNS zone name which will be added.

jump_start bool

Boolean of whether to scan for DNS records on creation. Ignored after zone is created. Default: false.

meta ZoneMetaArgs
name_servers Sequence[str]

Cloudflare-assigned name servers. This is only populated for zones that use Cloudflare DNS.

paused bool

Boolean of whether this zone is paused (traffic bypasses Cloudflare). Default: false.

plan str

The name of the commercial plan to apply to the zone, can be updated once the one is created; one of free, pro, business, enterprise.

status str

Status of the zone. Valid values: active, pending, initializing, moved, deleted, deactivated.

type str

A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup. Valid values: full, partial. Default is full.

vanity_name_servers Sequence[str]

List of Vanity Nameservers (if set). * meta.wildcard_proxiable - Indicates whether wildcard DNS records can receive Cloudflare security and performance features. * meta.phishing_detected - Indicates if URLs on the zone have been identified as hosting phishing content.

verification_key str

Contains the TXT record value to validate domain ownership. This is only populated for zones of type partial.

zone str

The DNS zone name which will be added.

Supporting Types

ZoneMeta

Import

Zone resource can be imported using a zone ID, e.g.

 $ pulumi import cloudflare:index/zone:Zone example d41d8cd98f00b204e9800998ecf8427e

where* d41d8cd98f00b204e9800998ecf8427e - zone ID, as returned from API

Package Details

Repository
https://github.com/pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.