cloudflare.TeamsLocation
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.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:
- 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<Teams
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
[]Teams
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<Teams
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
Teams
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[Teams
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 TeamsLocation 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 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.
- 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<Teams
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
[]Teams
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<Teams
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
Teams
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[Teams
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
TeamsLocationNetwork, TeamsLocationNetworkArgs
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.