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

cloudflare.RegionalHostname

Explore with Pulumi AI

Example Usage

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

const exampleRegionalHostname = new cloudflare.RegionalHostname("example_regional_hostname", {
    zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
    hostname: "foo.example.com",
    regionKey: "ca",
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example_regional_hostname = cloudflare.RegionalHostname("example_regional_hostname",
    zone_id="023e105f4ecef8ad9ca31a8372d0c353",
    hostname="foo.example.com",
    region_key="ca")
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.NewRegionalHostname(ctx, "example_regional_hostname", &cloudflare.RegionalHostnameArgs{
			ZoneId:    pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
			Hostname:  pulumi.String("foo.example.com"),
			RegionKey: pulumi.String("ca"),
		})
		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 exampleRegionalHostname = new Cloudflare.RegionalHostname("example_regional_hostname", new()
    {
        ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
        Hostname = "foo.example.com",
        RegionKey = "ca",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.RegionalHostname;
import com.pulumi.cloudflare.RegionalHostnameArgs;
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 exampleRegionalHostname = new RegionalHostname("exampleRegionalHostname", RegionalHostnameArgs.builder()
            .zoneId("023e105f4ecef8ad9ca31a8372d0c353")
            .hostname("foo.example.com")
            .regionKey("ca")
            .build());

    }
}
Copy
resources:
  exampleRegionalHostname:
    type: cloudflare:RegionalHostname
    name: example_regional_hostname
    properties:
      zoneId: 023e105f4ecef8ad9ca31a8372d0c353
      hostname: foo.example.com
      regionKey: ca
Copy

Create RegionalHostname Resource

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

Constructor syntax

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

@overload
def RegionalHostname(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     hostname: Optional[str] = None,
                     region_key: Optional[str] = None,
                     zone_id: Optional[str] = None)
func NewRegionalHostname(ctx *Context, name string, args RegionalHostnameArgs, opts ...ResourceOption) (*RegionalHostname, error)
public RegionalHostname(string name, RegionalHostnameArgs args, CustomResourceOptions? opts = null)
public RegionalHostname(String name, RegionalHostnameArgs args)
public RegionalHostname(String name, RegionalHostnameArgs args, CustomResourceOptions options)
type: cloudflare:RegionalHostname
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. RegionalHostnameArgs
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. RegionalHostnameArgs
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. RegionalHostnameArgs
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. RegionalHostnameArgs
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. RegionalHostnameArgs
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 regionalHostnameResource = new Cloudflare.RegionalHostname("regionalHostnameResource", new()
{
    Hostname = "string",
    RegionKey = "string",
    ZoneId = "string",
});
Copy
example, err := cloudflare.NewRegionalHostname(ctx, "regionalHostnameResource", &cloudflare.RegionalHostnameArgs{
	Hostname:  pulumi.String("string"),
	RegionKey: pulumi.String("string"),
	ZoneId:    pulumi.String("string"),
})
Copy
var regionalHostnameResource = new RegionalHostname("regionalHostnameResource", RegionalHostnameArgs.builder()
    .hostname("string")
    .regionKey("string")
    .zoneId("string")
    .build());
Copy
regional_hostname_resource = cloudflare.RegionalHostname("regionalHostnameResource",
    hostname="string",
    region_key="string",
    zone_id="string")
Copy
const regionalHostnameResource = new cloudflare.RegionalHostname("regionalHostnameResource", {
    hostname: "string",
    regionKey: "string",
    zoneId: "string",
});
Copy
type: cloudflare:RegionalHostname
properties:
    hostname: string
    regionKey: string
    zoneId: string
Copy

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

Hostname This property is required. string
DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
RegionKey This property is required. string
Identifying key for the region
ZoneId This property is required. string
Identifier
Hostname This property is required. string
DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
RegionKey This property is required. string
Identifying key for the region
ZoneId This property is required. string
Identifier
hostname This property is required. String
DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
regionKey This property is required. String
Identifying key for the region
zoneId This property is required. String
Identifier
hostname This property is required. string
DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
regionKey This property is required. string
Identifying key for the region
zoneId This property is required. string
Identifier
hostname This property is required. str
DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
region_key This property is required. str
Identifying key for the region
zone_id This property is required. str
Identifier
hostname This property is required. String
DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
regionKey This property is required. String
Identifying key for the region
zoneId This property is required. String
Identifier

Outputs

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

CreatedOn string
When the regional hostname was created
Id string
The provider-assigned unique ID for this managed resource.
CreatedOn string
When the regional hostname was created
Id string
The provider-assigned unique ID for this managed resource.
createdOn String
When the regional hostname was created
id String
The provider-assigned unique ID for this managed resource.
createdOn string
When the regional hostname was created
id string
The provider-assigned unique ID for this managed resource.
created_on str
When the regional hostname was created
id str
The provider-assigned unique ID for this managed resource.
createdOn String
When the regional hostname was created
id String
The provider-assigned unique ID for this managed resource.

Look up Existing RegionalHostname Resource

Get an existing RegionalHostname 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?: RegionalHostnameState, opts?: CustomResourceOptions): RegionalHostname
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created_on: Optional[str] = None,
        hostname: Optional[str] = None,
        region_key: Optional[str] = None,
        zone_id: Optional[str] = None) -> RegionalHostname
func GetRegionalHostname(ctx *Context, name string, id IDInput, state *RegionalHostnameState, opts ...ResourceOption) (*RegionalHostname, error)
public static RegionalHostname Get(string name, Input<string> id, RegionalHostnameState? state, CustomResourceOptions? opts = null)
public static RegionalHostname get(String name, Output<String> id, RegionalHostnameState state, CustomResourceOptions options)
resources:  _:    type: cloudflare:RegionalHostname    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:
CreatedOn string
When the regional hostname was created
Hostname string
DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
RegionKey string
Identifying key for the region
ZoneId string
Identifier
CreatedOn string
When the regional hostname was created
Hostname string
DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
RegionKey string
Identifying key for the region
ZoneId string
Identifier
createdOn String
When the regional hostname was created
hostname String
DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
regionKey String
Identifying key for the region
zoneId String
Identifier
createdOn string
When the regional hostname was created
hostname string
DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
regionKey string
Identifying key for the region
zoneId string
Identifier
created_on str
When the regional hostname was created
hostname str
DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
region_key str
Identifying key for the region
zone_id str
Identifier
createdOn String
When the regional hostname was created
hostname String
DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g *.example.com
regionKey String
Identifying key for the region
zoneId String
Identifier

Import

$ pulumi import cloudflare:index/regionalHostname:RegionalHostname example '<zone_id>/<hostname>'
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.