cloudflare.ZeroTrustDnsLocation
Explore with Pulumi AI
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:
- Account
Id string - The account identifier to target for the resource.
- Name string
- 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
List<Zero
Trust Dns Location Network> - The networks CIDRs that comprise the location.
- Account
Id string - The account identifier to target for the resource.
- Name string
- 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
[]Zero
Trust Dns Location Network Args - The networks CIDRs that comprise the location.
- account
Id String - The account identifier to target for the resource.
- name String
- Name of the teams location.
- client
Default Boolean - Indicator that this is the default location.
- ecs
Support Boolean - Indicator that this location needs to resolve EDNS queries.
- networks
List<Zero
Trust Dns Location Network> - The networks CIDRs that comprise the location.
- account
Id string - The account identifier to target for the resource.
- name string
- Name of the teams location.
- client
Default boolean - Indicator that this is the default location.
- ecs
Support boolean - Indicator that this location needs to resolve EDNS queries.
- networks
Zero
Trust Dns Location Network[] - 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[Zero
Trust Dns Location Network Args] - The networks CIDRs that comprise the location.
- account
Id String - The account identifier to target for the resource.
- name String
- Name of the teams location.
- client
Default Boolean - Indicator that this is the default location.
- ecs
Support 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:
- Anonymized
Logs boolEnabled - Indicator that anonymized logs are enabled.
- Doh
Subdomain 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.
- Policy
Ids List<string>
- Anonymized
Logs boolEnabled - Indicator that anonymized logs are enabled.
- Doh
Subdomain 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.
- Policy
Ids []string
- anonymized
Logs BooleanEnabled - Indicator that anonymized logs are enabled.
- doh
Subdomain 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.
- policy
Ids List<String>
- anonymized
Logs booleanEnabled - Indicator that anonymized logs are enabled.
- doh
Subdomain 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.
- policy
Ids string[]
- anonymized_
logs_ boolenabled - 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]
- anonymized
Logs BooleanEnabled - Indicator that anonymized logs are enabled.
- doh
Subdomain 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.
- policy
Ids 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.
- Account
Id string - The account identifier to target for the resource.
- Anonymized
Logs boolEnabled - Indicator that anonymized logs are enabled.
- Client
Default bool - Indicator that this is the default location.
- Doh
Subdomain string - The FQDN that DoH clients should be pointed at.
- Ecs
Support 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<Zero
Trust Dns Location Network> - The networks CIDRs that comprise the location.
- Policy
Ids List<string>
- Account
Id string - The account identifier to target for the resource.
- Anonymized
Logs boolEnabled - Indicator that anonymized logs are enabled.
- Client
Default bool - Indicator that this is the default location.
- Doh
Subdomain string - The FQDN that DoH clients should be pointed at.
- Ecs
Support 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
[]Zero
Trust Dns Location Network Args - The networks CIDRs that comprise the location.
- Policy
Ids []string
- account
Id String - The account identifier to target for the resource.
- anonymized
Logs BooleanEnabled - Indicator that anonymized logs are enabled.
- client
Default Boolean - Indicator that this is the default location.
- doh
Subdomain String - The FQDN that DoH clients should be pointed at.
- ecs
Support 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<Zero
Trust Dns Location Network> - The networks CIDRs that comprise the location.
- policy
Ids List<String>
- account
Id string - The account identifier to target for the resource.
- anonymized
Logs booleanEnabled - Indicator that anonymized logs are enabled.
- client
Default boolean - Indicator that this is the default location.
- doh
Subdomain string - The FQDN that DoH clients should be pointed at.
- ecs
Support 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
Zero
Trust Dns Location Network[] - The networks CIDRs that comprise the location.
- policy
Ids string[]
- account_
id str - The account identifier to target for the resource.
- anonymized_
logs_ boolenabled - 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[Zero
Trust Dns Location Network Args] - The networks CIDRs that comprise the location.
- policy_
ids Sequence[str]
- account
Id String - The account identifier to target for the resource.
- anonymized
Logs BooleanEnabled - Indicator that anonymized logs are enabled.
- client
Default Boolean - Indicator that this is the default location.
- doh
Subdomain String - The FQDN that DoH clients should be pointed at.
- ecs
Support 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.
- policy
Ids List<String>
Supporting Types
ZeroTrustDnsLocationNetwork, ZeroTrustDnsLocationNetworkArgs
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.