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

cloudflare.R2CustomDomain

Explore with Pulumi AI

Example Usage

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

const exampleR2CustomDomain = new cloudflare.R2CustomDomain("example_r2_custom_domain", {
    accountId: "023e105f4ecef8ad9ca31a8372d0c353",
    bucketName: "example-bucket",
    domain: "domain",
    enabled: true,
    zoneId: "zoneId",
    minTls: "1.0",
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example_r2_custom_domain = cloudflare.R2CustomDomain("example_r2_custom_domain",
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
    bucket_name="example-bucket",
    domain="domain",
    enabled=True,
    zone_id="zoneId",
    min_tls="1.0")
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.NewR2CustomDomain(ctx, "example_r2_custom_domain", &cloudflare.R2CustomDomainArgs{
			AccountId:  pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
			BucketName: pulumi.String("example-bucket"),
			Domain:     pulumi.String("domain"),
			Enabled:    pulumi.Bool(true),
			ZoneId:     pulumi.String("zoneId"),
			MinTls:     pulumi.String("1.0"),
		})
		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 exampleR2CustomDomain = new Cloudflare.R2CustomDomain("example_r2_custom_domain", new()
    {
        AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
        BucketName = "example-bucket",
        Domain = "domain",
        Enabled = true,
        ZoneId = "zoneId",
        MinTls = "1.0",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.R2CustomDomain;
import com.pulumi.cloudflare.R2CustomDomainArgs;
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 exampleR2CustomDomain = new R2CustomDomain("exampleR2CustomDomain", R2CustomDomainArgs.builder()
            .accountId("023e105f4ecef8ad9ca31a8372d0c353")
            .bucketName("example-bucket")
            .domain("domain")
            .enabled(true)
            .zoneId("zoneId")
            .minTls("1.0")
            .build());

    }
}
Copy
resources:
  exampleR2CustomDomain:
    type: cloudflare:R2CustomDomain
    name: example_r2_custom_domain
    properties:
      accountId: 023e105f4ecef8ad9ca31a8372d0c353
      bucketName: example-bucket
      domain: domain
      enabled: true
      zoneId: zoneId
      minTls: '1.0'
Copy

Create R2CustomDomain Resource

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

Constructor syntax

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

@overload
def R2CustomDomain(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   account_id: Optional[str] = None,
                   bucket_name: Optional[str] = None,
                   domain: Optional[str] = None,
                   enabled: Optional[bool] = None,
                   zone_id: Optional[str] = None,
                   min_tls: Optional[str] = None)
func NewR2CustomDomain(ctx *Context, name string, args R2CustomDomainArgs, opts ...ResourceOption) (*R2CustomDomain, error)
public R2CustomDomain(string name, R2CustomDomainArgs args, CustomResourceOptions? opts = null)
public R2CustomDomain(String name, R2CustomDomainArgs args)
public R2CustomDomain(String name, R2CustomDomainArgs args, CustomResourceOptions options)
type: cloudflare:R2CustomDomain
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. R2CustomDomainArgs
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. R2CustomDomainArgs
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. R2CustomDomainArgs
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. R2CustomDomainArgs
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. R2CustomDomainArgs
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 r2customDomainResource = new Cloudflare.R2CustomDomain("r2customDomainResource", new()
{
    AccountId = "string",
    BucketName = "string",
    Domain = "string",
    Enabled = false,
    ZoneId = "string",
    MinTls = "string",
});
Copy
example, err := cloudflare.NewR2CustomDomain(ctx, "r2customDomainResource", &cloudflare.R2CustomDomainArgs{
	AccountId:  pulumi.String("string"),
	BucketName: pulumi.String("string"),
	Domain:     pulumi.String("string"),
	Enabled:    pulumi.Bool(false),
	ZoneId:     pulumi.String("string"),
	MinTls:     pulumi.String("string"),
})
Copy
var r2customDomainResource = new R2CustomDomain("r2customDomainResource", R2CustomDomainArgs.builder()
    .accountId("string")
    .bucketName("string")
    .domain("string")
    .enabled(false)
    .zoneId("string")
    .minTls("string")
    .build());
Copy
r2custom_domain_resource = cloudflare.R2CustomDomain("r2customDomainResource",
    account_id="string",
    bucket_name="string",
    domain="string",
    enabled=False,
    zone_id="string",
    min_tls="string")
Copy
const r2customDomainResource = new cloudflare.R2CustomDomain("r2customDomainResource", {
    accountId: "string",
    bucketName: "string",
    domain: "string",
    enabled: false,
    zoneId: "string",
    minTls: "string",
});
Copy
type: cloudflare:R2CustomDomain
properties:
    accountId: string
    bucketName: string
    domain: string
    enabled: false
    minTls: string
    zoneId: string
Copy

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

AccountId This property is required. string
Account ID
BucketName This property is required. string
Name of the bucket
Domain This property is required. string
Name of the custom domain to be added
Enabled This property is required. bool
Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled.
ZoneId This property is required. string
Zone ID of the custom domain
MinTls string
Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. Available values: "1.0", "1.1", "1.2", "1.3".
AccountId This property is required. string
Account ID
BucketName This property is required. string
Name of the bucket
Domain This property is required. string
Name of the custom domain to be added
Enabled This property is required. bool
Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled.
ZoneId This property is required. string
Zone ID of the custom domain
MinTls string
Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. Available values: "1.0", "1.1", "1.2", "1.3".
accountId This property is required. String
Account ID
bucketName This property is required. String
Name of the bucket
domain This property is required. String
Name of the custom domain to be added
enabled This property is required. Boolean
Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled.
zoneId This property is required. String
Zone ID of the custom domain
minTls String
Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. Available values: "1.0", "1.1", "1.2", "1.3".
accountId This property is required. string
Account ID
bucketName This property is required. string
Name of the bucket
domain This property is required. string
Name of the custom domain to be added
enabled This property is required. boolean
Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled.
zoneId This property is required. string
Zone ID of the custom domain
minTls string
Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. Available values: "1.0", "1.1", "1.2", "1.3".
account_id This property is required. str
Account ID
bucket_name This property is required. str
Name of the bucket
domain This property is required. str
Name of the custom domain to be added
enabled This property is required. bool
Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled.
zone_id This property is required. str
Zone ID of the custom domain
min_tls str
Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. Available values: "1.0", "1.1", "1.2", "1.3".
accountId This property is required. String
Account ID
bucketName This property is required. String
Name of the bucket
domain This property is required. String
Name of the custom domain to be added
enabled This property is required. Boolean
Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled.
zoneId This property is required. String
Zone ID of the custom domain
minTls String
Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. Available values: "1.0", "1.1", "1.2", "1.3".

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Status R2CustomDomainStatus
ZoneName string
Zone that the custom domain resides in
Id string
The provider-assigned unique ID for this managed resource.
Status R2CustomDomainStatus
ZoneName string
Zone that the custom domain resides in
id String
The provider-assigned unique ID for this managed resource.
status R2CustomDomainStatus
zoneName String
Zone that the custom domain resides in
id string
The provider-assigned unique ID for this managed resource.
status R2CustomDomainStatus
zoneName string
Zone that the custom domain resides in
id str
The provider-assigned unique ID for this managed resource.
status R2CustomDomainStatus
zone_name str
Zone that the custom domain resides in
id String
The provider-assigned unique ID for this managed resource.
status Property Map
zoneName String
Zone that the custom domain resides in

Look up Existing R2CustomDomain Resource

Get an existing R2CustomDomain 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?: R2CustomDomainState, opts?: CustomResourceOptions): R2CustomDomain
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_id: Optional[str] = None,
        bucket_name: Optional[str] = None,
        domain: Optional[str] = None,
        enabled: Optional[bool] = None,
        min_tls: Optional[str] = None,
        status: Optional[R2CustomDomainStatusArgs] = None,
        zone_id: Optional[str] = None,
        zone_name: Optional[str] = None) -> R2CustomDomain
