1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. ZeroTrustList
Cloudflare v6.0.1 published on Wednesday, Apr 16, 2025 by Pulumi

cloudflare.ZeroTrustList

Explore with Pulumi AI

Example Usage

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

const exampleZeroTrustList = new cloudflare.ZeroTrustList("example_zero_trust_list", {
    accountId: "699d98642c564d2e855e9661899b7252",
    name: "Admin Serial Numbers",
    type: "SERIAL",
    description: "The serial numbers for administrators",
    items: [{
        description: "Austin office IP",
        value: "8GE8721REF",
    }],
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example_zero_trust_list = cloudflare.ZeroTrustList("example_zero_trust_list",
    account_id="699d98642c564d2e855e9661899b7252",
    name="Admin Serial Numbers",
    type="SERIAL",
    description="The serial numbers for administrators",
    items=[{
        "description": "Austin office IP",
        "value": "8GE8721REF",
    }])
Copy
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.NewZeroTrustList(ctx, "example_zero_trust_list", &cloudflare.ZeroTrustListArgs{
			AccountId:   pulumi.String("699d98642c564d2e855e9661899b7252"),
			Name:        pulumi.String("Admin Serial Numbers"),
			Type:        pulumi.String("SERIAL"),
			Description: pulumi.String("The serial numbers for administrators"),
			Items: cloudflare.ZeroTrustListItemArray{
				&cloudflare.ZeroTrustListItemArgs{
					Description: pulumi.String("Austin office IP"),
					Value:       pulumi.String("8GE8721REF"),
				},
			},
		})
		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 exampleZeroTrustList = new Cloudflare.ZeroTrustList("example_zero_trust_list", new()
    {
        AccountId = "699d98642c564d2e855e9661899b7252",
        Name = "Admin Serial Numbers",
        Type = "SERIAL",
        Description = "The serial numbers for administrators",
        Items = new[]
        {
            new Cloudflare.Inputs.ZeroTrustListItemArgs
            {
                Description = "Austin office IP",
                Value = "8GE8721REF",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.ZeroTrustList;
import com.pulumi.cloudflare.ZeroTrustListArgs;
import com.pulumi.cloudflare.inputs.ZeroTrustListItemArgs;
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 exampleZeroTrustList = new ZeroTrustList("exampleZeroTrustList", ZeroTrustListArgs.builder()
            .accountId("699d98642c564d2e855e9661899b7252")
            .name("Admin Serial Numbers")
            .type("SERIAL")
            .description("The serial numbers for administrators")
            .items(ZeroTrustListItemArgs.builder()
                .description("Austin office IP")
                .value("8GE8721REF")
                .build())
            .build());

    }
}
Copy
resources:
  exampleZeroTrustList:
    type: cloudflare:ZeroTrustList
    name: example_zero_trust_list
    properties:
      accountId: 699d98642c564d2e855e9661899b7252
      name: Admin Serial Numbers
      type: SERIAL
      description: The serial numbers for administrators
      items:
        - description: Austin office IP
          value: 8GE8721REF
Copy

Create ZeroTrustList Resource

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

Constructor syntax

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

@overload
def ZeroTrustList(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  account_id: Optional[str] = None,
                  name: Optional[str] = None,
                  type: Optional[str] = None,
                  description: Optional[str] = None,
                  items: Optional[Sequence[ZeroTrustListItemArgs]] = None)
func NewZeroTrustList(ctx *Context, name string, args ZeroTrustListArgs, opts ...ResourceOption) (*ZeroTrustList, error)
public ZeroTrustList(string name, ZeroTrustListArgs args, CustomResourceOptions? opts = null)
public ZeroTrustList(String name, ZeroTrustListArgs args)
public ZeroTrustList(String name, ZeroTrustListArgs args, CustomResourceOptions options)
type: cloudflare:ZeroTrustList
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. ZeroTrustListArgs
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. ZeroTrustListArgs
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. ZeroTrustListArgs
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. ZeroTrustListArgs
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. ZeroTrustListArgs
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 zeroTrustListResource = new Cloudflare.ZeroTrustList("zeroTrustListResource", new()
{
    AccountId = "string",
    Name = "string",
    Type = "string",
    Description = "string",
    Items = new[]
    {
        new Cloudflare.Inputs.ZeroTrustListItemArgs
        {
            CreatedAt = "string",
            Description = "string",
            Value = "string",
        },
    },
});
Copy
example, err := cloudflare.NewZeroTrustList(ctx, "zeroTrustListResource", &cloudflare.ZeroTrustListArgs{
	AccountId:   pulumi.String("string"),
	Name:        pulumi.String("string"),
	Type:        pulumi.String("string"),
	Description: pulumi.String("string"),
	Items: cloudflare.ZeroTrustListItemArray{
		&cloudflare.ZeroTrustListItemArgs{
			CreatedAt:   pulumi.String("string"),
			Description: pulumi.String("string"),
			Value:       pulumi.String("string"),
		},
	},
})
Copy
var zeroTrustListResource = new ZeroTrustList("zeroTrustListResource", ZeroTrustListArgs.builder()
    .accountId("string")
    .name("string")
    .type("string")
    .description("string")
    .items(ZeroTrustListItemArgs.builder()
        .createdAt("string")
        .description("string")
        .value("string")
        .build())
    .build());
Copy
zero_trust_list_resource = cloudflare.ZeroTrustList("zeroTrustListResource",
    account_id="string",
    name="string",
    type="string",
    description="string",
    items=[{
        "created_at": "string",
        "description": "string",
        "value": "string",
    }])
Copy
const zeroTrustListResource = new cloudflare.ZeroTrustList("zeroTrustListResource", {
    accountId: "string",
    name: "string",
    type: "string",
    description: "string",
    items: [{
        createdAt: "string",
        description: "string",
        value: "string",
    }],
});
Copy
type: cloudflare:ZeroTrustList
properties:
    accountId: string
    description: string
    items:
        - createdAt: string
          description: string
          value: string
    name: string
    type: string
Copy

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

AccountId This property is required. string
Name This property is required. string
The name of the list.
Type This property is required. string
The type of list. Available values: "SERIAL", "URL", "DOMAIN", "EMAIL", "IP".
Description string
The description of the list.
Items List<ZeroTrustListItem>
The items in the list.
AccountId This property is required. string
Name This property is required. string
The name of the list.
Type This property is required. string
The type of list. Available values: "SERIAL", "URL", "DOMAIN", "EMAIL", "IP".
Description string
The description of the list.
Items []ZeroTrustListItemArgs
The items in the list.
accountId This property is required. String
name This property is required. String
The name of the list.
type This property is required. String
The type of list. Available values: "SERIAL", "URL", "DOMAIN", "EMAIL", "IP".
description String
The description of the list.
items List<ZeroTrustListItem>
The items in the list.
accountId This property is required. string
name This property is required. string
The name of the list.
type This property is required. string
The type of list. Available values: "SERIAL", "URL", "DOMAIN", "EMAIL", "IP".
description string
The description of the list.
items ZeroTrustListItem[]
The items in the list.
account_id This property is required. str
name This property is required. str
The name of the list.
type This property is required. str
The type of list. Available values: "SERIAL", "URL", "DOMAIN", "EMAIL", "IP".
description str
The description of the list.
items Sequence[ZeroTrustListItemArgs]
The items in the list.
accountId This property is required. String
name This property is required. String
The name of the list.
type This property is required. String
The type of list. Available values: "SERIAL", "URL", "DOMAIN", "EMAIL", "IP".
description String
The description of the list.
items List<Property Map>
The items in the list.

Outputs

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

CreatedAt string
Id string
The provider-assigned unique ID for this managed resource.
ListCount double
The number of items in the list.
UpdatedAt string
CreatedAt string
Id string
The provider-assigned unique ID for this managed resource.
ListCount float64
The number of items in the list.
UpdatedAt string
createdAt String
id String
The provider-assigned unique ID for this managed resource.
listCount Double
The number of items in the list.
updatedAt String
createdAt string
id string
The provider-assigned unique ID for this managed resource.
listCount number
The number of items in the list.
updatedAt string
created_at str
id str
The provider-assigned unique ID for this managed resource.
list_count float
The number of items in the list.
updated_at str
createdAt String
id String
The provider-assigned unique ID for this managed resource.
listCount Number
The number of items in the list.
updatedAt String

Look up Existing ZeroTrustList Resource

Get an existing ZeroTrustList 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?: ZeroTrustListState, opts?: CustomResourceOptions): ZeroTrustList
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_id: Optional[str] = None,
        created_at: Optional[str] = None,
        description: Optional[str] = None,
        items: Optional[Sequence[ZeroTrustListItemArgs]] = None,
        list_count: Optional[float] = None,
        name: Optional[str] = None,
        type: Optional[str] = None,
        updated_at: Optional[str] = None) -> ZeroTrustList
func GetZeroTrustList(ctx *Context, name string, id IDInput, state *ZeroTrustListState, opts ...ResourceOption) (*ZeroTrustList, error)
public static ZeroTrustList Get(string name, Input<string> id, ZeroTrustListState? state, CustomResourceOptions? opts = null)
public static ZeroTrustList get(String name, Output<String> id, ZeroTrustListState state, CustomResourceOptions options)
resources:  _:    type: cloudflare:ZeroTrustList    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
CreatedAt string
Description string
The description of the list.
Items List<ZeroTrustListItem>
The items in the list.
ListCount double
The number of items in the list.
Name string
The name of the list.
Type string
The type of list. Available values: "SERIAL", "URL", "DOMAIN", "EMAIL", "IP".
UpdatedAt string
AccountId string
CreatedAt string
Description string
The description of the list.
Items []ZeroTrustListItemArgs
The items in the list.
ListCount float64
The number of items in the list.
Name string
The name of the list.
Type string
The type of list. Available values: "SERIAL", "URL", "DOMAIN", "EMAIL", "IP".
UpdatedAt string
accountId String
createdAt String
description String
The description of the list.
items List<ZeroTrustListItem>
The items in the list.
listCount Double
The number of items in the list.
name String
The name of the list.
type String
The type of list. Available values: "SERIAL", "URL", "DOMAIN", "EMAIL", "IP".
updatedAt String
accountId string
createdAt string
description string
The description of the list.
items ZeroTrustListItem[]
The items in the list.
listCount number
The number of items in the list.
name string
The name of the list.
type string
The type of list. Available values: "SERIAL", "URL", "DOMAIN", "EMAIL", "IP".
updatedAt string
account_id str
created_at str
description str
The description of the list.
items Sequence[ZeroTrustListItemArgs]
The items in the list.
list_count float
The number of items in the list.
name str
The name of the list.
type str
The type of list. Available values: "SERIAL", "URL", "DOMAIN", "EMAIL", "IP".
updated_at str
accountId String
createdAt String
description String
The description of the list.
items List<Property Map>
The items in the list.
listCount Number
The number of items in the list.
name String
The name of the list.
type String
The type of list. Available values: "SERIAL", "URL", "DOMAIN", "EMAIL", "IP".
updatedAt String

Supporting Types

ZeroTrustListItem
, ZeroTrustListItemArgs

CreatedAt string
Description string
The description of the list item, if present
Value string
The value of the item in a list.
CreatedAt string
Description string
The description of the list item, if present
Value string
The value of the item in a list.
createdAt String
description String
The description of the list item, if present
value String
The value of the item in a list.
createdAt string
description string
The description of the list item, if present
value string
The value of the item in a list.
created_at str
description str
The description of the list item, if present
value str
The value of the item in a list.
createdAt String
description String
The description of the list item, if present
value String
The value of the item in a list.

Import

$ pulumi import cloudflare:index/zeroTrustList:ZeroTrustList example '<account_id>/<list_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.