1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. Web3Hostname
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.Web3Hostname

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleWeb3Hostname = new cloudflare.Web3Hostname("example_web3_hostname", {
        zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
        name: "gateway.example.com",
        target: "ipfs",
        description: "This is my IPFS gateway.",
        dnslink: "/ipns/onboarding.ipfs.cloudflare.com",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_web3_hostname = cloudflare.Web3Hostname("example_web3_hostname",
        zone_id="023e105f4ecef8ad9ca31a8372d0c353",
        name="gateway.example.com",
        target="ipfs",
        description="This is my IPFS gateway.",
        dnslink="/ipns/onboarding.ipfs.cloudflare.com")
    
    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.NewWeb3Hostname(ctx, "example_web3_hostname", &cloudflare.Web3HostnameArgs{
    			ZoneId:      pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
    			Name:        pulumi.String("gateway.example.com"),
    			Target:      pulumi.String("ipfs"),
    			Description: pulumi.String("This is my IPFS gateway."),
    			Dnslink:     pulumi.String("/ipns/onboarding.ipfs.cloudflare.com"),
    		})
    		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 exampleWeb3Hostname = new Cloudflare.Web3Hostname("example_web3_hostname", new()
        {
            ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
            Name = "gateway.example.com",
            Target = "ipfs",
            Description = "This is my IPFS gateway.",
            Dnslink = "/ipns/onboarding.ipfs.cloudflare.com",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.Web3Hostname;
    import com.pulumi.cloudflare.Web3HostnameArgs;
    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 exampleWeb3Hostname = new Web3Hostname("exampleWeb3Hostname", Web3HostnameArgs.builder()
                .zoneId("023e105f4ecef8ad9ca31a8372d0c353")
                .name("gateway.example.com")
                .target("ipfs")
                .description("This is my IPFS gateway.")
                .dnslink("/ipns/onboarding.ipfs.cloudflare.com")
                .build());
    
        }
    }
    
    resources:
      exampleWeb3Hostname:
        type: cloudflare:Web3Hostname
        name: example_web3_hostname
        properties:
          zoneId: 023e105f4ecef8ad9ca31a8372d0c353
          name: gateway.example.com
          target: ipfs
          description: This is my IPFS gateway.
          dnslink: /ipns/onboarding.ipfs.cloudflare.com
    

    Create Web3Hostname Resource

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

    Constructor syntax

    new Web3Hostname(name: string, args: Web3HostnameArgs, opts?: CustomResourceOptions);
    @overload
    def Web3Hostname(resource_name: str,
                     args: Web3HostnameArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def Web3Hostname(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     name: Optional[str] = None,
                     target: Optional[str] = None,
                     zone_id: Optional[str] = None,
                     description: Optional[str] = None,
                     dnslink: Optional[str] = None)
    func NewWeb3Hostname(ctx *Context, name string, args Web3HostnameArgs, opts ...ResourceOption) (*Web3Hostname, error)
    public Web3Hostname(string name, Web3HostnameArgs args, CustomResourceOptions? opts = null)
    public Web3Hostname(String name, Web3HostnameArgs args)
    public Web3Hostname(String name, Web3HostnameArgs args, CustomResourceOptions options)
    
    type: cloudflare:Web3Hostname
    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 Web3HostnameArgs
    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 Web3HostnameArgs
    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 Web3HostnameArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args Web3HostnameArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args Web3HostnameArgs
    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 web3HostnameResource = new Cloudflare.Web3Hostname("web3HostnameResource", new()
    {
        Name = "string",
        Target = "string",
        ZoneId = "string",
        Description = "string",
        Dnslink = "string",
    });
    
    example, err := cloudflare.NewWeb3Hostname(ctx, "web3HostnameResource", &cloudflare.Web3HostnameArgs{
    	Name:        pulumi.String("string"),
    	Target:      pulumi.String("string"),
    	ZoneId:      pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Dnslink:     pulumi.String("string"),
    })
    
    var web3HostnameResource = new Web3Hostname("web3HostnameResource", Web3HostnameArgs.builder()
        .name("string")
        .target("string")
        .zoneId("string")
        .description("string")
        .dnslink("string")
        .build());
    
    web3_hostname_resource = cloudflare.Web3Hostname("web3HostnameResource",
        name="string",
        target="string",
        zone_id="string",
        description="string",
        dnslink="string")
    
    const web3HostnameResource = new cloudflare.Web3Hostname("web3HostnameResource", {
        name: "string",
        target: "string",
        zoneId: "string",
        description: "string",
        dnslink: "string",
    });
    
    type: cloudflare:Web3Hostname
    properties:
        description: string
        dnslink: string
        name: string
        target: string
        zoneId: string
    

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

    Name string
    The hostname that will point to the target gateway via CNAME.
    Target string
    Target gateway of the hostname. Available values: "ethereum", "ipfs", "ipfsuniversalpath".
    ZoneId string
    Identifier
    Description string
    An optional description of the hostname.
    Dnslink string
    DNSLink value used if the target is ipfs.
    Name string
    The hostname that will point to the target gateway via CNAME.
    Target string
    Target gateway of the hostname. Available values: "ethereum", "ipfs", "ipfsuniversalpath".
    ZoneId string
    Identifier
    Description string
    An optional description of the hostname.
    Dnslink string
    DNSLink value used if the target is ipfs.
    name String
    The hostname that will point to the target gateway via CNAME.
    target String
    Target gateway of the hostname. Available values: "ethereum", "ipfs", "ipfsuniversalpath".
    zoneId String
    Identifier
    description String
    An optional description of the hostname.
    dnslink String
    DNSLink value used if the target is ipfs.
    name string
    The hostname that will point to the target gateway via CNAME.
    target string
    Target gateway of the hostname. Available values: "ethereum", "ipfs", "ipfsuniversalpath".
    zoneId string
    Identifier
    description string
    An optional description of the hostname.
    dnslink string
    DNSLink value used if the target is ipfs.
    name str
    The hostname that will point to the target gateway via CNAME.
    target str
    Target gateway of the hostname. Available values: "ethereum", "ipfs", "ipfsuniversalpath".
    zone_id str
    Identifier
    description str
    An optional description of the hostname.
    dnslink str
    DNSLink value used if the target is ipfs.
    name String
    The hostname that will point to the target gateway via CNAME.
    target String
    Target gateway of the hostname. Available values: "ethereum", "ipfs", "ipfsuniversalpath".
    zoneId String
    Identifier
    description String
    An optional description of the hostname.
    dnslink String
    DNSLink value used if the target is ipfs.

    Outputs

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

    CreatedOn string
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedOn string
    Status string
    Status of the hostname's activation. Available values: "active", "pending", "deleting", "error".
    CreatedOn string
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedOn string
    Status string
    Status of the hostname's activation. Available values: "active", "pending", "deleting", "error".
    createdOn String
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedOn String
    status String
    Status of the hostname's activation. Available values: "active", "pending", "deleting", "error".
    createdOn string
    id string
    The provider-assigned unique ID for this managed resource.
    modifiedOn string
    status string
    Status of the hostname's activation. Available values: "active", "pending", "deleting", "error".
    created_on str
    id str
    The provider-assigned unique ID for this managed resource.
    modified_on str
    status str
    Status of the hostname's activation. Available values: "active", "pending", "deleting", "error".
    createdOn String
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedOn String
    status String
    Status of the hostname's activation. Available values: "active", "pending", "deleting", "error".

    Look up Existing Web3Hostname Resource

    Get an existing Web3Hostname 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?: Web3HostnameState, opts?: CustomResourceOptions): Web3Hostname
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_on: Optional[str] = None,
            description: Optional[str] = None,
            dnslink: Optional[str] = None,
            modified_on: Optional[str] = None,
            name: Optional[str] = None,
            status: Optional[str] = None,
            target: Optional[str] = None,
            zone_id: Optional[str] = None) -> Web3Hostname
    func GetWeb3Hostname(ctx *Context, name string, id IDInput, state *Web3HostnameState, opts ...ResourceOption) (*Web3Hostname, error)
    public static Web3Hostname Get(string name, Input<string> id, Web3HostnameState? state, CustomResourceOptions? opts = null)
    public static Web3Hostname get(String name, Output<String> id, Web3HostnameState state, CustomResourceOptions options)
    resources:  _:    type: cloudflare:Web3Hostname    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.
    The following state arguments are supported:
    CreatedOn string
    Description string
    An optional description of the hostname.
    Dnslink string
    DNSLink value used if the target is ipfs.
    ModifiedOn string
    Name string
    The hostname that will point to the target gateway via CNAME.
    Status string
    Status of the hostname's activation. Available values: "active", "pending", "deleting", "error".
    Target string
    Target gateway of the hostname. Available values: "ethereum", "ipfs", "ipfsuniversalpath".
    ZoneId string
    Identifier
    CreatedOn string
    Description string
    An optional description of the hostname.
    Dnslink string
    DNSLink value used if the target is ipfs.
    ModifiedOn string
    Name string
    The hostname that will point to the target gateway via CNAME.
    Status string
    Status of the hostname's activation. Available values: "active", "pending", "deleting", "error".
    Target string
    Target gateway of the hostname. Available values: "ethereum", "ipfs", "ipfsuniversalpath".
    ZoneId string
    Identifier
    createdOn String
    description String
    An optional description of the hostname.
    dnslink String
    DNSLink value used if the target is ipfs.
    modifiedOn String
    name String
    The hostname that will point to the target gateway via CNAME.
    status String
    Status of the hostname's activation. Available values: "active", "pending", "deleting", "error".
    target String
    Target gateway of the hostname. Available values: "ethereum", "ipfs", "ipfsuniversalpath".
    zoneId String
    Identifier
    createdOn string
    description string
    An optional description of the hostname.
    dnslink string
    DNSLink value used if the target is ipfs.
    modifiedOn string
    name string
    The hostname that will point to the target gateway via CNAME.
    status string
    Status of the hostname's activation. Available values: "active", "pending", "deleting", "error".
    target string
    Target gateway of the hostname. Available values: "ethereum", "ipfs", "ipfsuniversalpath".
    zoneId string
    Identifier
    created_on str
    description str
    An optional description of the hostname.
    dnslink str
    DNSLink value used if the target is ipfs.
    modified_on str
    name str
    The hostname that will point to the target gateway via CNAME.
    status str
    Status of the hostname's activation. Available values: "active", "pending", "deleting", "error".
    target str
    Target gateway of the hostname. Available values: "ethereum", "ipfs", "ipfsuniversalpath".
    zone_id str
    Identifier
    createdOn String
    description String
    An optional description of the hostname.
    dnslink String
    DNSLink value used if the target is ipfs.
    modifiedOn String
    name String
    The hostname that will point to the target gateway via CNAME.
    status String
    Status of the hostname's activation. Available values: "active", "pending", "deleting", "error".
    target String
    Target gateway of the hostname. Available values: "ethereum", "ipfs", "ipfsuniversalpath".
    zoneId String
    Identifier

    Import

    $ pulumi import cloudflare:index/web3Hostname:Web3Hostname example '<zone_id>/<identifier>'
    

    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.
    cloudflare logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi