published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
IP Lists are a set of IP addresses or CIDR ranges that are configured on the account level. Once created, IP Lists can be used in Firewall Rules across all zones within the same account.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var example = new Cloudflare.IpList("example", new()
{
AccountId = "d41d8cd98f00b204e9800998ecf8427e",
Description = "list description",
Items = new[]
{
new Cloudflare.Inputs.IpListItemArgs
{
Comment = "Office IP",
Value = "192.0.2.1",
},
new Cloudflare.Inputs.IpListItemArgs
{
Comment = "Datacenter range",
Value = "203.0.113.0/24",
},
},
Kind = "ip",
Name = "example_list",
});
});
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v4/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewIpList(ctx, "example", &cloudflare.IpListArgs{
AccountId: pulumi.String("d41d8cd98f00b204e9800998ecf8427e"),
Description: pulumi.String("list description"),
Items: cloudflare.IpListItemArray{
&cloudflare.IpListItemArgs{
Comment: pulumi.String("Office IP"),
Value: pulumi.String("192.0.2.1"),
},
&cloudflare.IpListItemArgs{
Comment: pulumi.String("Datacenter range"),
Value: pulumi.String("203.0.113.0/24"),
},
},
Kind: pulumi.String("ip"),
Name: pulumi.String("example_list"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.IpList;
import com.pulumi.cloudflare.IpListArgs;
import com.pulumi.cloudflare.inputs.IpListItemArgs;
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 IpList("example", IpListArgs.builder()
.accountId("d41d8cd98f00b204e9800998ecf8427e")
.description("list description")
.items(
IpListItemArgs.builder()
.comment("Office IP")
.value("192.0.2.1")
.build(),
IpListItemArgs.builder()
.comment("Datacenter range")
.value("203.0.113.0/24")
.build())
.kind("ip")
.name("example_list")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const example = new cloudflare.IpList("example", {
accountId: "d41d8cd98f00b204e9800998ecf8427e",
description: "list description",
items: [
{
comment: "Office IP",
value: "192.0.2.1",
},
{
comment: "Datacenter range",
value: "203.0.113.0/24",
},
],
kind: "ip",
name: "example_list",
});
import pulumi
import pulumi_cloudflare as cloudflare
example = cloudflare.IpList("example",
account_id="d41d8cd98f00b204e9800998ecf8427e",
description="list description",
items=[
cloudflare.IpListItemArgs(
comment="Office IP",
value="192.0.2.1",
),
cloudflare.IpListItemArgs(
comment="Datacenter range",
value="203.0.113.0/24",
),
],
kind="ip",
name="example_list")
resources:
example:
type: cloudflare:IpList
properties:
accountId: d41d8cd98f00b204e9800998ecf8427e
description: list description
items:
- comment: Office IP
value: 192.0.2.1
- comment: Datacenter range
value: 203.0.113.0/24
kind: ip
name: example_list
Create IpList Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IpList(name: string, args: IpListArgs, opts?: CustomResourceOptions);@overload
def IpList(resource_name: str,
args: IpListArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IpList(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
kind: Optional[str] = None,
name: Optional[str] = None,
description: Optional[str] = None,
items: Optional[Sequence[IpListItemArgs]] = None)func NewIpList(ctx *Context, name string, args IpListArgs, opts ...ResourceOption) (*IpList, error)public IpList(string name, IpListArgs args, CustomResourceOptions? opts = null)
public IpList(String name, IpListArgs args)
public IpList(String name, IpListArgs args, CustomResourceOptions options)
type: cloudflare:IpList
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 IpListArgs
- 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 IpListArgs
- 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 IpListArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IpListArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IpListArgs
- 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 ipListResource = new Cloudflare.IpList("ipListResource", new()
{
AccountId = "string",
Kind = "string",
Name = "string",
Description = "string",
Items = new[]
{
new Cloudflare.Inputs.IpListItemArgs
{
Value = "string",
Comment = "string",
},
},
});
example, err := cloudflare.NewIpList(ctx, "ipListResource", &cloudflare.IpListArgs{
AccountId: pulumi.String("string"),
Kind: pulumi.String("string"),
Name: pulumi.String("string"),
Description: pulumi.String("string"),
Items: cloudflare.IpListItemArray{
&cloudflare.IpListItemArgs{
Value: pulumi.String("string"),
Comment: pulumi.String("string"),
},
},
})
var ipListResource = new IpList("ipListResource", IpListArgs.builder()
.accountId("string")
.kind("string")
.name("string")
.description("string")
.items(IpListItemArgs.builder()
.value("string")
.comment("string")
.build())
.build());
ip_list_resource = cloudflare.IpList("ipListResource",
account_id="string",
kind="string",
name="string",
description="string",
items=[{
"value": "string",
"comment": "string",
}])
const ipListResource = new cloudflare.IpList("ipListResource", {
accountId: "string",
kind: "string",
name: "string",
description: "string",
items: [{
value: "string",
comment: "string",
}],
});
type: cloudflare:IpList
properties:
accountId: string
description: string
items:
- comment: string
value: string
kind: string
name: string
IpList 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 IpList resource accepts the following input properties:
- Account
Id string - The ID of the account where the IP List is being created.
- Kind string
- The kind of values in the List. Valid values:
ip. - Name string
- The name of the list (used in filter expressions). Valid pattern:
^[a-zA-Z0-9_]+$. Maximum Length: 50 - Description string
- A note that can be used to annotate the List. Maximum Length: 500
- Items
List<Ip
List Item>
- Account
Id string - The ID of the account where the IP List is being created.
- Kind string
- The kind of values in the List. Valid values:
ip. - Name string
- The name of the list (used in filter expressions). Valid pattern:
^[a-zA-Z0-9_]+$. Maximum Length: 50 - Description string
- A note that can be used to annotate the List. Maximum Length: 500
- Items
[]Ip
List Item Args
- account
Id String - The ID of the account where the IP List is being created.
- kind String
- The kind of values in the List. Valid values:
ip. - name String
- The name of the list (used in filter expressions). Valid pattern:
^[a-zA-Z0-9_]+$. Maximum Length: 50 - description String
- A note that can be used to annotate the List. Maximum Length: 500
- items
List<Ip
List Item>
- account
Id string - The ID of the account where the IP List is being created.
- kind string
- The kind of values in the List. Valid values:
ip. - name string
- The name of the list (used in filter expressions). Valid pattern:
^[a-zA-Z0-9_]+$. Maximum Length: 50 - description string
- A note that can be used to annotate the List. Maximum Length: 500
- items
Ip
List Item[]
- account_
id str - The ID of the account where the IP List is being created.
- kind str
- The kind of values in the List. Valid values:
ip. - name str
- The name of the list (used in filter expressions). Valid pattern:
^[a-zA-Z0-9_]+$. Maximum Length: 50 - description str
- A note that can be used to annotate the List. Maximum Length: 500
- items
Sequence[Ip
List Item Args]
- account
Id String - The ID of the account where the IP List is being created.
- kind String
- The kind of values in the List. Valid values:
ip. - name String
- The name of the list (used in filter expressions). Valid pattern:
^[a-zA-Z0-9_]+$. Maximum Length: 50 - description String
- A note that can be used to annotate the List. Maximum Length: 500
- items List<Property Map>
Outputs
All input properties are implicitly available as output properties. Additionally, the IpList 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 IpList Resource
Get an existing IpList 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?: IpListState, opts?: CustomResourceOptions): IpList@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
description: Optional[str] = None,
items: Optional[Sequence[IpListItemArgs]] = None,
kind: Optional[str] = None,
name: Optional[str] = None) -> IpListfunc GetIpList(ctx *Context, name string, id IDInput, state *IpListState, opts ...ResourceOption) (*IpList, error)public static IpList Get(string name, Input<string> id, IpListState? state, CustomResourceOptions? opts = null)public static IpList get(String name, Output<String> id, IpListState state, CustomResourceOptions options)resources: _: type: cloudflare:IpList 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 - The ID of the account where the IP List is being created.
- Description string
- A note that can be used to annotate the List. Maximum Length: 500
- Items
List<Ip
List Item> - Kind string
- The kind of values in the List. Valid values:
ip. - Name string
- The name of the list (used in filter expressions). Valid pattern:
^[a-zA-Z0-9_]+$. Maximum Length: 50
- Account
Id string - The ID of the account where the IP List is being created.
- Description string
- A note that can be used to annotate the List. Maximum Length: 500
- Items
[]Ip
List Item Args - Kind string
- The kind of values in the List. Valid values:
ip. - Name string
- The name of the list (used in filter expressions). Valid pattern:
^[a-zA-Z0-9_]+$. Maximum Length: 50
- account
Id String - The ID of the account where the IP List is being created.
- description String
- A note that can be used to annotate the List. Maximum Length: 500
- items
List<Ip
List Item> - kind String
- The kind of values in the List. Valid values:
ip. - name String
- The name of the list (used in filter expressions). Valid pattern:
^[a-zA-Z0-9_]+$. Maximum Length: 50
- account
Id string - The ID of the account where the IP List is being created.
- description string
- A note that can be used to annotate the List. Maximum Length: 500
- items
Ip
List Item[] - kind string
- The kind of values in the List. Valid values:
ip. - name string
- The name of the list (used in filter expressions). Valid pattern:
^[a-zA-Z0-9_]+$. Maximum Length: 50
- account_
id str - The ID of the account where the IP List is being created.
- description str
- A note that can be used to annotate the List. Maximum Length: 500
- items
Sequence[Ip
List Item Args] - kind str
- The kind of values in the List. Valid values:
ip. - name str
- The name of the list (used in filter expressions). Valid pattern:
^[a-zA-Z0-9_]+$. Maximum Length: 50
- account
Id String - The ID of the account where the IP List is being created.
- description String
- A note that can be used to annotate the List. Maximum Length: 500
- items List<Property Map>
- kind String
- The kind of values in the List. Valid values:
ip. - name String
- The name of the list (used in filter expressions). Valid pattern:
^[a-zA-Z0-9_]+$. Maximum Length: 50
Supporting Types
IpListItem, IpListItemArgs
Import
An existing IP List can be imported using the account ID and list ID
$ pulumi import cloudflare:index/ipList:IpList example d41d8cd98f00b204e9800998ecf8427e/cb029e245cfdd66dc8d2e570d5dd3322
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 Monday, Mar 9, 2026 by Pulumi