func GetR2CustomDomain(ctx *Context, name string, id IDInput, state *R2CustomDomainState, opts ...ResourceOption) (*R2CustomDomain, error)
public static R2CustomDomain Get(string name, Input<string> id, R2CustomDomainState? state, CustomResourceOptions? opts = null)
public static R2CustomDomain get(String name, Output<String> id, R2CustomDomainState state, CustomResourceOptions options)
resources:  _:    type: cloudflare:R2CustomDomain    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
Account ID
BucketName string
Name of the bucket
Domain string
Name of the custom domain to be added
Enabled bool
Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled.
MinTls string
Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. Available values: "1.0", "1.1", "1.2", "1.3".
Status R2CustomDomainStatus
ZoneId string
Zone ID of the custom domain
ZoneName string
Zone that the custom domain resides in
AccountId string
Account ID
BucketName string
Name of the bucket
Domain string
Name of the custom domain to be added
Enabled bool
Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled.
MinTls string
Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. Available values: "1.0", "1.1", "1.2", "1.3".
Status R2CustomDomainStatusArgs
ZoneId string
Zone ID of the custom domain
ZoneName string
Zone that the custom domain resides in
accountId String
Account ID
bucketName String
Name of the bucket
domain String
Name of the custom domain to be added
enabled Boolean
Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled.
minTls String
Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. Available values: "1.0", "1.1", "1.2", "1.3".
status R2CustomDomainStatus
zoneId String
Zone ID of the custom domain
zoneName String
Zone that the custom domain resides in
accountId string
Account ID
bucketName string
Name of the bucket
domain string
Name of the custom domain to be added
enabled boolean
Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled.
minTls string
Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. Available values: "1.0", "1.1", "1.2", "1.3".
status R2CustomDomainStatus
zoneId string
Zone ID of the custom domain
zoneName string
Zone that the custom domain resides in
account_id str
Account ID
bucket_name str
Name of the bucket
domain str
Name of the custom domain to be added
enabled bool
Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled.
min_tls str
Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. Available values: "1.0", "1.1", "1.2", "1.3".
status R2CustomDomainStatusArgs
zone_id str
Zone ID of the custom domain
zone_name str
Zone that the custom domain resides in
accountId String
Account ID
bucketName String
Name of the bucket
domain String
Name of the custom domain to be added
enabled Boolean
Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled.
minTls String
Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. Available values: "1.0", "1.1", "1.2", "1.3".
status Property Map
zoneId String
Zone ID of the custom domain
zoneName String
Zone that the custom domain resides in

