published on Thursday, Jul 16, 2026 by Pulumi
published on Thursday, Jul 16, 2026 by Pulumi
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleDlsPrefixBinding = new cloudflare.DlsPrefixBinding("example_dls_prefix_binding", {
accountId: "023e105f4ecef8ad9ca31a8372d0c353",
cidr: "10.0.1.0/24",
prefixId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
regionKey: "eu",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_dls_prefix_binding = cloudflare.DlsPrefixBinding("example_dls_prefix_binding",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
cidr="10.0.1.0/24",
prefix_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
region_key="eu")
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.NewDlsPrefixBinding(ctx, "example_dls_prefix_binding", &cloudflare.DlsPrefixBindingArgs{
AccountId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
Cidr: pulumi.String("10.0.1.0/24"),
PrefixId: pulumi.String("a1b2c3d4-e5f6-7890-abcd-ef1234567890"),
RegionKey: pulumi.String("eu"),
})
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 exampleDlsPrefixBinding = new Cloudflare.DlsPrefixBinding("example_dls_prefix_binding", new()
{
AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
Cidr = "10.0.1.0/24",
PrefixId = "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
RegionKey = "eu",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.DlsPrefixBinding;
import com.pulumi.cloudflare.DlsPrefixBindingArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 exampleDlsPrefixBinding = new DlsPrefixBinding("exampleDlsPrefixBinding", DlsPrefixBindingArgs.builder()
.accountId("023e105f4ecef8ad9ca31a8372d0c353")
.cidr("10.0.1.0/24")
.prefixId("a1b2c3d4-e5f6-7890-abcd-ef1234567890")
.regionKey("eu")
.build());
}
}
resources:
exampleDlsPrefixBinding:
type: cloudflare:DlsPrefixBinding
name: example_dls_prefix_binding
properties:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
cidr: 10.0.1.0/24
prefixId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
regionKey: eu
pulumi {
required_providers {
cloudflare = {
source = "pulumi/cloudflare"
}
}
}
resource "cloudflare_dlsprefixbinding" "example_dls_prefix_binding" {
account_id = "023e105f4ecef8ad9ca31a8372d0c353"
cidr = "10.0.1.0/24"
prefix_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
region_key = "eu"
}
Create DlsPrefixBinding Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DlsPrefixBinding(name: string, args: DlsPrefixBindingArgs, opts?: CustomResourceOptions);@overload
def DlsPrefixBinding(resource_name: str,
args: DlsPrefixBindingArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DlsPrefixBinding(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
cidr: Optional[str] = None,
prefix_id: Optional[str] = None,
region_key: Optional[str] = None)func NewDlsPrefixBinding(ctx *Context, name string, args DlsPrefixBindingArgs, opts ...ResourceOption) (*DlsPrefixBinding, error)public DlsPrefixBinding(string name, DlsPrefixBindingArgs args, CustomResourceOptions? opts = null)
public DlsPrefixBinding(String name, DlsPrefixBindingArgs args)
public DlsPrefixBinding(String name, DlsPrefixBindingArgs args, CustomResourceOptions options)
type: cloudflare:DlsPrefixBinding
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "cloudflare_dls_prefix_binding" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args DlsPrefixBindingArgs
- 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 DlsPrefixBindingArgs
- 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 DlsPrefixBindingArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DlsPrefixBindingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DlsPrefixBindingArgs
- 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 dlsPrefixBindingResource = new Cloudflare.DlsPrefixBinding("dlsPrefixBindingResource", new()
{
AccountId = "string",
Cidr = "string",
PrefixId = "string",
RegionKey = "string",
});
example, err := cloudflare.NewDlsPrefixBinding(ctx, "dlsPrefixBindingResource", &cloudflare.DlsPrefixBindingArgs{
AccountId: pulumi.String("string"),
Cidr: pulumi.String("string"),
PrefixId: pulumi.String("string"),
RegionKey: pulumi.String("string"),
})
resource "cloudflare_dls_prefix_binding" "dlsPrefixBindingResource" {
lifecycle {
create_before_destroy = true
}
account_id = "string"
cidr = "string"
prefix_id = "string"
region_key = "string"
}
var dlsPrefixBindingResource = new DlsPrefixBinding("dlsPrefixBindingResource", DlsPrefixBindingArgs.builder()
.accountId("string")
.cidr("string")
.prefixId("string")
.regionKey("string")
.build());
dls_prefix_binding_resource = cloudflare.DlsPrefixBinding("dlsPrefixBindingResource",
account_id="string",
cidr="string",
prefix_id="string",
region_key="string")
const dlsPrefixBindingResource = new cloudflare.DlsPrefixBinding("dlsPrefixBindingResource", {
accountId: "string",
cidr: "string",
prefixId: "string",
regionKey: "string",
});
type: cloudflare:DlsPrefixBinding
properties:
accountId: string
cidr: string
prefixId: string
regionKey: string
DlsPrefixBinding 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 DlsPrefixBinding resource accepts the following input properties:
- account_
id string - Identifier of a Cloudflare account.
- cidr string
- IP prefix in CIDR notation to bind.
- prefix_
id string - The ID of the parent IP prefix that contains the CIDR.
- region_
key string - Region key from managed regions (e.g., "us", "eu").
- account_
id str - Identifier of a Cloudflare account.
- cidr str
- IP prefix in CIDR notation to bind.
- prefix_
id str - The ID of the parent IP prefix that contains the CIDR.
- region_
key str - Region key from managed regions (e.g., "us", "eu").
Outputs
All input properties are implicitly available as output properties. Additionally, the DlsPrefixBinding 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 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 DlsPrefixBinding Resource
Get an existing DlsPrefixBinding 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?: DlsPrefixBindingState, opts?: CustomResourceOptions): DlsPrefixBinding@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
cidr: Optional[str] = None,
prefix_id: Optional[str] = None,
region_key: Optional[str] = None) -> DlsPrefixBindingfunc GetDlsPrefixBinding(ctx *Context, name string, id IDInput, state *DlsPrefixBindingState, opts ...ResourceOption) (*DlsPrefixBinding, error)public static DlsPrefixBinding Get(string name, Input<string> id, DlsPrefixBindingState? state, CustomResourceOptions? opts = null)public static DlsPrefixBinding get(String name, Output<String> id, DlsPrefixBindingState state, CustomResourceOptions options)resources: _: type: cloudflare:DlsPrefixBinding get: id: ${id}import {
to = cloudflare_dls_prefix_binding.example
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 - Identifier of a Cloudflare account.
- cidr string
- IP prefix in CIDR notation to bind.
- prefix_
id string - The ID of the parent IP prefix that contains the CIDR.
- region_
key string - Region key from managed regions (e.g., "us", "eu").
- account_
id str - Identifier of a Cloudflare account.
- cidr str
- IP prefix in CIDR notation to bind.
- prefix_
id str - The ID of the parent IP prefix that contains the CIDR.
- region_
key str - Region key from managed regions (e.g., "us", "eu").
Import
$ pulumi import cloudflare:index/dlsPrefixBinding:DlsPrefixBinding example '<account_id>/<binding_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 Thursday, Jul 16, 2026 by Pulumi