CustomDomain

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.

⚠️ 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.

Depedency

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

Example Usage

using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;

class MyStack : Stack
{
    public MyStack()
    {
        var settings = new CloudAmqp.CustomDomain("settings", new CloudAmqp.CustomDomainArgs
        {
            InstanceId = cloudamqp_instance.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(cloudamqp_instance.Instance.Id),
			Hostname:   pulumi.String("myname.mydomain"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_cloudamqp as cloudamqp

settings = cloudamqp.CustomDomain("settings",
    instance_id=cloudamqp_instance["instance"]["id"],
    hostname="myname.mydomain")
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";

const settings = new cloudamqp.CustomDomain("settings", {
    instanceId: cloudamqp_instance.instance.id,
    hostname: "myname.mydomain",
});

Create a CustomDomain Resource

new CustomDomain(name: string, args: CustomDomainArgs, opts?: CustomResourceOptions);
@overload
def CustomDomain(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 hostname: Optional[str] = None,
                 instance_id: Optional[int] = None)
@overload
def CustomDomain(resource_name: str,
                 args: CustomDomainArgs,
                 opts: Optional[ResourceOptions] = None)
func NewCustomDomain(ctx *Context, name string, args CustomDomainArgs, opts ...ResourceOption) (*CustomDomain, error)
public CustomDomain(string name, CustomDomainArgs args, CustomResourceOptions? opts = null)
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.

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

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 number
The CloudAMQP instance ID.
hostname str
Your custom domain name.
instance_id int
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 str
The provider-assigned unique ID for this managed resource.

Look up an 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)
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.

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 number
The CloudAMQP instance ID.
hostname str
Your custom domain name.
instance_id int
The CloudAMQP instance ID.

Import

cloudamqp_custom_domain can be imported using CloudAMQP instance identifier.

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

[Let’s Encrypt]https://letsencrypt.org/

Package Details

Repository
https://github.com/pulumi/pulumi-cloudamqp
License
Apache-2.0
Notes
This Pulumi package is based on the cloudamqp Terraform Provider.