Cloudflare v6.11.0 published on Friday, Oct 31, 2025 by Pulumi
cloudflare.getZones
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleZones = cloudflare.getZones({
    account: {
        id: "id",
        name: "name",
    },
    direction: "desc",
    name: "name",
    order: "status",
    status: "initializing",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_zones = cloudflare.get_zones(account={
        "id": "id",
        "name": "name",
    },
    direction="desc",
    name="name",
    order="status",
    status="initializing")
package main
import (
	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudflare.LookupZones(ctx, &cloudflare.LookupZonesArgs{
			Account: cloudflare.GetZonesAccount{
				Id:   pulumi.StringRef("id"),
				Name: pulumi.StringRef("name"),
			},
			Direction: pulumi.StringRef("desc"),
			Name:      pulumi.StringRef("name"),
			Order:     pulumi.StringRef("status"),
			Status:    pulumi.StringRef("initializing"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() => 
{
    var exampleZones = Cloudflare.GetZones.Invoke(new()
    {
        Account = new Cloudflare.Inputs.GetZonesAccountInputArgs
        {
            Id = "id",
            Name = "name",
        },
        Direction = "desc",
        Name = "name",
        Order = "status",
        Status = "initializing",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.CloudflareFunctions;
import com.pulumi.cloudflare.inputs.GetZonesArgs;
import com.pulumi.cloudflare.inputs.GetZonesAccountArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var exampleZones = CloudflareFunctions.getZones(GetZonesArgs.builder()
            .account(GetZonesAccountArgs.builder()
                .id("id")
                .name("name")
                .build())
            .direction("desc")
            .name("name")
            .order("status")
            .status("initializing")
            .build());
    }
}
variables:
  exampleZones:
    fn::invoke:
      function: cloudflare:getZones
      arguments:
        account:
          id: id
          name: name
        direction: desc
        name: name
        order: status
        status: initializing
Using getZones
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getZones(args: GetZonesArgs, opts?: InvokeOptions): Promise<GetZonesResult>
function getZonesOutput(args: GetZonesOutputArgs, opts?: InvokeOptions): Output<GetZonesResult>def get_zones(account: Optional[GetZonesAccount] = None,
              direction: Optional[str] = None,
              match: Optional[str] = None,
              max_items: Optional[int] = None,
              name: Optional[str] = None,
              order: Optional[str] = None,
              status: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetZonesResult
def get_zones_output(account: Optional[pulumi.Input[GetZonesAccountArgs]] = None,
              direction: Optional[pulumi.Input[str]] = None,
              match: Optional[pulumi.Input[str]] = None,
              max_items: Optional[pulumi.Input[int]] = None,
              name: Optional[pulumi.Input[str]] = None,
              order: Optional[pulumi.Input[str]] = None,
              status: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetZonesResult]func LookupZones(ctx *Context, args *LookupZonesArgs, opts ...InvokeOption) (*LookupZonesResult, error)
func LookupZonesOutput(ctx *Context, args *LookupZonesOutputArgs, opts ...InvokeOption) LookupZonesResultOutput> Note: This function is named LookupZones in the Go SDK.
public static class GetZones 
{
    public static Task<GetZonesResult> InvokeAsync(GetZonesArgs args, InvokeOptions? opts = null)
    public static Output<GetZonesResult> Invoke(GetZonesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetZonesResult> getZones(GetZonesArgs args, InvokeOptions options)
public static Output<GetZonesResult> getZones(GetZonesArgs args, InvokeOptions options)
fn::invoke:
  function: cloudflare:index/getZones:getZones
  arguments:
    # arguments dictionaryThe following arguments are supported:
getZones Result
The following output properties are available:
Supporting Types
GetZonesAccount  
GetZonesResult  
- Account
Get
Zones Result Account  - The account the zone belongs to.
 - Activated
On string - 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 string - When the zone was created.
 - Development
Mode double - 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.
 - Id string
 - Identifier
 - Meta
Get
Zones Result Meta  - Metadata about the zone.
 - Modified
On string - When the zone was last modified.
 - Name string
 - The domain name.
 - 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 List<string>Servers  - Original name servers before moving to Cloudflare.
 - Original
Registrar string - Registrar for the domain at the time of switching to Cloudflare.
 - Owner
Get
Zones Result Owner  - The owner of the zone.
 - 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.
 - Permissions List<string>
 - Legacy permissions based on legacy user membership information.
 - Plan
Get
Zones Result Plan  - A Zones subscription information.
 - Status string
 - The zone status on Cloudflare. Available values: "initializing", "pending", "active", "moved".
 - Tenant
Get
Zones Result Tenant  - The root organizational unit that this zone belongs to (such as a tenant or organization).
 - Tenant
Unit GetZones Result Tenant Unit  - The immediate parent organizational unit that this zone belongs to (such as under a tenant or sub-organization).
 - 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. Available values: "full", "partial", "secondary", "internal".
 - Vanity
Name List<string>Servers  - 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.
 
- Account
Get
Zones Result Account  - The account the zone belongs to.
 - Activated
On string - 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 string - 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.
 - Id string
 - Identifier
 - Meta
Get
Zones Result Meta  - Metadata about the zone.
 - Modified
On string - When the zone was last modified.
 - Name string
 - The domain name.
 - Name
Servers []string - The name servers Cloudflare assigns to a zone.
 - Original
Dnshost string - DNS host at the time of switching to Cloudflare.
 - Original
Name []stringServers  - Original name servers before moving to Cloudflare.
 - Original
Registrar string - Registrar for the domain at the time of switching to Cloudflare.
 - Owner
Get
Zones Result Owner  - The owner of the zone.
 - 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.
 - Permissions []string
 - Legacy permissions based on legacy user membership information.
 - Plan
Get
Zones Result Plan  - A Zones subscription information.
 - Status string
 - The zone status on Cloudflare. Available values: "initializing", "pending", "active", "moved".
 - Tenant
Get
Zones Result Tenant  - The root organizational unit that this zone belongs to (such as a tenant or organization).
 - Tenant
Unit GetZones Result Tenant Unit  - The immediate parent organizational unit that this zone belongs to (such as under a tenant or sub-organization).
 - 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. Available values: "full", "partial", "secondary", "internal".
 - Vanity
Name []stringServers  - 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.
 
- account
Get
Zones Result Account  - The account the zone belongs to.
 - activated
On String - 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 String - When the zone was created.
 - development
Mode Double - 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.
 - id String
 - Identifier
 - meta
Get
Zones Result Meta  - Metadata about the zone.
 - modified
On String - When the zone was last modified.
 - name String
 - The domain name.
 - 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 List<String>Servers  - Original name servers before moving to Cloudflare.
 - original
Registrar String - Registrar for the domain at the time of switching to Cloudflare.
 - owner
Get
Zones Result Owner  - The owner of the zone.
 - paused Boolean
 - Indicates whether the zone is only using Cloudflare DNS services. A true value means the zone will not receive security or performance benefits.
 - permissions List<String>
 - Legacy permissions based on legacy user membership information.
 - plan
Get
Zones Result Plan  - A Zones subscription information.
 - status String
 - The zone status on Cloudflare. Available values: "initializing", "pending", "active", "moved".
 - tenant
Get
Zones Result Tenant  - The root organizational unit that this zone belongs to (such as a tenant or organization).
 - tenant
Unit GetZones Result Tenant Unit  - The immediate parent organizational unit that this zone belongs to (such as under a tenant or sub-organization).
 - 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. Available values: "full", "partial", "secondary", "internal".
 - vanity
Name List<String>Servers  - 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.
 
- account
Get
Zones Result Account  - The account the zone belongs to.
 - activated
On string - 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 string - When the zone was created.
 - development
Mode number - 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.
 - id string
 - Identifier
 - meta
Get
Zones Result Meta  - Metadata about the zone.
 - modified
On string - When the zone was last modified.
 - name string
 - The domain name.
 - name
Servers string[] - The name servers Cloudflare assigns to a zone.
 - original
Dnshost string - DNS host at the time of switching to Cloudflare.
 - original
Name string[]Servers  - Original name servers before moving to Cloudflare.
 - original
Registrar string - Registrar for the domain at the time of switching to Cloudflare.
 - owner
Get
Zones Result Owner  - The owner of the zone.
 - paused boolean
 - Indicates whether the zone is only using Cloudflare DNS services. A true value means the zone will not receive security or performance benefits.
 - permissions string[]
 - Legacy permissions based on legacy user membership information.
 - plan
Get
Zones Result Plan  - A Zones subscription information.
 - status string
 - The zone status on Cloudflare. Available values: "initializing", "pending", "active", "moved".
 - tenant
Get
Zones Result Tenant  - The root organizational unit that this zone belongs to (such as a tenant or organization).
 - tenant
Unit GetZones Result Tenant Unit  - The immediate parent organizational unit that this zone belongs to (such as under a tenant or sub-organization).
 - 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. Available values: "full", "partial", "secondary", "internal".
 - vanity
Name string[]Servers  - 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.
 
- account
Get
Zones Result Account  - The account the zone belongs to.
 - activated_
on str - The last time proof of ownership was detected and the zone was made active.
 - cname_
suffix str - Allows the customer to use a custom apex. Tenants Only Configuration.
 - created_
on str - When the zone was created.
 - development_
mode float - 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.
 - id str
 - Identifier
 - meta
Get
Zones Result Meta  - Metadata about the zone.
 - modified_
on str - When the zone was last modified.
 - name str
 - The domain name.
 - name_
servers Sequence[str] - The name servers Cloudflare assigns to a zone.
 - original_
dnshost str - DNS host at the time of switching to Cloudflare.
 - original_
name_ Sequence[str]servers  - Original name servers before moving to Cloudflare.
 - original_
registrar str - Registrar for the domain at the time of switching to Cloudflare.
 - owner
Get
Zones Result Owner  - The owner of the zone.
 - 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.
 - permissions Sequence[str]
 - Legacy permissions based on legacy user membership information.
 - plan
Get
Zones Result Plan  - A Zones subscription information.
 - status str
 - The zone status on Cloudflare. Available values: "initializing", "pending", "active", "moved".
 - tenant
Get
Zones Result Tenant  - The root organizational unit that this zone belongs to (such as a tenant or organization).
 - tenant_
unit GetZones Result Tenant Unit  - The immediate parent organizational unit that this zone belongs to (such as under a tenant or sub-organization).
 - 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. Available values: "full", "partial", "secondary", "internal".
 - vanity_
name_ Sequence[str]servers  - An array of domains used for custom name servers. This is only available for Business and Enterprise plans.
 - verification_
key str - Verification key for partial zone setup.
 
- account Property Map
 - The account the zone belongs to.
 - activated
On String - 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 String - When the zone was created.
 - development
Mode Number - 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.
 - id String
 - Identifier
 - meta Property Map
 - Metadata about the zone.
 - modified
On String - When the zone was last modified.
 - name String
 - The domain name.
 - 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 List<String>Servers  - Original name servers before moving to Cloudflare.
 - original
Registrar String - Registrar for the domain at the time of switching to Cloudflare.
 - owner Property Map
 - The owner of the zone.
 - paused Boolean
 - Indicates whether the zone is only using Cloudflare DNS services. A true value means the zone will not receive security or performance benefits.
 - permissions List<String>
 - Legacy permissions based on legacy user membership information.
 - plan Property Map
 - A Zones subscription information.
 - status String
 - The zone status on Cloudflare. Available values: "initializing", "pending", "active", "moved".
 - tenant Property Map
 - The root organizational unit that this zone belongs to (such as a tenant or organization).
 - tenant
Unit Property Map - The immediate parent organizational unit that this zone belongs to (such as under a tenant or sub-organization).
 - 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. Available values: "full", "partial", "secondary", "internal".
 - vanity
Name List<String>Servers  - 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.
 
GetZonesResultAccount   
GetZonesResultMeta   
- Cdn
Only bool - The zone is only configured for CDN.
 - Custom
Certificate intQuota  - 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 intQuota  - Number of Page Rules a zone can have.
 - Phishing
Detected bool - The zone has been flagged for phishing.
 - Step int
 
- Cdn
Only bool - The zone is only configured for CDN.
 - Custom
Certificate intQuota  - 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 intQuota  - Number of Page Rules a zone can have.
 - Phishing
Detected bool - The zone has been flagged for phishing.
 - Step int
 
- cdn
Only Boolean - The zone is only configured for CDN.
 - custom
Certificate IntegerQuota  - Number of Custom Certificates the zone can have.
 - dns
Only Boolean - The zone is only configured for DNS.
 - foundation
Dns Boolean - The zone is setup with Foundation DNS.
 - page
Rule IntegerQuota  - Number of Page Rules a zone can have.
 - phishing
Detected Boolean - The zone has been flagged for phishing.
 - step Integer
 
- cdn
Only boolean - The zone is only configured for CDN.
 - custom
Certificate numberQuota  - Number of Custom Certificates the zone can have.
 - dns
Only boolean - The zone is only configured for DNS.
 - foundation
Dns boolean - The zone is setup with Foundation DNS.
 - page
Rule numberQuota  - Number of Page Rules a zone can have.
 - phishing
Detected boolean - The zone has been flagged for phishing.
 - step number
 
- cdn_
only bool - The zone is only configured for CDN.
 - custom_
certificate_ intquota  - 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_ intquota  - Number of Page Rules a zone can have.
 - phishing_
detected bool - The zone has been flagged for phishing.
 - step int
 
- cdn
Only Boolean - The zone is only configured for CDN.
 - custom
Certificate NumberQuota  - Number of Custom Certificates the zone can have.
 - dns
Only Boolean - The zone is only configured for DNS.
 - foundation
Dns Boolean - The zone is setup with Foundation DNS.
 - page
Rule NumberQuota  - Number of Page Rules a zone can have.
 - phishing
Detected Boolean - The zone has been flagged for phishing.
 - step Number
 
GetZonesResultOwner   
GetZonesResultPlan   
- 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.
 - Id string
 - Identifier
 - 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 double
 - How much the customer is paying.
 
- 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.
 - Id string
 - Identifier
 - 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.
 
- can
Subscribe Boolean - States if the subscription can be activated.
 - currency String
 - The denomination of the customer.
 - externally
Managed Boolean - If this Zone is managed by another company.
 - frequency String
 - How often the customer is billed.
 - id String
 - Identifier
 - is
Subscribed Boolean - States if the subscription active.
 - legacy
Discount Boolean - If the legacy discount applies to this Zone.
 - legacy
Id String - The legacy name of the plan.
 - name String
 - Name of the owner.
 - price Double
 - How much the customer is paying.
 
- can
Subscribe boolean - States if the subscription can be activated.
 - currency string
 - The denomination of the customer.
 - externally
Managed boolean - If this Zone is managed by another company.
 - frequency string
 - How often the customer is billed.
 - id string
 - Identifier
 - is
Subscribed boolean - States if the subscription active.
 - legacy
Discount boolean - If the legacy discount applies to this Zone.
 - legacy
Id string - The legacy name of the plan.
 - name string
 - Name of the owner.
 - price number
 - How much the customer is paying.
 
- can_
subscribe bool - States if the subscription can be activated.
 - currency str
 - The denomination of the customer.
 - externally_
managed bool - If this Zone is managed by another company.
 - frequency str
 - How often the customer is billed.
 - id str
 - Identifier
 - is_
subscribed bool - States if the subscription active.
 - legacy_
discount bool - If the legacy discount applies to this Zone.
 - legacy_
id str - The legacy name of the plan.
 - name str
 - Name of the owner.
 - price float
 - How much the customer is paying.
 
- can
Subscribe Boolean - States if the subscription can be activated.
 - currency String
 - The denomination of the customer.
 - externally
Managed Boolean - If this Zone is managed by another company.
 - frequency String
 - How often the customer is billed.
 - id String
 - Identifier
 - is
Subscribed Boolean - States if the subscription active.
 - legacy
Discount Boolean - If the legacy discount applies to this Zone.
 - legacy
Id String - The legacy name of the plan.
 - name String
 - Name of the owner.
 - price Number
 - How much the customer is paying.
 
GetZonesResultTenant   
GetZonesResultTenantUnit    
- Id string
 - Identifier
 
- Id string
 - Identifier
 
- id String
 - Identifier
 
- id string
 - Identifier
 
- id str
 - Identifier
 
- id String
 - Identifier
 
Package Details
- Repository
 - Cloudflare pulumi/pulumi-cloudflare
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
cloudflareTerraform Provider. 
