1. Packages
  2. Cloudamqp Provider
  3. API Docs
  4. CustomDomain
CloudAMQP v3.20.2 published on Tuesday, Oct 29, 2024 by Pulumi

cloudamqp.CustomDomain

Explore with Pulumi AI

cloudamqp logo
CloudAMQP v3.20.2 published on Tuesday, Oct 29, 2024 by Pulumi

    This resource allows you to configure and manage your custom domain for the CloudAMQP instance.

    Adding a custom domain to your instance will generate a TLS certificate from Let’s Encrypt, for the given hostname, and install it on all servers in your cluster. The certificate will be automatically renewed going forward.

    WARNING: Please note that when creating, changing or deleting the custom domain, the listeners on your servers will be restarted in order to apply the changes. This will close your current connections.

    Your custom domain name needs to point to your CloudAMQP hostname, preferably using a CNAME DNS record.

    Only available for dedicated subscription plans.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudamqp from "@pulumi/cloudamqp";
    
    const settings = new cloudamqp.CustomDomain("settings", {
        instanceId: instance.id,
        hostname: "myname.mydomain",
    });
    
    import pulumi
    import pulumi_cloudamqp as cloudamqp
    
    settings = cloudamqp.CustomDomain("settings",
        instance_id=instance["id"],
        hostname="myname.mydomain")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudamqp.NewCustomDomain(ctx, "settings", &cloudamqp.CustomDomainArgs{
    			InstanceId: pulumi.Any(instance.Id),
    			Hostname:   pulumi.String("myname.mydomain"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using CloudAmqp = Pulumi.CloudAmqp;
    
    return await Deployment.RunAsync(() => 
    {
        var settings = new CloudAmqp.CustomDomain("settings", new()
        {
            InstanceId = instance.Id,
            Hostname = "myname.mydomain",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudamqp.CustomDomain;
    import com.pulumi.cloudamqp.CustomDomainArgs;
    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 settings = new CustomDomain("settings", CustomDomainArgs.builder()
                .instanceId(instance.id())
                .hostname("myname.mydomain")
                .build());
    
        }
    }
    
    resources:
      settings:
        type: cloudamqp:CustomDomain
        properties:
          instanceId: ${instance.id}
          hostname: myname.mydomain
    

    Depedency

    This resource depends on CloudAMQP instance identifier, cloudamqp_instance.instance.id.

    Create CustomDomain Resource

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

    Constructor syntax

    new CustomDomain(name: string, args: CustomDomainArgs, opts?: CustomResourceOptions);
    @overload
    def CustomDomain(resource_name: str,
                     args: CustomDomainArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def CustomDomain(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     hostname: Optional[str] = None,
                     instance_id: Optional[int] = None)
    func NewCustomDomain(ctx *Context, name string, args CustomDomainArgs, opts ...ResourceOption) (*CustomDomain, error)
    public CustomDomain(string name, CustomDomainArgs args, CustomResourceOptions? opts = null)
    public CustomDomain(String name, CustomDomainArgs args)
    public CustomDomain(String name, CustomDomainArgs args, CustomResourceOptions options)
    
    type: cloudamqp:CustomDomain
    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 CustomDomainArgs
    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 CustomDomainArgs
    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 CustomDomainArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CustomDomainArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CustomDomainArgs
    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 customDomainResource = new CloudAmqp.CustomDomain("customDomainResource", new()
    {
        Hostname = "string",
        InstanceId = 0,
    });
    
    example, err := cloudamqp.NewCustomDomain(ctx, "customDomainResource", &cloudamqp.CustomDomainArgs{
    	Hostname:   pulumi.String("string"),
    	InstanceId: pulumi.Int(0),
    })
    
    var customDomainResource = new CustomDomain("customDomainResource", CustomDomainArgs.builder()
        .hostname("string")
        .instanceId(0)
        .build());
    
    custom_domain_resource = cloudamqp.CustomDomain("customDomainResource",
        hostname="string",
        instance_id=0)
    
    const customDomainResource = new cloudamqp.CustomDomain("customDomainResource", {
        hostname: "string",
        instanceId: 0,
    });
    
    type: cloudamqp:CustomDomain
    properties:
        hostname: string
        instanceId: 0
    

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

    Hostname string
    Your custom domain name.
    InstanceId int
    The CloudAMQP instance ID.
    Hostname string
    Your custom domain name.
    InstanceId int
    The CloudAMQP instance ID.
    hostname String
    Your custom domain name.
    instanceId Integer
    The CloudAMQP instance ID.
    hostname string
    Your custom domain name.
    instanceId number
    The CloudAMQP instance ID.
    hostname str
    Your custom domain name.
    instance_id int
    The CloudAMQP instance ID.
    hostname String
    Your custom domain name.
    instanceId Number
    The CloudAMQP instance ID.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CustomDomain 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 str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing CustomDomain Resource

    Get an existing CustomDomain 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?: CustomDomainState, opts?: CustomResourceOptions): CustomDomain
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            hostname: Optional[str] = None,
            instance_id: Optional[int] = None) -> CustomDomain
    func GetCustomDomain(ctx *Context, name string, id IDInput, state *CustomDomainState, opts ...ResourceOption) (*CustomDomain, error)
    public static CustomDomain Get(string name, Input<string> id, CustomDomainState? state, CustomResourceOptions? opts = null)
    public static CustomDomain get(String name, Output<String> id, CustomDomainState 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:
    Hostname string
    Your custom domain name.
    InstanceId int
    The CloudAMQP instance ID.
    Hostname string
    Your custom domain name.
    InstanceId int
    The CloudAMQP instance ID.
    hostname String
    Your custom domain name.
    instanceId Integer
    The CloudAMQP instance ID.
    hostname string
    Your custom domain name.
    instanceId number
    The CloudAMQP instance ID.
    hostname str
    Your custom domain name.
    instance_id int
    The CloudAMQP instance ID.
    hostname String
    Your custom domain name.
    instanceId Number
    The CloudAMQP instance ID.

    Import

    cloudamqp_custom_domain can be imported using CloudAMQP instance identifier.

    $ pulumi import cloudamqp:index/customDomain:CustomDomain settings <instance_id>`
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    CloudAMQP pulumi/pulumi-cloudamqp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudamqp Terraform Provider.
    cloudamqp logo
    CloudAMQP v3.20.2 published on Tuesday, Oct 29, 2024 by Pulumi