cloudflare logo
Cloudflare v5.0.0, Mar 13 23

cloudflare.getZone

Use this data source to look up zone info. This is the singular alternative to cloudflare.getZones.

Note Cloudflare zone names are not unique. It is possible for multiple accounts to have the same zone created but in different states. If you are using this setup, it is advised to use the account_id attribute on this resource or swap to cloudflare.getZones to further filter the results.

Using getZone

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 getZone(args: GetZoneArgs, opts?: InvokeOptions): Promise<GetZoneResult>
function getZoneOutput(args: GetZoneOutputArgs, opts?: InvokeOptions): Output<GetZoneResult>
def get_zone(account_id: Optional[str] = None,
             name: Optional[str] = None,
             zone_id: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetZoneResult
def get_zone_output(account_id: Optional[pulumi.Input[str]] = None,
             name: Optional[pulumi.Input[str]] = None,
             zone_id: Optional[pulumi.Input[str]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetZoneResult]
func LookupZone(ctx *Context, args *LookupZoneArgs, opts ...InvokeOption) (*LookupZoneResult, error)
func LookupZoneOutput(ctx *Context, args *LookupZoneOutputArgs, opts ...InvokeOption) LookupZoneResultOutput

> Note: This function is named LookupZone in the Go SDK.

public static class GetZone 
{
    public static Task<GetZoneResult> InvokeAsync(GetZoneArgs args, InvokeOptions? opts = null)
    public static Output<GetZoneResult> Invoke(GetZoneInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetZoneResult> getZone(GetZoneArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: cloudflare:index/getZone:getZone
  arguments:
    # arguments dictionary

The following arguments are supported:

AccountId string

The account identifier to target for the resource.

Name string

The name of the zone. Must provide only one of zone_id, name.

ZoneId string

The zone identifier to target for the resource. Must provide only one of zone_id, name.

AccountId string

The account identifier to target for the resource.

Name string

The name of the zone. Must provide only one of zone_id, name.

ZoneId string

The zone identifier to target for the resource. Must provide only one of zone_id, name.

accountId String

The account identifier to target for the resource.

name String

The name of the zone. Must provide only one of zone_id, name.

zoneId String

The zone identifier to target for the resource. Must provide only one of zone_id, name.

accountId string

The account identifier to target for the resource.

name string

The name of the zone. Must provide only one of zone_id, name.

zoneId string

The zone identifier to target for the resource. Must provide only one of zone_id, name.

account_id str

The account identifier to target for the resource.

name str

The name of the zone. Must provide only one of zone_id, name.

zone_id str

The zone identifier to target for the resource. Must provide only one of zone_id, name.

accountId String

The account identifier to target for the resource.

name String

The name of the zone. Must provide only one of zone_id, name.

zoneId String

The zone identifier to target for the resource. Must provide only one of zone_id, name.

getZone Result

The following output properties are available:

AccountId string

The account identifier to target for the resource.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the zone. Must provide only one of zone_id, name.

NameServers List<string>

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

Paused bool

Whether the zone is paused on Cloudflare.

Plan string

The name of the plan associated with the zone.

Status string

Status of the zone.

VanityNameServers List<string>

List of Vanity Nameservers (if set).

ZoneId string

The zone identifier to target for the resource. Must provide only one of zone_id, name.

AccountId string

The account identifier to target for the resource.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the zone. Must provide only one of zone_id, name.

NameServers []string

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

Paused bool

Whether the zone is paused on Cloudflare.

Plan string

The name of the plan associated with the zone.

Status string

Status of the zone.

VanityNameServers []string

List of Vanity Nameservers (if set).

ZoneId string

The zone identifier to target for the resource. Must provide only one of zone_id, name.

accountId String

The account identifier to target for the resource.

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the zone. Must provide only one of zone_id, name.

nameServers List<String>

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

paused Boolean

Whether the zone is paused on Cloudflare.

plan String

The name of the plan associated with the zone.

status String

Status of the zone.

vanityNameServers List<String>

List of Vanity Nameservers (if set).

zoneId String

The zone identifier to target for the resource. Must provide only one of zone_id, name.

accountId string

The account identifier to target for the resource.

id string

The provider-assigned unique ID for this managed resource.

name string

The name of the zone. Must provide only one of zone_id, name.

nameServers string[]

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

paused boolean

Whether the zone is paused on Cloudflare.

plan string

The name of the plan associated with the zone.

status string

Status of the zone.

vanityNameServers string[]

List of Vanity Nameservers (if set).

zoneId string

The zone identifier to target for the resource. Must provide only one of zone_id, name.

account_id str

The account identifier to target for the resource.

id str

The provider-assigned unique ID for this managed resource.

name str

The name of the zone. Must provide only one of zone_id, name.

name_servers Sequence[str]

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

paused bool

Whether the zone is paused on Cloudflare.

plan str

The name of the plan associated with the zone.

status str

Status of the zone.

vanity_name_servers Sequence[str]

List of Vanity Nameservers (if set).

zone_id str

The zone identifier to target for the resource. Must provide only one of zone_id, name.

accountId String

The account identifier to target for the resource.

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the zone. Must provide only one of zone_id, name.

nameServers List<String>

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

paused Boolean

Whether the zone is paused on Cloudflare.

plan String

The name of the plan associated with the zone.

status String

Status of the zone.

vanityNameServers List<String>

List of Vanity Nameservers (if set).

zoneId String

The zone identifier to target for the resource. Must provide only one of zone_id, name.

Package Details

Repository
Cloudflare pulumi/pulumi-cloudflare
License
Apache-2.0
Notes

This Pulumi package is based on the cloudflare Terraform Provider.