published on Saturday, May 2, 2026 by Pulumi
published on Saturday, May 2, 2026 by Pulumi
Accepted Permissions
Cloudflare One Networks ReadCloudflare One Networks Write
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleZeroTrustDeviceSubnet = new cloudflare.ZeroTrustDeviceSubnet("example_zero_trust_device_subnet", {
accountId: "699d98642c564d2e855e9661899b7252",
name: "IPv4 Cloudflare Source IPs",
network: "100.64.0.0/12",
comment: "example comment",
isDefaultNetwork: true,
});
import pulumi
import pulumi_cloudflare as cloudflare
example_zero_trust_device_subnet = cloudflare.ZeroTrustDeviceSubnet("example_zero_trust_device_subnet",
account_id="699d98642c564d2e855e9661899b7252",
name="IPv4 Cloudflare Source IPs",
network="100.64.0.0/12",
comment="example comment",
is_default_network=True)
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewZeroTrustDeviceSubnet(ctx, "example_zero_trust_device_subnet", &cloudflare.ZeroTrustDeviceSubnetArgs{
AccountId: pulumi.String("699d98642c564d2e855e9661899b7252"),
Name: pulumi.String("IPv4 Cloudflare Source IPs"),
Network: pulumi.String("100.64.0.0/12"),
Comment: pulumi.String("example comment"),
IsDefaultNetwork: pulumi.Bool(true),
})
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 exampleZeroTrustDeviceSubnet = new Cloudflare.Index.ZeroTrustDeviceSubnet("example_zero_trust_device_subnet", new()
{
AccountId = "699d98642c564d2e855e9661899b7252",
Name = "IPv4 Cloudflare Source IPs",
Network = "100.64.0.0/12",
Comment = "example comment",
IsDefaultNetwork = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.ZeroTrustDeviceSubnet;
import com.pulumi.cloudflare.ZeroTrustDeviceSubnetArgs;
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 exampleZeroTrustDeviceSubnet = new ZeroTrustDeviceSubnet("exampleZeroTrustDeviceSubnet", ZeroTrustDeviceSubnetArgs.builder()
.accountId("699d98642c564d2e855e9661899b7252")
.name("IPv4 Cloudflare Source IPs")
.network("100.64.0.0/12")
.comment("example comment")
.isDefaultNetwork(true)
.build());
}
}
resources:
exampleZeroTrustDeviceSubnet:
type: cloudflare:ZeroTrustDeviceSubnet
name: example_zero_trust_device_subnet
properties:
accountId: 699d98642c564d2e855e9661899b7252
name: IPv4 Cloudflare Source IPs
network: 100.64.0.0/12
comment: example comment
isDefaultNetwork: true
Create ZeroTrustDeviceSubnet Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ZeroTrustDeviceSubnet(name: string, args: ZeroTrustDeviceSubnetArgs, opts?: CustomResourceOptions);@overload
def ZeroTrustDeviceSubnet(resource_name: str,
args: ZeroTrustDeviceSubnetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ZeroTrustDeviceSubnet(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
network: Optional[str] = None,
account_id: Optional[str] = None,
comment: Optional[str] = None,
is_default_network: Optional[bool] = None)func NewZeroTrustDeviceSubnet(ctx *Context, name string, args ZeroTrustDeviceSubnetArgs, opts ...ResourceOption) (*ZeroTrustDeviceSubnet, error)public ZeroTrustDeviceSubnet(string name, ZeroTrustDeviceSubnetArgs args, CustomResourceOptions? opts = null)
public ZeroTrustDeviceSubnet(String name, ZeroTrustDeviceSubnetArgs args)
public ZeroTrustDeviceSubnet(String name, ZeroTrustDeviceSubnetArgs args, CustomResourceOptions options)
type: cloudflare:ZeroTrustDeviceSubnet
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 ZeroTrustDeviceSubnetArgs
- 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 ZeroTrustDeviceSubnetArgs
- 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 ZeroTrustDeviceSubnetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ZeroTrustDeviceSubnetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ZeroTrustDeviceSubnetArgs
- 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 zeroTrustDeviceSubnetResource = new Cloudflare.ZeroTrustDeviceSubnet("zeroTrustDeviceSubnetResource", new()
{
Name = "string",
Network = "string",
AccountId = "string",
Comment = "string",
IsDefaultNetwork = false,
});
example, err := cloudflare.NewZeroTrustDeviceSubnet(ctx, "zeroTrustDeviceSubnetResource", &cloudflare.ZeroTrustDeviceSubnetArgs{
Name: pulumi.String("string"),
Network: pulumi.String("string"),
AccountId: pulumi.String("string"),
Comment: pulumi.String("string"),
IsDefaultNetwork: pulumi.Bool(false),
})
var zeroTrustDeviceSubnetResource = new ZeroTrustDeviceSubnet("zeroTrustDeviceSubnetResource", ZeroTrustDeviceSubnetArgs.builder()
.name("string")
.network("string")
.accountId("string")
.comment("string")
.isDefaultNetwork(false)
.build());
zero_trust_device_subnet_resource = cloudflare.ZeroTrustDeviceSubnet("zeroTrustDeviceSubnetResource",
name="string",
network="string",
account_id="string",
comment="string",
is_default_network=False)
const zeroTrustDeviceSubnetResource = new cloudflare.ZeroTrustDeviceSubnet("zeroTrustDeviceSubnetResource", {
name: "string",
network: "string",
accountId: "string",
comment: "string",
isDefaultNetwork: false,
});
type: cloudflare:ZeroTrustDeviceSubnet
properties:
accountId: string
comment: string
isDefaultNetwork: false
name: string
network: string
ZeroTrustDeviceSubnet 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 ZeroTrustDeviceSubnet resource accepts the following input properties:
- Name string
- A user-friendly name for the subnet.
- Network string
- The private IPv4 or IPv6 range defining the subnet, in CIDR notation.
- Account
Id string - Cloudflare account ID
- Comment string
- An optional description of the subnet.
- Is
Default boolNetwork - If
true, this is the default subnet for the account. There can only be one default subnet per account.
- Name string
- A user-friendly name for the subnet.
- Network string
- The private IPv4 or IPv6 range defining the subnet, in CIDR notation.
- Account
Id string - Cloudflare account ID
- Comment string
- An optional description of the subnet.
- Is
Default boolNetwork - If
true, this is the default subnet for the account. There can only be one default subnet per account.
- name String
- A user-friendly name for the subnet.
- network String
- The private IPv4 or IPv6 range defining the subnet, in CIDR notation.
- account
Id String - Cloudflare account ID
- comment String
- An optional description of the subnet.
- is
Default BooleanNetwork - If
true, this is the default subnet for the account. There can only be one default subnet per account.
- name string
- A user-friendly name for the subnet.
- network string
- The private IPv4 or IPv6 range defining the subnet, in CIDR notation.
- account
Id string - Cloudflare account ID
- comment string
- An optional description of the subnet.
- is
Default booleanNetwork - If
true, this is the default subnet for the account. There can only be one default subnet per account.
- name str
- A user-friendly name for the subnet.
- network str
- The private IPv4 or IPv6 range defining the subnet, in CIDR notation.
- account_
id str - Cloudflare account ID
- comment str
- An optional description of the subnet.
- is_
default_ boolnetwork - If
true, this is the default subnet for the account. There can only be one default subnet per account.
- name String
- A user-friendly name for the subnet.
- network String
- The private IPv4 or IPv6 range defining the subnet, in CIDR notation.
- account
Id String - Cloudflare account ID
- comment String
- An optional description of the subnet.
- is
Default BooleanNetwork - If
true, this is the default subnet for the account. There can only be one default subnet per account.
Outputs
All input properties are implicitly available as output properties. Additionally, the ZeroTrustDeviceSubnet resource produces the following output properties:
- Created
At string - Timestamp of when the resource was created.
- Deleted
At string - Timestamp of when the resource was deleted. If
null, the resource has not been deleted. - Id string
- The provider-assigned unique ID for this managed resource.
- Subnet
Type string - The type of subnet. Available values: "cloudflareSource", "warp".
- Created
At string - Timestamp of when the resource was created.
- Deleted
At string - Timestamp of when the resource was deleted. If
null, the resource has not been deleted. - Id string
- The provider-assigned unique ID for this managed resource.
- Subnet
Type string - The type of subnet. Available values: "cloudflareSource", "warp".
- created
At String - Timestamp of when the resource was created.
- deleted
At String - Timestamp of when the resource was deleted. If
null, the resource has not been deleted. - id String
- The provider-assigned unique ID for this managed resource.
- subnet
Type String - The type of subnet. Available values: "cloudflareSource", "warp".
- created
At string - Timestamp of when the resource was created.
- deleted
At string - Timestamp of when the resource was deleted. If
null, the resource has not been deleted. - id string
- The provider-assigned unique ID for this managed resource.
- subnet
Type string - The type of subnet. Available values: "cloudflareSource", "warp".
- created_
at str - Timestamp of when the resource was created.
- deleted_
at str - Timestamp of when the resource was deleted. If
null, the resource has not been deleted. - id str
- The provider-assigned unique ID for this managed resource.
- subnet_
type str - The type of subnet. Available values: "cloudflareSource", "warp".
- created
At String - Timestamp of when the resource was created.
- deleted
At String - Timestamp of when the resource was deleted. If
null, the resource has not been deleted. - id String
- The provider-assigned unique ID for this managed resource.
- subnet
Type String - The type of subnet. Available values: "cloudflareSource", "warp".
Look up Existing ZeroTrustDeviceSubnet Resource
Get an existing ZeroTrustDeviceSubnet 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?: ZeroTrustDeviceSubnetState, opts?: CustomResourceOptions): ZeroTrustDeviceSubnet@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
comment: Optional[str] = None,
created_at: Optional[str] = None,
deleted_at: Optional[str] = None,
is_default_network: Optional[bool] = None,
name: Optional[str] = None,
network: Optional[str] = None,
subnet_type: Optional[str] = None) -> ZeroTrustDeviceSubnetfunc GetZeroTrustDeviceSubnet(ctx *Context, name string, id IDInput, state *ZeroTrustDeviceSubnetState, opts ...ResourceOption) (*ZeroTrustDeviceSubnet, error)public static ZeroTrustDeviceSubnet Get(string name, Input<string> id, ZeroTrustDeviceSubnetState? state, CustomResourceOptions? opts = null)public static ZeroTrustDeviceSubnet get(String name, Output<String> id, ZeroTrustDeviceSubnetState state, CustomResourceOptions options)resources: _: type: cloudflare:ZeroTrustDeviceSubnet get: id: ${id}- 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 - Cloudflare account ID
- Comment string
- An optional description of the subnet.
- Created
At string - Timestamp of when the resource was created.
- Deleted
At string - Timestamp of when the resource was deleted. If
null, the resource has not been deleted. - Is
Default boolNetwork - If
true, this is the default subnet for the account. There can only be one default subnet per account. - Name string
- A user-friendly name for the subnet.
- Network string
- The private IPv4 or IPv6 range defining the subnet, in CIDR notation.
- Subnet
Type string - The type of subnet. Available values: "cloudflareSource", "warp".
- Account
Id string - Cloudflare account ID
- Comment string
- An optional description of the subnet.
- Created
At string - Timestamp of when the resource was created.
- Deleted
At string - Timestamp of when the resource was deleted. If
null, the resource has not been deleted. - Is
Default boolNetwork - If
true, this is the default subnet for the account. There can only be one default subnet per account. - Name string
- A user-friendly name for the subnet.
- Network string
- The private IPv4 or IPv6 range defining the subnet, in CIDR notation.
- Subnet
Type string - The type of subnet. Available values: "cloudflareSource", "warp".
- account
Id String - Cloudflare account ID
- comment String
- An optional description of the subnet.
- created
At String - Timestamp of when the resource was created.
- deleted
At String - Timestamp of when the resource was deleted. If
null, the resource has not been deleted. - is
Default BooleanNetwork - If
true, this is the default subnet for the account. There can only be one default subnet per account. - name String
- A user-friendly name for the subnet.
- network String
- The private IPv4 or IPv6 range defining the subnet, in CIDR notation.
- subnet
Type String - The type of subnet. Available values: "cloudflareSource", "warp".
- account
Id string - Cloudflare account ID
- comment string
- An optional description of the subnet.
- created
At string - Timestamp of when the resource was created.
- deleted
At string - Timestamp of when the resource was deleted. If
null, the resource has not been deleted. - is
Default booleanNetwork - If
true, this is the default subnet for the account. There can only be one default subnet per account. - name string
- A user-friendly name for the subnet.
- network string
- The private IPv4 or IPv6 range defining the subnet, in CIDR notation.
- subnet
Type string - The type of subnet. Available values: "cloudflareSource", "warp".
- account_
id str - Cloudflare account ID
- comment str
- An optional description of the subnet.
- created_
at str - Timestamp of when the resource was created.
- deleted_
at str - Timestamp of when the resource was deleted. If
null, the resource has not been deleted. - is_
default_ boolnetwork - If
true, this is the default subnet for the account. There can only be one default subnet per account. - name str
- A user-friendly name for the subnet.
- network str
- The private IPv4 or IPv6 range defining the subnet, in CIDR notation.
- subnet_
type str - The type of subnet. Available values: "cloudflareSource", "warp".
- account
Id String - Cloudflare account ID
- comment String
- An optional description of the subnet.
- created
At String - Timestamp of when the resource was created.
- deleted
At String - Timestamp of when the resource was deleted. If
null, the resource has not been deleted. - is
Default BooleanNetwork - If
true, this is the default subnet for the account. There can only be one default subnet per account. - name String
- A user-friendly name for the subnet.
- network String
- The private IPv4 or IPv6 range defining the subnet, in CIDR notation.
- subnet
Type String - The type of subnet. Available values: "cloudflareSource", "warp".
Import
$ pulumi import cloudflare:index/zeroTrustDeviceSubnet:ZeroTrustDeviceSubnet example '<account_id>/<subnet_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
cloudflareTerraform Provider.
published on Saturday, May 2, 2026 by Pulumi
