1. Packages
  2. Cloudflare
  3. API Docs
  4. RegionalHostname
Cloudflare v5.26.0 published on Wednesday, Apr 17, 2024 by Pulumi

cloudflare.RegionalHostname

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.26.0 published on Wednesday, Apr 17, 2024 by Pulumi

    Provides a Data Localization Suite Regional Hostname.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    // Regionalized hostname record resources are managed independently from the
    // Regionalized Hostname resources.
    const exampleRecord = new cloudflare.Record("exampleRecord", {
        name: "example.com",
        ttl: 3600,
        type: "A",
        value: "192.0.2.1",
        zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
    });
    // The cloudflare_regional_hostname resource may exist with or without its
    // corresponding record resource.
    const exampleRegionalHostname = new cloudflare.RegionalHostname("exampleRegionalHostname", {
        hostname: "example.com",
        regionKey: "eu",
        zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    # Regionalized hostname record resources are managed independently from the
    # Regionalized Hostname resources.
    example_record = cloudflare.Record("exampleRecord",
        name="example.com",
        ttl=3600,
        type="A",
        value="192.0.2.1",
        zone_id="0da42c8d2132a9ddaf714f9e7c920711")
    # The cloudflare_regional_hostname resource may exist with or without its
    # corresponding record resource.
    example_regional_hostname = cloudflare.RegionalHostname("exampleRegionalHostname",
        hostname="example.com",
        region_key="eu",
        zone_id="0da42c8d2132a9ddaf714f9e7c920711")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Regionalized hostname record resources are managed independently from the
    		// Regionalized Hostname resources.
    		_, err := cloudflare.NewRecord(ctx, "exampleRecord", &cloudflare.RecordArgs{
    			Name:   pulumi.String("example.com"),
    			Ttl:    pulumi.Int(3600),
    			Type:   pulumi.String("A"),
    			Value:  pulumi.String("192.0.2.1"),
    			ZoneId: pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
    		})
    		if err != nil {
    			return err
    		}
    		// The cloudflare_regional_hostname resource may exist with or without its
    		// corresponding record resource.
    		_, err = cloudflare.NewRegionalHostname(ctx, "exampleRegionalHostname", &cloudflare.RegionalHostnameArgs{
    			Hostname:  pulumi.String("example.com"),
    			RegionKey: pulumi.String("eu"),
    			ZoneId:    pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        // Regionalized hostname record resources are managed independently from the
        // Regionalized Hostname resources.
        var exampleRecord = new Cloudflare.Record("exampleRecord", new()
        {
            Name = "example.com",
            Ttl = 3600,
            Type = "A",
            Value = "192.0.2.1",
            ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
        });
    
        // The cloudflare_regional_hostname resource may exist with or without its
        // corresponding record resource.
        var exampleRegionalHostname = new Cloudflare.RegionalHostname("exampleRegionalHostname", new()
        {
            Hostname = "example.com",
            RegionKey = "eu",
            ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.Record;
    import com.pulumi.cloudflare.RecordArgs;
    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) {
            // Regionalized hostname record resources are managed independently from the
            // Regionalized Hostname resources.
            var exampleRecord = new Record("exampleRecord", RecordArgs.builder()        
                .name("example.com")
                .ttl(3600)
                .type("A")
                .value("192.0.2.1")
                .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
                .build());
    
            // The cloudflare_regional_hostname resource may exist with or without its
            // corresponding record resource.
            var exampleRegionalHostname = new RegionalHostname("exampleRegionalHostname", RegionalHostnameArgs.builder()        
                .hostname("example.com")
                .regionKey("eu")
                .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
                .build());
    
        }
    }
    
    resources:
      # Regionalized hostname record resources are managed independently from the
      # // Regionalized Hostname resources.
      exampleRecord:
        type: cloudflare:Record
        properties:
          name: example.com
          ttl: 3600
          type: A
          value: 192.0.2.1
          zoneId: 0da42c8d2132a9ddaf714f9e7c920711
      # The cloudflare_regional_hostname resource may exist with or without its
      # // corresponding record resource.
      exampleRegionalHostname:
        type: cloudflare:RegionalHostname
        properties:
          hostname: example.com
          regionKey: eu
          zoneId: 0da42c8d2132a9ddaf714f9e7c920711
    

    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 string
    The unique name of the resource.
    args RegionalHostnameArgs
    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 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 string
    The unique name of the resource.
    args RegionalHostnameArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RegionalHostnameArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RegionalHostnameArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    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",
    });
    
    example, err := cloudflare.NewRegionalHostname(ctx, "regionalHostnameResource", &cloudflare.RegionalHostnameArgs{
    	Hostname:  pulumi.String("string"),
    	RegionKey: pulumi.String("string"),
    	ZoneId:    pulumi.String("string"),
    })
    
    var regionalHostnameResource = new RegionalHostname("regionalHostnameResource", RegionalHostnameArgs.builder()        
        .hostname("string")
        .regionKey("string")
        .zoneId("string")
        .build());
    
    regional_hostname_resource = cloudflare.RegionalHostname("regionalHostnameResource",
        hostname="string",
        region_key="string",
        zone_id="string")
    
    const regionalHostnameResource = new cloudflare.RegionalHostname("regionalHostnameResource", {
        hostname: "string",
        regionKey: "string",
        zoneId: "string",
    });
    
    type: cloudflare:RegionalHostname
    properties:
        hostname: string
        regionKey: string
        zoneId: string
    

    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

    The RegionalHostname resource accepts the following input properties:

    Hostname string
    The hostname to regionalize.
    RegionKey string
    The region key. See the full region list.
    ZoneId string
    The zone identifier to target for the resource.
    Hostname string
    The hostname to regionalize.
    RegionKey string
    The region key. See the full region list.
    ZoneId string
    The zone identifier to target for the resource.
    hostname String
    The hostname to regionalize.
    regionKey String
    The region key. See the full region list.
    zoneId String
    The zone identifier to target for the resource.
    hostname string
    The hostname to regionalize.
    regionKey string
    The region key. See the full region list.
    zoneId string
    The zone identifier to target for the resource.
    hostname str
    The hostname to regionalize.
    region_key str
    The region key. See the full region list.
    zone_id str
    The zone identifier to target for the resource.
    hostname String
    The hostname to regionalize.
    regionKey String
    The region key. See the full region list.
    zoneId String
    The zone identifier to target for the resource.

    Outputs

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

    CreatedOn string
    The RFC3339 timestamp of when the hostname was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreatedOn string
    The RFC3339 timestamp of when the hostname was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    createdOn String
    The RFC3339 timestamp of when the hostname was created.
    id String
    The provider-assigned unique ID for this managed resource.
    createdOn string
    The RFC3339 timestamp of when the hostname was created.
    id string
    The provider-assigned unique ID for this managed resource.
    created_on str
    The RFC3339 timestamp of when the hostname was created.
    id str
    The provider-assigned unique ID for this managed resource.
    createdOn String
    The RFC3339 timestamp of when the 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)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    CreatedOn string
    The RFC3339 timestamp of when the hostname was created.
    Hostname string
    The hostname to regionalize.
    RegionKey string
    The region key. See the full region list.
    ZoneId string
    The zone identifier to target for the resource.
    CreatedOn string
    The RFC3339 timestamp of when the hostname was created.
    Hostname string
    The hostname to regionalize.
    RegionKey string
    The region key. See the full region list.
    ZoneId string
    The zone identifier to target for the resource.
    createdOn String
    The RFC3339 timestamp of when the hostname was created.
    hostname String
    The hostname to regionalize.
    regionKey String
    The region key. See the full region list.
    zoneId String
    The zone identifier to target for the resource.
    createdOn string
    The RFC3339 timestamp of when the hostname was created.
    hostname string
    The hostname to regionalize.
    regionKey string
    The region key. See the full region list.
    zoneId string
    The zone identifier to target for the resource.
    created_on str
    The RFC3339 timestamp of when the hostname was created.
    hostname str
    The hostname to regionalize.
    region_key str
    The region key. See the full region list.
    zone_id str
    The zone identifier to target for the resource.
    createdOn String
    The RFC3339 timestamp of when the hostname was created.
    hostname String
    The hostname to regionalize.
    regionKey String
    The region key. See the full region list.
    zoneId String
    The zone identifier to target for the resource.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v5.26.0 published on Wednesday, Apr 17, 2024 by Pulumi