1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. ZeroTrustDnsLocation
Cloudflare v5.43.0 published on Wednesday, Nov 13, 2024 by Pulumi

cloudflare.ZeroTrustDnsLocation

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.43.0 published on Wednesday, Nov 13, 2024 by Pulumi

    Provides a Cloudflare Teams Location resource. Teams Locations are referenced when creating secure web gateway policies.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const example = new cloudflare.ZeroTrustDnsLocation("example", {
        accountId: "f037e56e89293a057740de681ac9abbe",
        name: "office",
        clientDefault: true,
        ecsSupport: false,
        networks: [
            {
                network: "203.0.113.1/32",
            },
            {
                network: "203.0.113.2/32",
            },
        ],
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example = cloudflare.ZeroTrustDnsLocation("example",
        account_id="f037e56e89293a057740de681ac9abbe",
        name="office",
        client_default=True,
        ecs_support=False,
        networks=[
            {
                "network": "203.0.113.1/32",
            },
            {
                "network": "203.0.113.2/32",
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.NewZeroTrustDnsLocation(ctx, "example", &cloudflare.ZeroTrustDnsLocationArgs{
    			AccountId:     pulumi.String("f037e56e89293a057740de681ac9abbe"),
    			Name:          pulumi.String("office"),
    			ClientDefault: pulumi.Bool(true),
    			EcsSupport:    pulumi.Bool(false),
    			Networks: cloudflare.ZeroTrustDnsLocationNetworkArray{
    				&cloudflare.ZeroTrustDnsLocationNetworkArgs{
    					Network: pulumi.String("203.0.113.1/32"),
    				},
    				&cloudflare.ZeroTrustDnsLocationNetworkArgs{
    					Network: pulumi.String("203.0.113.2/32"),
    				},
    			},
    		})
    		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 example = new Cloudflare.ZeroTrustDnsLocation("example", new()
        {
            AccountId = "f037e56e89293a057740de681ac9abbe",
            Name = "office",
            ClientDefault = true,
            EcsSupport = false,
            Networks = new[]
            {
                new Cloudflare.Inputs.ZeroTrustDnsLocationNetworkArgs
                {
                    Network = "203.0.113.1/32",
                },
                new Cloudflare.Inputs.ZeroTrustDnsLocationNetworkArgs
                {
                    Network = "203.0.113.2/32",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.ZeroTrustDnsLocation;
    import com.pulumi.cloudflare.ZeroTrustDnsLocationArgs;
    import com.pulumi.cloudflare.inputs.ZeroTrustDnsLocationNetworkArgs;
    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) {
            var example = new ZeroTrustDnsLocation("example", ZeroTrustDnsLocationArgs.builder()
                .accountId("f037e56e89293a057740de681ac9abbe")
                .name("office")
                .clientDefault(true)
                .ecsSupport(false)
                .networks(            
                    ZeroTrustDnsLocationNetworkArgs.builder()
                        .network("203.0.113.1/32")
                        .build(),
                    ZeroTrustDnsLocationNetworkArgs.builder()
                        .network("203.0.113.2/32")
                        .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: cloudflare:ZeroTrustDnsLocation
        properties:
          accountId: f037e56e89293a057740de681ac9abbe
          name: office
          clientDefault: true
          ecsSupport: false
          networks:
            - network: 203.0.113.1/32
            - network: 203.0.113.2/32
    

    Create ZeroTrustDnsLocation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ZeroTrustDnsLocation(name: string, args: ZeroTrustDnsLocationArgs, opts?: CustomResourceOptions);
    @overload
    def ZeroTrustDnsLocation(resource_name: str,
                             args: ZeroTrustDnsLocationArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def ZeroTrustDnsLocation(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             account_id: Optional[str] = None,
                             name: Optional[str] = None,
                             client_default: Optional[bool] = None,
                             ecs_support: Optional[bool] = None,
                             networks: Optional[Sequence[ZeroTrustDnsLocationNetworkArgs]] = None)
    func NewZeroTrustDnsLocation(ctx *Context, name string, args ZeroTrustDnsLocationArgs, opts ...ResourceOption) (*ZeroTrustDnsLocation, error)
    public ZeroTrustDnsLocation(string name, ZeroTrustDnsLocationArgs args, CustomResourceOptions? opts = null)
    public ZeroTrustDnsLocation(String name, ZeroTrustDnsLocationArgs args)
    public ZeroTrustDnsLocation(String name, ZeroTrustDnsLocationArgs args, CustomResourceOptions options)
    
    type: cloudflare:ZeroTrustDnsLocation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ZeroTrustDnsLocationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ZeroTrustDnsLocationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ZeroTrustDnsLocationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ZeroTrustDnsLocationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ZeroTrustDnsLocationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var zeroTrustDnsLocationResource = new Cloudflare.ZeroTrustDnsLocation("zeroTrustDnsLocationResource", new()
    {
        AccountId = "string",
        Name = "string",
        ClientDefault = false,
        EcsSupport = false,
        Networks = new[]
        {
            new Cloudflare.Inputs.ZeroTrustDnsLocationNetworkArgs
            {
                Network = "string",
                Id = "string",
            },
        },
    });
    
    example, err := cloudflare.NewZeroTrustDnsLocation(ctx, "zeroTrustDnsLocationResource", &cloudflare.ZeroTrustDnsLocationArgs{
    	AccountId:     pulumi.String("string"),
    	Name:          pulumi.String("string"),
    	ClientDefault: pulumi.Bool(false),
    	EcsSupport:    pulumi.Bool(false),
    	Networks: cloudflare.ZeroTrustDnsLocationNetworkArray{
    		&cloudflare.ZeroTrustDnsLocationNetworkArgs{
    			Network: pulumi.String("string"),
    			Id:      pulumi.String("string"),
    		},
    	},
    })
    
    var zeroTrustDnsLocationResource = new ZeroTrustDnsLocation("zeroTrustDnsLocationResource", ZeroTrustDnsLocationArgs.builder()
        .accountId("string")
        .name("string")
        .clientDefault(false)
        .ecsSupport(false)
        .networks(ZeroTrustDnsLocationNetworkArgs.builder()
            .network("string")
            .id("string")
            .build())
        .build());
    
    zero_trust_dns_location_resource = cloudflare.ZeroTrustDnsLocation("zeroTrustDnsLocationResource",
        account_id="string",
        name="string",
        client_default=False,
        ecs_support=False,
        networks=[{
            "network": "string",
            "id": "string",
        }])
    
    const zeroTrustDnsLocationResource = new cloudflare.ZeroTrustDnsLocation("zeroTrustDnsLocationResource", {
        accountId: "string",
        name: "string",
        clientDefault: false,
        ecsSupport: false,
        networks: [{
            network: "string",
            id: "string",
        }],
    });
    
    type: cloudflare:ZeroTrustDnsLocation
    properties:
        accountId: string
        clientDefault: false
        ecsSupport: false
        name: string
        networks:
            - id: string
              network: string
    

    ZeroTrustDnsLocation Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ZeroTrustDnsLocation resource accepts the following input properties:

    AccountId string
    The account identifier to target for the resource.
    Name string
    Name of the teams location.
    ClientDefault bool
    Indicator that this is the default location.
    EcsSupport bool
    Indicator that this location needs to resolve EDNS queries.
    Networks List<ZeroTrustDnsLocationNetwork>
    The networks CIDRs that comprise the location.
    AccountId string
    The account identifier to target for the resource.
    Name string
    Name of the teams location.
    ClientDefault bool
    Indicator that this is the default location.
    EcsSupport bool
    Indicator that this location needs to resolve EDNS queries.
    Networks []ZeroTrustDnsLocationNetworkArgs
    The networks CIDRs that comprise the location.
    accountId String
    The account identifier to target for the resource.
    name String
    Name of the teams location.
    clientDefault Boolean
    Indicator that this is the default location.
    ecsSupport Boolean
    Indicator that this location needs to resolve EDNS queries.
    networks List<ZeroTrustDnsLocationNetwork>
    The networks CIDRs that comprise the location.
    accountId string
    The account identifier to target for the resource.
    name string
    Name of the teams location.
    clientDefault boolean
    Indicator that this is the default location.
    ecsSupport boolean
    Indicator that this location needs to resolve EDNS queries.
    networks ZeroTrustDnsLocationNetwork[]
    The networks CIDRs that comprise the location.
    account_id str
    The account identifier to target for the resource.
    name str
    Name of the teams location.
    client_default bool
    Indicator that this is the default location.
    ecs_support bool
    Indicator that this location needs to resolve EDNS queries.
    networks Sequence[ZeroTrustDnsLocationNetworkArgs]
    The networks CIDRs that comprise the location.
    accountId String
    The account identifier to target for the resource.
    name String
    Name of the teams location.
    clientDefault Boolean
    Indicator that this is the default location.
    ecsSupport Boolean
    Indicator that this location needs to resolve EDNS queries.
    networks List<Property Map>
    The networks CIDRs that comprise the location.

    Outputs

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

    AnonymizedLogsEnabled bool
    Indicator that anonymized logs are enabled.
    DohSubdomain string
    The FQDN that DoH clients should be pointed at.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ip string
    Client IP address.
    Ipv4Destination string
    IP to direct all IPv4 DNS queries to.
    PolicyIds List<string>
    AnonymizedLogsEnabled bool
    Indicator that anonymized logs are enabled.
    DohSubdomain string
    The FQDN that DoH clients should be pointed at.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ip string
    Client IP address.
    Ipv4Destination string
    IP to direct all IPv4 DNS queries to.
    PolicyIds []string
    anonymizedLogsEnabled Boolean
    Indicator that anonymized logs are enabled.
    dohSubdomain String
    The FQDN that DoH clients should be pointed at.
    id String
    The provider-assigned unique ID for this managed resource.
    ip String
    Client IP address.
    ipv4Destination String
    IP to direct all IPv4 DNS queries to.
    policyIds List<String>
    anonymizedLogsEnabled boolean
    Indicator that anonymized logs are enabled.
    dohSubdomain string
    The FQDN that DoH clients should be pointed at.
    id string
    The provider-assigned unique ID for this managed resource.
    ip string
    Client IP address.
    ipv4Destination string
    IP to direct all IPv4 DNS queries to.
    policyIds string[]
    anonymized_logs_enabled bool
    Indicator that anonymized logs are enabled.
    doh_subdomain str
    The FQDN that DoH clients should be pointed at.
    id str
    The provider-assigned unique ID for this managed resource.
    ip str
    Client IP address.
    ipv4_destination str
    IP to direct all IPv4 DNS queries to.
    policy_ids Sequence[str]
    anonymizedLogsEnabled Boolean
    Indicator that anonymized logs are enabled.
    dohSubdomain String
    The FQDN that DoH clients should be pointed at.
    id String
    The provider-assigned unique ID for this managed resource.
    ip String
    Client IP address.
    ipv4Destination String
    IP to direct all IPv4 DNS queries to.
    policyIds List<String>

    Look up Existing ZeroTrustDnsLocation Resource

    Get an existing ZeroTrustDnsLocation 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?: ZeroTrustDnsLocationState, opts?: CustomResourceOptions): ZeroTrustDnsLocation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            anonymized_logs_enabled: Optional[bool] = None,
            client_default: Optional[bool] = None,
            doh_subdomain: Optional[str] = None,
            ecs_support: Optional[bool] = None,
            ip: Optional[str] = None,
            ipv4_destination: Optional[str] = None,
            name: Optional[str] = None,
            networks: Optional[Sequence[ZeroTrustDnsLocationNetworkArgs]] = None,
            policy_ids: Optional[Sequence[str]] = None) -> ZeroTrustDnsLocation
    func GetZeroTrustDnsLocation(ctx *Context, name string, id IDInput, state *ZeroTrustDnsLocationState, opts ...ResourceOption) (*ZeroTrustDnsLocation, error)
    public static ZeroTrustDnsLocation Get(string name, Input<string> id, ZeroTrustDnsLocationState? state, CustomResourceOptions? opts = null)
    public static ZeroTrustDnsLocation get(String name, Output<String> id, ZeroTrustDnsLocationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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:
    AccountId string
    The account identifier to target for the resource.
    AnonymizedLogsEnabled bool
    Indicator that anonymized logs are enabled.
    ClientDefault bool
    Indicator that this is the default location.
    DohSubdomain string
    The FQDN that DoH clients should be pointed at.
    EcsSupport bool
    Indicator that this location needs to resolve EDNS queries.
    Ip string
    Client IP address.
    Ipv4Destination string
    IP to direct all IPv4 DNS queries to.
    Name string
    Name of the teams location.
    Networks List<ZeroTrustDnsLocationNetwork>
    The networks CIDRs that comprise the location.
    PolicyIds List<string>
    AccountId string
    The account identifier to target for the resource.
    AnonymizedLogsEnabled bool
    Indicator that anonymized logs are enabled.
    ClientDefault bool
    Indicator that this is the default location.
    DohSubdomain string
    The FQDN that DoH clients should be pointed at.
    EcsSupport bool
    Indicator that this location needs to resolve EDNS queries.
    Ip string
    Client IP address.
    Ipv4Destination string
    IP to direct all IPv4 DNS queries to.
    Name string
    Name of the teams location.
    Networks []ZeroTrustDnsLocationNetworkArgs
    The networks CIDRs that comprise the location.
    PolicyIds []string
    accountId String
    The account identifier to target for the resource.
    anonymizedLogsEnabled Boolean
    Indicator that anonymized logs are enabled.
    clientDefault Boolean
    Indicator that this is the default location.
    dohSubdomain String
    The FQDN that DoH clients should be pointed at.
    ecsSupport Boolean
    Indicator that this location needs to resolve EDNS queries.
    ip String
    Client IP address.
    ipv4Destination String
    IP to direct all IPv4 DNS queries to.
    name String
    Name of the teams location.
    networks List<ZeroTrustDnsLocationNetwork>
    The networks CIDRs that comprise the location.
    policyIds List<String>
    accountId string
    The account identifier to target for the resource.
    anonymizedLogsEnabled boolean
    Indicator that anonymized logs are enabled.
    clientDefault boolean
    Indicator that this is the default location.
    dohSubdomain string
    The FQDN that DoH clients should be pointed at.
    ecsSupport boolean
    Indicator that this location needs to resolve EDNS queries.
    ip string
    Client IP address.
    ipv4Destination string
    IP to direct all IPv4 DNS queries to.
    name string
    Name of the teams location.
    networks ZeroTrustDnsLocationNetwork[]
    The networks CIDRs that comprise the location.
    policyIds string[]
    account_id str
    The account identifier to target for the resource.
    anonymized_logs_enabled bool
    Indicator that anonymized logs are enabled.
    client_default bool
    Indicator that this is the default location.
    doh_subdomain str
    The FQDN that DoH clients should be pointed at.
    ecs_support bool
    Indicator that this location needs to resolve EDNS queries.
    ip str
    Client IP address.
    ipv4_destination str
    IP to direct all IPv4 DNS queries to.
    name str
    Name of the teams location.
    networks Sequence[ZeroTrustDnsLocationNetworkArgs]
    The networks CIDRs that comprise the location.
    policy_ids Sequence[str]
    accountId String
    The account identifier to target for the resource.
    anonymizedLogsEnabled Boolean
    Indicator that anonymized logs are enabled.
    clientDefault Boolean
    Indicator that this is the default location.
    dohSubdomain String
    The FQDN that DoH clients should be pointed at.
    ecsSupport Boolean
    Indicator that this location needs to resolve EDNS queries.
    ip String
    Client IP address.
    ipv4Destination String
    IP to direct all IPv4 DNS queries to.
    name String
    Name of the teams location.
    networks List<Property Map>
    The networks CIDRs that comprise the location.
    policyIds List<String>

    Supporting Types

    ZeroTrustDnsLocationNetwork, ZeroTrustDnsLocationNetworkArgs

    Network string
    CIDR notation representation of the network IP.
    Id string
    The ID of this resource.
    Network string
    CIDR notation representation of the network IP.
    Id string
    The ID of this resource.
    network String
    CIDR notation representation of the network IP.
    id String
    The ID of this resource.
    network string
    CIDR notation representation of the network IP.
    id string
    The ID of this resource.
    network str
    CIDR notation representation of the network IP.
    id str
    The ID of this resource.
    network String
    CIDR notation representation of the network IP.
    id String
    The ID of this resource.

    Import

    $ pulumi import cloudflare:index/zeroTrustDnsLocation:ZeroTrustDnsLocation example <account_id>/<teams_location_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    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 v5.43.0 published on Wednesday, Nov 13, 2024 by Pulumi