1. Packages
  2. Cloudflare
  3. API Docs
  4. TeamsLocation
Cloudflare v5.33.1 published on Wednesday, Jun 26, 2024 by Pulumi

cloudflare.TeamsLocation

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.33.1 published on Wednesday, Jun 26, 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.TeamsLocation("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.TeamsLocation("example",
        account_id="f037e56e89293a057740de681ac9abbe",
        name="office",
        client_default=True,
        ecs_support=False,
        networks=[
            cloudflare.TeamsLocationNetworkArgs(
                network="203.0.113.1/32",
            ),
            cloudflare.TeamsLocationNetworkArgs(
                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.NewTeamsLocation(ctx, "example", &cloudflare.TeamsLocationArgs{
    			AccountId:     pulumi.String("f037e56e89293a057740de681ac9abbe"),
    			Name:          pulumi.String("office"),
    			ClientDefault: pulumi.Bool(true),
    			EcsSupport:    pulumi.Bool(false),
    			Networks: cloudflare.TeamsLocationNetworkArray{
    				&cloudflare.TeamsLocationNetworkArgs{
    					Network: pulumi.String("203.0.113.1/32"),
    				},
    				&cloudflare.TeamsLocationNetworkArgs{
    					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.TeamsLocation("example", new()
        {
            AccountId = "f037e56e89293a057740de681ac9abbe",
            Name = "office",
            ClientDefault = true,
            EcsSupport = false,
            Networks = new[]
            {
                new Cloudflare.Inputs.TeamsLocationNetworkArgs
                {
                    Network = "203.0.113.1/32",
                },
                new Cloudflare.Inputs.TeamsLocationNetworkArgs
                {
                    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.TeamsLocation;
    import com.pulumi.cloudflare.TeamsLocationArgs;
    import com.pulumi.cloudflare.inputs.TeamsLocationNetworkArgs;
    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 TeamsLocation("example", TeamsLocationArgs.builder()
                .accountId("f037e56e89293a057740de681ac9abbe")
                .name("office")
                .clientDefault(true)
                .ecsSupport(false)
                .networks(            
                    TeamsLocationNetworkArgs.builder()
                        .network("203.0.113.1/32")
                        .build(),
                    TeamsLocationNetworkArgs.builder()
                        .network("203.0.113.2/32")
                        .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: cloudflare:TeamsLocation
        properties:
          accountId: f037e56e89293a057740de681ac9abbe
          name: office
          clientDefault: true
          ecsSupport: false
          networks:
            - network: 203.0.113.1/32
            - network: 203.0.113.2/32
    

    Create TeamsLocation Resource

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

    Constructor syntax

    new TeamsLocation(name: string, args: TeamsLocationArgs, opts?: CustomResourceOptions);
    @overload
    def TeamsLocation(resource_name: str,
                      args: TeamsLocationArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def TeamsLocation(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[TeamsLocationNetworkArgs]] = None)
    func NewTeamsLocation(ctx *Context, name string, args TeamsLocationArgs, opts ...ResourceOption) (*TeamsLocation, error)
    public TeamsLocation(string name, TeamsLocationArgs args, CustomResourceOptions? opts = null)
    public TeamsLocation(String name, TeamsLocationArgs args)
    public TeamsLocation(String name, TeamsLocationArgs args, CustomResourceOptions options)
    
    type: cloudflare:TeamsLocation
    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 TeamsLocationArgs
    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 TeamsLocationArgs
    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 TeamsLocationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TeamsLocationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TeamsLocationArgs
    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 teamsLocationResource = new Cloudflare.TeamsLocation("teamsLocationResource", new()
    {
        AccountId = "string",
        Name = "string",
        ClientDefault = false,
        EcsSupport = false,
        Networks = new[]
        {
            new Cloudflare.Inputs.TeamsLocationNetworkArgs
            {
                Network = "string",
                Id = "string",
            },
        },
    });
    
    example, err := cloudflare.NewTeamsLocation(ctx, "teamsLocationResource", &cloudflare.TeamsLocationArgs{
    	AccountId:     pulumi.String("string"),
    	Name:          pulumi.String("string"),
    	ClientDefault: pulumi.Bool(false),
    	EcsSupport:    pulumi.Bool(false),
    	Networks: cloudflare.TeamsLocationNetworkArray{
    		&cloudflare.TeamsLocationNetworkArgs{
    			Network: pulumi.String("string"),
    			Id:      pulumi.String("string"),
    		},
    	},
    })
    
    var teamsLocationResource = new TeamsLocation("teamsLocationResource", TeamsLocationArgs.builder()
        .accountId("string")
        .name("string")
        .clientDefault(false)
        .ecsSupport(false)
        .networks(TeamsLocationNetworkArgs.builder()
            .network("string")
            .id("string")
            .build())
        .build());
    
    teams_location_resource = cloudflare.TeamsLocation("teamsLocationResource",
        account_id="string",
        name="string",
        client_default=False,
        ecs_support=False,
        networks=[cloudflare.TeamsLocationNetworkArgs(
            network="string",
            id="string",
        )])
    
    const teamsLocationResource = new cloudflare.TeamsLocation("teamsLocationResource", {
        accountId: "string",
        name: "string",
        clientDefault: false,
        ecsSupport: false,
        networks: [{
            network: "string",
            id: "string",
        }],
    });
    
    type: cloudflare:TeamsLocation
    properties:
        accountId: string
        clientDefault: false
        ecsSupport: false
        name: string
        networks:
            - id: string
              network: string
    

    TeamsLocation Resource Properties

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

    Inputs

    The TeamsLocation 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<TeamsLocationNetwork>
    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 []TeamsLocationNetworkArgs
    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<TeamsLocationNetwork>
    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 TeamsLocationNetwork[]
    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[TeamsLocationNetworkArgs]
    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 TeamsLocation 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 TeamsLocation Resource

    Get an existing TeamsLocation 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?: TeamsLocationState, opts?: CustomResourceOptions): TeamsLocation
    @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[TeamsLocationNetworkArgs]] = None,
            policy_ids: Optional[Sequence[str]] = None) -> TeamsLocation
    func GetTeamsLocation(ctx *Context, name string, id IDInput, state *TeamsLocationState, opts ...ResourceOption) (*TeamsLocation, error)
    public static TeamsLocation Get(string name, Input<string> id, TeamsLocationState? state, CustomResourceOptions? opts = null)
    public static TeamsLocation get(String name, Output<String> id, TeamsLocationState 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<TeamsLocationNetwork>
    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 []TeamsLocationNetworkArgs
    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<TeamsLocationNetwork>
    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 TeamsLocationNetwork[]
    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[TeamsLocationNetworkArgs]
    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

    TeamsLocationNetwork, TeamsLocationNetworkArgs

    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/teamsLocation:TeamsLocation 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.33.1 published on Wednesday, Jun 26, 2024 by Pulumi