1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getZoneDnsSettings
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.getZoneDnsSettings

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleZoneDnsSettings = cloudflare.getZoneDnsSettings({
        zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_zone_dns_settings = cloudflare.get_zone_dns_settings(zone_id="023e105f4ecef8ad9ca31a8372d0c353")
    
    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.LookupZoneDnsSettings(ctx, &cloudflare.LookupZoneDnsSettingsArgs{
    			ZoneId: "023e105f4ecef8ad9ca31a8372d0c353",
    		}, 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 exampleZoneDnsSettings = Cloudflare.GetZoneDnsSettings.Invoke(new()
        {
            ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
        });
    
    });
    
    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.GetZoneDnsSettingsArgs;
    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 exampleZoneDnsSettings = CloudflareFunctions.getZoneDnsSettings(GetZoneDnsSettingsArgs.builder()
                .zoneId("023e105f4ecef8ad9ca31a8372d0c353")
                .build());
    
        }
    }
    
    variables:
      exampleZoneDnsSettings:
        fn::invoke:
          function: cloudflare:getZoneDnsSettings
          arguments:
            zoneId: 023e105f4ecef8ad9ca31a8372d0c353
    

    Using getZoneDnsSettings

    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 getZoneDnsSettings(args: GetZoneDnsSettingsArgs, opts?: InvokeOptions): Promise<GetZoneDnsSettingsResult>
    function getZoneDnsSettingsOutput(args: GetZoneDnsSettingsOutputArgs, opts?: InvokeOptions): Output<GetZoneDnsSettingsResult>
    def get_zone_dns_settings(zone_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetZoneDnsSettingsResult
    def get_zone_dns_settings_output(zone_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetZoneDnsSettingsResult]
    func LookupZoneDnsSettings(ctx *Context, args *LookupZoneDnsSettingsArgs, opts ...InvokeOption) (*LookupZoneDnsSettingsResult, error)
    func LookupZoneDnsSettingsOutput(ctx *Context, args *LookupZoneDnsSettingsOutputArgs, opts ...InvokeOption) LookupZoneDnsSettingsResultOutput

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

    public static class GetZoneDnsSettings 
    {
        public static Task<GetZoneDnsSettingsResult> InvokeAsync(GetZoneDnsSettingsArgs args, InvokeOptions? opts = null)
        public static Output<GetZoneDnsSettingsResult> Invoke(GetZoneDnsSettingsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetZoneDnsSettingsResult> getZoneDnsSettings(GetZoneDnsSettingsArgs args, InvokeOptions options)
    public static Output<GetZoneDnsSettingsResult> getZoneDnsSettings(GetZoneDnsSettingsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getZoneDnsSettings:getZoneDnsSettings
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ZoneId string
    Identifier
    ZoneId string
    Identifier
    zoneId String
    Identifier
    zoneId string
    Identifier
    zone_id str
    Identifier
    zoneId String
    Identifier

    getZoneDnsSettings Result

    The following output properties are available:

    FlattenAllCnames bool
    Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened.
    FoundationDns bool
    Whether to enable Foundation DNS Advanced Nameservers on the zone.
    Id string
    The provider-assigned unique ID for this managed resource.
    InternalDns GetZoneDnsSettingsInternalDns
    Settings for this internal zone.
    MultiProvider bool
    Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers.
    Nameservers GetZoneDnsSettingsNameservers
    Settings determining the nameservers through which the zone should be available.
    NsTtl double
    The time to live (TTL) of the zone's nameserver (NS) records.
    SecondaryOverrides bool
    Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.
    Soa GetZoneDnsSettingsSoa
    Components of the zone's SOA record.
    ZoneId string
    Identifier
    ZoneMode string
    Whether the zone mode is a regular or CDN/DNS only zone. Available values: "standard", "cdnonly", "dnsonly".
    FlattenAllCnames bool
    Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened.
    FoundationDns bool
    Whether to enable Foundation DNS Advanced Nameservers on the zone.
    Id string
    The provider-assigned unique ID for this managed resource.
    InternalDns GetZoneDnsSettingsInternalDns
    Settings for this internal zone.
    MultiProvider bool
    Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers.
    Nameservers GetZoneDnsSettingsNameservers
    Settings determining the nameservers through which the zone should be available.
    NsTtl float64
    The time to live (TTL) of the zone's nameserver (NS) records.
    SecondaryOverrides bool
    Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.
    Soa GetZoneDnsSettingsSoa
    Components of the zone's SOA record.
    ZoneId string
    Identifier
    ZoneMode string
    Whether the zone mode is a regular or CDN/DNS only zone. Available values: "standard", "cdnonly", "dnsonly".
    flattenAllCnames Boolean
    Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened.
    foundationDns Boolean
    Whether to enable Foundation DNS Advanced Nameservers on the zone.
    id String
    The provider-assigned unique ID for this managed resource.
    internalDns GetZoneDnsSettingsInternalDns
    Settings for this internal zone.
    multiProvider Boolean
    Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers.
    nameservers GetZoneDnsSettingsNameservers
    Settings determining the nameservers through which the zone should be available.
    nsTtl Double
    The time to live (TTL) of the zone's nameserver (NS) records.
    secondaryOverrides Boolean
    Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.
    soa GetZoneDnsSettingsSoa
    Components of the zone's SOA record.
    zoneId String
    Identifier
    zoneMode String
    Whether the zone mode is a regular or CDN/DNS only zone. Available values: "standard", "cdnonly", "dnsonly".
    flattenAllCnames boolean
    Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened.
    foundationDns boolean
    Whether to enable Foundation DNS Advanced Nameservers on the zone.
    id string
    The provider-assigned unique ID for this managed resource.
    internalDns GetZoneDnsSettingsInternalDns
    Settings for this internal zone.
    multiProvider boolean
    Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers.
    nameservers GetZoneDnsSettingsNameservers
    Settings determining the nameservers through which the zone should be available.
    nsTtl number
    The time to live (TTL) of the zone's nameserver (NS) records.
    secondaryOverrides boolean
    Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.
    soa GetZoneDnsSettingsSoa
    Components of the zone's SOA record.
    zoneId string
    Identifier
    zoneMode string
    Whether the zone mode is a regular or CDN/DNS only zone. Available values: "standard", "cdnonly", "dnsonly".
    flatten_all_cnames bool
    Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened.
    foundation_dns bool
    Whether to enable Foundation DNS Advanced Nameservers on the zone.
    id str
    The provider-assigned unique ID for this managed resource.
    internal_dns GetZoneDnsSettingsInternalDns
    Settings for this internal zone.
    multi_provider bool
    Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers.
    nameservers GetZoneDnsSettingsNameservers
    Settings determining the nameservers through which the zone should be available.
    ns_ttl float
    The time to live (TTL) of the zone's nameserver (NS) records.
    secondary_overrides bool
    Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.
    soa GetZoneDnsSettingsSoa
    Components of the zone's SOA record.
    zone_id str
    Identifier
    zone_mode str
    Whether the zone mode is a regular or CDN/DNS only zone. Available values: "standard", "cdnonly", "dnsonly".
    flattenAllCnames Boolean
    Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened.
    foundationDns Boolean
    Whether to enable Foundation DNS Advanced Nameservers on the zone.
    id String
    The provider-assigned unique ID for this managed resource.
    internalDns Property Map
    Settings for this internal zone.
    multiProvider Boolean
    Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers.
    nameservers Property Map
    Settings determining the nameservers through which the zone should be available.
    nsTtl Number
    The time to live (TTL) of the zone's nameserver (NS) records.
    secondaryOverrides Boolean
    Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.
    soa Property Map
    Components of the zone's SOA record.
    zoneId String
    Identifier
    zoneMode String
    Whether the zone mode is a regular or CDN/DNS only zone. Available values: "standard", "cdnonly", "dnsonly".

    Supporting Types

    GetZoneDnsSettingsInternalDns

    ReferenceZoneId string
    The ID of the zone to fallback to.
    ReferenceZoneId string
    The ID of the zone to fallback to.
    referenceZoneId String
    The ID of the zone to fallback to.
    referenceZoneId string
    The ID of the zone to fallback to.
    reference_zone_id str
    The ID of the zone to fallback to.
    referenceZoneId String
    The ID of the zone to fallback to.

    GetZoneDnsSettingsNameservers

    NsSet int
    Configured nameserver set to be used for this zone
    Type string
    Nameserver type Available values: "cloudflare.standard", "custom.account", "custom.tenant", "custom.zone".
    NsSet int
    Configured nameserver set to be used for this zone
    Type string
    Nameserver type Available values: "cloudflare.standard", "custom.account", "custom.tenant", "custom.zone".
    nsSet Integer
    Configured nameserver set to be used for this zone
    type String
    Nameserver type Available values: "cloudflare.standard", "custom.account", "custom.tenant", "custom.zone".
    nsSet number
    Configured nameserver set to be used for this zone
    type string
    Nameserver type Available values: "cloudflare.standard", "custom.account", "custom.tenant", "custom.zone".
    ns_set int
    Configured nameserver set to be used for this zone
    type str
    Nameserver type Available values: "cloudflare.standard", "custom.account", "custom.tenant", "custom.zone".
    nsSet Number
    Configured nameserver set to be used for this zone
    type String
    Nameserver type Available values: "cloudflare.standard", "custom.account", "custom.tenant", "custom.zone".

    GetZoneDnsSettingsSoa

    Expire double
    Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.
    MinTtl double
    The time to live (TTL) for negative caching of records within the zone.
    Mname string
    The primary nameserver, which may be used for outbound zone transfers.
    Refresh double
    Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.
    Retry double
    Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.
    Rname string
    The email address of the zone administrator, with the first label representing the local part of the email address.
    Ttl double
    The time to live (TTL) of the SOA record itself.
    Expire float64
    Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.
    MinTtl float64
    The time to live (TTL) for negative caching of records within the zone.
    Mname string
    The primary nameserver, which may be used for outbound zone transfers.
    Refresh float64
    Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.
    Retry float64
    Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.
    Rname string
    The email address of the zone administrator, with the first label representing the local part of the email address.
    Ttl float64
    The time to live (TTL) of the SOA record itself.
    expire Double
    Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.
    minTtl Double
    The time to live (TTL) for negative caching of records within the zone.
    mname String
    The primary nameserver, which may be used for outbound zone transfers.
    refresh Double
    Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.
    retry Double
    Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.
    rname String
    The email address of the zone administrator, with the first label representing the local part of the email address.
    ttl Double
    The time to live (TTL) of the SOA record itself.
    expire number
    Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.
    minTtl number
    The time to live (TTL) for negative caching of records within the zone.
    mname string
    The primary nameserver, which may be used for outbound zone transfers.
    refresh number
    Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.
    retry number
    Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.
    rname string
    The email address of the zone administrator, with the first label representing the local part of the email address.
    ttl number
    The time to live (TTL) of the SOA record itself.
    expire float
    Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.
    min_ttl float
    The time to live (TTL) for negative caching of records within the zone.
    mname str
    The primary nameserver, which may be used for outbound zone transfers.
    refresh float
    Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.
    retry float
    Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.
    rname str
    The email address of the zone administrator, with the first label representing the local part of the email address.
    ttl float
    The time to live (TTL) of the SOA record itself.
    expire Number
    Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.
    minTtl Number
    The time to live (TTL) for negative caching of records within the zone.
    mname String
    The primary nameserver, which may be used for outbound zone transfers.
    refresh Number
    Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.
    retry Number
    Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.
    rname String
    The email address of the zone administrator, with the first label representing the local part of the email address.
    ttl Number
    The time to live (TTL) of the SOA record itself.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi