1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. ZeroTrustDeviceManagedNetworks
Cloudflare v5.49.1 published on Tuesday, Feb 18, 2025 by Pulumi

cloudflare.ZeroTrustDeviceManagedNetworks

Explore with Pulumi AI

Provides a Cloudflare Device Managed Network resource. Device managed networks allow for building location-aware device settings policies.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const managedNetworks = new cloudflare.ZeroTrustDeviceManagedNetworks("managed_networks", {
    accountId: "f037e56e89293a057740de681ac9abbe",
    name: "managed-network-1",
    type: "tls",
    config: {
        tlsSockaddr: "foobar:1234",
        sha256: "b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c",
    },
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

managed_networks = cloudflare.ZeroTrustDeviceManagedNetworks("managed_networks",
    account_id="f037e56e89293a057740de681ac9abbe",
    name="managed-network-1",
    type="tls",
    config={
        "tls_sockaddr": "foobar:1234",
        "sha256": "b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c",
    })
Copy
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.NewZeroTrustDeviceManagedNetworks(ctx, "managed_networks", &cloudflare.ZeroTrustDeviceManagedNetworksArgs{
			AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
			Name:      pulumi.String("managed-network-1"),
			Type:      pulumi.String("tls"),
			Config: &cloudflare.ZeroTrustDeviceManagedNetworksConfigArgs{
				TlsSockaddr: pulumi.String("foobar:1234"),
				Sha256:      pulumi.String("b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

return await Deployment.RunAsync(() => 
{
    var managedNetworks = new Cloudflare.ZeroTrustDeviceManagedNetworks("managed_networks", new()
    {
        AccountId = "f037e56e89293a057740de681ac9abbe",
        Name = "managed-network-1",
        Type = "tls",
        Config = new Cloudflare.Inputs.ZeroTrustDeviceManagedNetworksConfigArgs
        {
            TlsSockaddr = "foobar:1234",
            Sha256 = "b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.ZeroTrustDeviceManagedNetworks;
import com.pulumi.cloudflare.ZeroTrustDeviceManagedNetworksArgs;
import com.pulumi.cloudflare.inputs.ZeroTrustDeviceManagedNetworksConfigArgs;
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 managedNetworks = new ZeroTrustDeviceManagedNetworks("managedNetworks", ZeroTrustDeviceManagedNetworksArgs.builder()
            .accountId("f037e56e89293a057740de681ac9abbe")
            .name("managed-network-1")
            .type("tls")
            .config(ZeroTrustDeviceManagedNetworksConfigArgs.builder()
                .tlsSockaddr("foobar:1234")
                .sha256("b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c")
                .build())
            .build());

    }
}
Copy
resources:
  managedNetworks:
    type: cloudflare:ZeroTrustDeviceManagedNetworks
    name: managed_networks
    properties:
      accountId: f037e56e89293a057740de681ac9abbe
      name: managed-network-1
      type: tls
      config:
        tlsSockaddr: foobar:1234
        sha256: b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c
Copy

Create ZeroTrustDeviceManagedNetworks Resource

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

Constructor syntax

new ZeroTrustDeviceManagedNetworks(name: string, args: ZeroTrustDeviceManagedNetworksArgs, opts?: CustomResourceOptions);
@overload
def ZeroTrustDeviceManagedNetworks(resource_name: str,
                                   args: ZeroTrustDeviceManagedNetworksArgs,
                                   opts: Optional[ResourceOptions] = None)

@overload
def ZeroTrustDeviceManagedNetworks(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   account_id: Optional[str] = None,
                                   config: Optional[ZeroTrustDeviceManagedNetworksConfigArgs] = None,
                                   name: Optional[str] = None,
                                   type: Optional[str] = None)
func NewZeroTrustDeviceManagedNetworks(ctx *Context, name string, args ZeroTrustDeviceManagedNetworksArgs, opts ...ResourceOption) (*ZeroTrustDeviceManagedNetworks, error)
public ZeroTrustDeviceManagedNetworks(string name, ZeroTrustDeviceManagedNetworksArgs args, CustomResourceOptions? opts = null)
public ZeroTrustDeviceManagedNetworks(String name, ZeroTrustDeviceManagedNetworksArgs args)
public ZeroTrustDeviceManagedNetworks(String name, ZeroTrustDeviceManagedNetworksArgs args, CustomResourceOptions options)
type: cloudflare:ZeroTrustDeviceManagedNetworks
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ZeroTrustDeviceManagedNetworksArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ZeroTrustDeviceManagedNetworksArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ZeroTrustDeviceManagedNetworksArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ZeroTrustDeviceManagedNetworksArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ZeroTrustDeviceManagedNetworksArgs
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 zeroTrustDeviceManagedNetworksResource = new Cloudflare.ZeroTrustDeviceManagedNetworks("zeroTrustDeviceManagedNetworksResource", new()
{
    AccountId = "string",
    Config = new Cloudflare.Inputs.ZeroTrustDeviceManagedNetworksConfigArgs
    {
        Sha256 = "string",
        TlsSockaddr = "string",
    },
    Name = "string",
    Type = "string",
});
Copy
example, err := cloudflare.NewZeroTrustDeviceManagedNetworks(ctx, "zeroTrustDeviceManagedNetworksResource", &cloudflare.ZeroTrustDeviceManagedNetworksArgs{
	AccountId: pulumi.String("string"),
	Config: &cloudflare.ZeroTrustDeviceManagedNetworksConfigArgs{
		Sha256:      pulumi.String("string"),
		TlsSockaddr: pulumi.String("string"),
	},
	Name: pulumi.String("string"),
	Type: pulumi.String("string"),
})
Copy
var zeroTrustDeviceManagedNetworksResource = new ZeroTrustDeviceManagedNetworks("zeroTrustDeviceManagedNetworksResource", ZeroTrustDeviceManagedNetworksArgs.builder()
    .accountId("string")
    .config(ZeroTrustDeviceManagedNetworksConfigArgs.builder()
        .sha256("string")
        .tlsSockaddr("string")
        .build())
    .name("string")
    .type("string")
    .build());
Copy
zero_trust_device_managed_networks_resource = cloudflare.ZeroTrustDeviceManagedNetworks("zeroTrustDeviceManagedNetworksResource",
    account_id="string",
    config={
        "sha256": "string",
        "tls_sockaddr": "string",
    },
    name="string",
    type="string")
Copy
const zeroTrustDeviceManagedNetworksResource = new cloudflare.ZeroTrustDeviceManagedNetworks("zeroTrustDeviceManagedNetworksResource", {
    accountId: "string",
    config: {
        sha256: "string",
        tlsSockaddr: "string",
    },
    name: "string",
    type: "string",
});
Copy
type: cloudflare:ZeroTrustDeviceManagedNetworks
properties:
    accountId: string
    config:
        sha256: string
        tlsSockaddr: string
    name: string
    type: string
Copy

ZeroTrustDeviceManagedNetworks 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 ZeroTrustDeviceManagedNetworks resource accepts the following input properties:

AccountId This property is required. string
The account identifier to target for the resource.
Config This property is required. ZeroTrustDeviceManagedNetworksConfig
The configuration containing information for the WARP client to detect the managed network.
Name This property is required. string
The name of the Device Managed Network. Must be unique.
Type This property is required. string
The type of Device Managed Network. Available values: tls.
AccountId This property is required. string
The account identifier to target for the resource.
Config This property is required. ZeroTrustDeviceManagedNetworksConfigArgs
The configuration containing information for the WARP client to detect the managed network.
Name This property is required. string
The name of the Device Managed Network. Must be unique.
Type This property is required. string
The type of Device Managed Network. Available values: tls.
accountId This property is required. String
The account identifier to target for the resource.
config This property is required. ZeroTrustDeviceManagedNetworksConfig
The configuration containing information for the WARP client to detect the managed network.
name This property is required. String
The name of the Device Managed Network. Must be unique.
type This property is required. String
The type of Device Managed Network. Available values: tls.
accountId This property is required. string
The account identifier to target for the resource.
config This property is required. ZeroTrustDeviceManagedNetworksConfig
The configuration containing information for the WARP client to detect the managed network.
name This property is required. string
The name of the Device Managed Network. Must be unique.
type This property is required. string
The type of Device Managed Network. Available values: tls.
account_id This property is required. str
The account identifier to target for the resource.
config This property is required. ZeroTrustDeviceManagedNetworksConfigArgs
The configuration containing information for the WARP client to detect the managed network.
name This property is required. str
The name of the Device Managed Network. Must be unique.
type This property is required. str
The type of Device Managed Network. Available values: tls.
accountId This property is required. String
The account identifier to target for the resource.
config This property is required. Property Map
The configuration containing information for the WARP client to detect the managed network.
name This property is required. String
The name of the Device Managed Network. Must be unique.
type This property is required. String
The type of Device Managed Network. Available values: tls.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ZeroTrustDeviceManagedNetworks Resource

Get an existing ZeroTrustDeviceManagedNetworks 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?: ZeroTrustDeviceManagedNetworksState, opts?: CustomResourceOptions): ZeroTrustDeviceManagedNetworks
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_id: Optional[str] = None,
        config: Optional[ZeroTrustDeviceManagedNetworksConfigArgs] = None,
        name: Optional[str] = None,
        type: Optional[str] = None) -> ZeroTrustDeviceManagedNetworks
func GetZeroTrustDeviceManagedNetworks(ctx *Context, name string, id IDInput, state *ZeroTrustDeviceManagedNetworksState, opts ...ResourceOption) (*ZeroTrustDeviceManagedNetworks, error)
public static ZeroTrustDeviceManagedNetworks Get(string name, Input<string> id, ZeroTrustDeviceManagedNetworksState? state, CustomResourceOptions? opts = null)
public static ZeroTrustDeviceManagedNetworks get(String name, Output<String> id, ZeroTrustDeviceManagedNetworksState state, CustomResourceOptions options)
resources:  _:    type: cloudflare:ZeroTrustDeviceManagedNetworks    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
Config ZeroTrustDeviceManagedNetworksConfig
The configuration containing information for the WARP client to detect the managed network.
Name string
The name of the Device Managed Network. Must be unique.
Type string
The type of Device Managed Network. Available values: tls.
AccountId string
The account identifier to target for the resource.
Config ZeroTrustDeviceManagedNetworksConfigArgs
The configuration containing information for the WARP client to detect the managed network.
Name string
The name of the Device Managed Network. Must be unique.
Type string
The type of Device Managed Network. Available values: tls.
accountId String
The account identifier to target for the resource.
config ZeroTrustDeviceManagedNetworksConfig
The configuration containing information for the WARP client to detect the managed network.
name String
The name of the Device Managed Network. Must be unique.
type String
The type of Device Managed Network. Available values: tls.
accountId string
The account identifier to target for the resource.
config ZeroTrustDeviceManagedNetworksConfig
The configuration containing information for the WARP client to detect the managed network.
name string
The name of the Device Managed Network. Must be unique.
type string
The type of Device Managed Network. Available values: tls.
account_id str
The account identifier to target for the resource.
config ZeroTrustDeviceManagedNetworksConfigArgs
The configuration containing information for the WARP client to detect the managed network.
name str
The name of the Device Managed Network. Must be unique.
type str
The type of Device Managed Network. Available values: tls.
accountId String
The account identifier to target for the resource.
config Property Map
The configuration containing information for the WARP client to detect the managed network.
name String
The name of the Device Managed Network. Must be unique.
type String
The type of Device Managed Network. Available values: tls.

Supporting Types

ZeroTrustDeviceManagedNetworksConfig
, ZeroTrustDeviceManagedNetworksConfigArgs

Sha256 This property is required. string
The SHA-256 hash of the TLS certificate presented by the host found at tls_sockaddr. If absent, regular certificate verification (trusted roots, valid timestamp, etc) will be used to validate the certificate.
TlsSockaddr This property is required. string
A network address of the form "host:port" that the WARP client will use to detect the presence of a TLS host.
Sha256 This property is required. string
The SHA-256 hash of the TLS certificate presented by the host found at tls_sockaddr. If absent, regular certificate verification (trusted roots, valid timestamp, etc) will be used to validate the certificate.
TlsSockaddr This property is required. string
A network address of the form "host:port" that the WARP client will use to detect the presence of a TLS host.
sha256 This property is required. String
The SHA-256 hash of the TLS certificate presented by the host found at tls_sockaddr. If absent, regular certificate verification (trusted roots, valid timestamp, etc) will be used to validate the certificate.
tlsSockaddr This property is required. String
A network address of the form "host:port" that the WARP client will use to detect the presence of a TLS host.
sha256 This property is required. string
The SHA-256 hash of the TLS certificate presented by the host found at tls_sockaddr. If absent, regular certificate verification (trusted roots, valid timestamp, etc) will be used to validate the certificate.
tlsSockaddr This property is required. string
A network address of the form "host:port" that the WARP client will use to detect the presence of a TLS host.
sha256 This property is required. str
The SHA-256 hash of the TLS certificate presented by the host found at tls_sockaddr. If absent, regular certificate verification (trusted roots, valid timestamp, etc) will be used to validate the certificate.
tls_sockaddr This property is required. str
A network address of the form "host:port" that the WARP client will use to detect the presence of a TLS host.
sha256 This property is required. String
The SHA-256 hash of the TLS certificate presented by the host found at tls_sockaddr. If absent, regular certificate verification (trusted roots, valid timestamp, etc) will be used to validate the certificate.
tlsSockaddr This property is required. String
A network address of the form "host:port" that the WARP client will use to detect the presence of a TLS host.

Import

$ pulumi import cloudflare:index/zeroTrustDeviceManagedNetworks:ZeroTrustDeviceManagedNetworks example <account_id>/<device_managed_networks_id>
Copy

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.