Supporting Types

R2CustomDomainStatus
, R2CustomDomainStatusArgs

Ownership string
Ownership status of the domain Available values: "pending", "active", "deactivated", "blocked", "error", "unknown".
Ssl string
SSL certificate status Available values: "initializing", "pending", "active", "deactivated", "error", "unknown".
Ownership string
Ownership status of the domain Available values: "pending", "active", "deactivated", "blocked", "error", "unknown".
Ssl string
SSL certificate status Available values: "initializing", "pending", "active", "deactivated", "error", "unknown".
ownership String
Ownership status of the domain Available values: "pending", "active", "deactivated", "blocked", "error", "unknown".
ssl String
SSL certificate status Available values: "initializing", "pending", "active", "deactivated", "error", "unknown".
ownership string
Ownership status of the domain Available values: "pending", "active", "deactivated", "blocked", "error", "unknown".
ssl string
SSL certificate status Available values: "initializing", "pending", "active", "deactivated", "error", "unknown".
ownership str
Ownership status of the domain Available values: "pending", "active", "deactivated", "blocked", "error", "unknown".
ssl str
SSL certificate status Available values: "initializing", "pending", "active", "deactivated", "error", "unknown".
ownership String
Ownership status of the domain Available values: "pending", "active", "deactivated", "blocked", "error", "unknown".
ssl String
SSL certificate status Available values: "initializing", "pending", "active", "deactivated", "error", "unknown".

Package Details

Repository
Cloudflare pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.