published on Thursday, Sep 17, 2026 by Pulumi
published on Thursday, Sep 17, 2026 by Pulumi
Provides a CR Instance Customized Domain resource.
For information about CR Instance Customized Domain and how to use it, see What is Instance Customized Domain.
NOTE: Available since v1.293.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = alicloud.cas.getServiceCertificates({
keyword: "alicloud-provider.cn",
});
const defaultRegistryEnterpriseInstance = new alicloud.cr.RegistryEnterpriseInstance("default", {
paymentType: "Subscription",
period: 1,
renewPeriod: 1,
renewalStatus: "AutoRenewal",
instanceType: "Advanced",
instanceName: name,
});
const defaultInstanceCustomizedDomain = new alicloud.cr.InstanceCustomizedDomain("default", {
instanceId: defaultRegistryEnterpriseInstance.id,
moduleName: "Registry",
domain: "alicloud-provider.cn",
certId: _default.then(_default => _default.certificates?.[0]?.id),
certRegionId: "cn-hangzhou",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.cas.get_service_certificates(keyword="alicloud-provider.cn")
default_registry_enterprise_instance = alicloud.cr.RegistryEnterpriseInstance("default",
payment_type="Subscription",
period=1,
renew_period=1,
renewal_status="AutoRenewal",
instance_type="Advanced",
instance_name=name)
default_instance_customized_domain = alicloud.cr.InstanceCustomizedDomain("default",
instance_id=default_registry_enterprise_instance.id,
module_name="Registry",
domain="alicloud-provider.cn",
cert_id=default.certificates[0].id,
cert_region_id="cn-hangzhou")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cas"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := cas.GetServiceCertificates(ctx, &cas.GetServiceCertificatesArgs{
Keyword: pulumi.StringRef("alicloud-provider.cn"),
}, nil)
if err != nil {
return err
}
defaultRegistryEnterpriseInstance, err := cr.NewRegistryEnterpriseInstance(ctx, "default", &cr.RegistryEnterpriseInstanceArgs{
PaymentType: pulumi.String("Subscription"),
Period: pulumi.Int(1),
RenewPeriod: pulumi.Int(1),
RenewalStatus: pulumi.String("AutoRenewal"),
InstanceType: pulumi.String("Advanced"),
InstanceName: pulumi.String(name),
})
if err != nil {
return err
}
_, err = cr.NewInstanceCustomizedDomain(ctx, "default", &cr.InstanceCustomizedDomainArgs{
InstanceId: defaultRegistryEnterpriseInstance.ID().ToIDOutput().ToStringOutput(),
ModuleName: pulumi.String("Registry"),
Domain: pulumi.String("alicloud-provider.cn"),
CertId: pulumi.String(_default.Certificates[0].Id),
CertRegionId: pulumi.String("cn-hangzhou"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = AliCloud.Cas.GetServiceCertificates.Invoke(new()
{
Keyword = "alicloud-provider.cn",
});
var defaultRegistryEnterpriseInstance = new AliCloud.CR.RegistryEnterpriseInstance("default", new()
{
PaymentType = "Subscription",
Period = 1,
RenewPeriod = 1,
RenewalStatus = "AutoRenewal",
InstanceType = "Advanced",
InstanceName = name,
});
var defaultInstanceCustomizedDomain = new AliCloud.CR.InstanceCustomizedDomain("default", new()
{
InstanceId = defaultRegistryEnterpriseInstance.Id,
ModuleName = "Registry",
Domain = "alicloud-provider.cn",
CertId = @default.Apply(@default => @default.Apply(getServiceCertificatesResult => getServiceCertificatesResult.Certificates[0]?.Id)),
CertRegionId = "cn-hangzhou",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cas.CasFunctions;
import com.pulumi.alicloud.cas.inputs.GetServiceCertificatesArgs;
import com.pulumi.alicloud.cr.RegistryEnterpriseInstance;
import com.pulumi.alicloud.cr.RegistryEnterpriseInstanceArgs;
import com.pulumi.alicloud.cr.InstanceCustomizedDomain;
import com.pulumi.alicloud.cr.InstanceCustomizedDomainArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
final var default = CasFunctions.getServiceCertificates(GetServiceCertificatesArgs.builder()
.keyword("alicloud-provider.cn")
.build());
var defaultRegistryEnterpriseInstance = new RegistryEnterpriseInstance("defaultRegistryEnterpriseInstance", RegistryEnterpriseInstanceArgs.builder()
.paymentType("Subscription")
.period(1)
.renewPeriod(1)
.renewalStatus("AutoRenewal")
.instanceType("Advanced")
.instanceName(name)
.build());
var defaultInstanceCustomizedDomain = new InstanceCustomizedDomain("defaultInstanceCustomizedDomain", InstanceCustomizedDomainArgs.builder()
.instanceId(defaultRegistryEnterpriseInstance.id())
.moduleName("Registry")
.domain("alicloud-provider.cn")
.certId(default_.certificates()[0].id())
.certRegionId("cn-hangzhou")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
defaultRegistryEnterpriseInstance:
type: alicloud:cr:RegistryEnterpriseInstance
name: default
properties:
paymentType: Subscription
period: 1
renewPeriod: 1
renewalStatus: AutoRenewal
instanceType: Advanced
instanceName: ${name}
defaultInstanceCustomizedDomain:
type: alicloud:cr:InstanceCustomizedDomain
name: default
properties:
instanceId: ${defaultRegistryEnterpriseInstance.id}
moduleName: Registry
domain: alicloud-provider.cn
certId: ${default.certificates[0].id}
certRegionId: cn-hangzhou
variables:
default:
fn::invoke:
function: alicloud:cas:getServiceCertificates
arguments:
keyword: alicloud-provider.cn
pulumi {
required_providers {
alicloud = {
source = "pulumi/alicloud"
}
}
}
data "alicloud_cas_getservicecertificates" "default" {
keyword = "alicloud-provider.cn"
}
resource "alicloud_cr_registryenterpriseinstance" "default" {
payment_type = "Subscription"
period = 1
renew_period = 1
renewal_status = "AutoRenewal"
instance_type = "Advanced"
instance_name = var.name
}
resource "alicloud_cr_instancecustomizeddomain" "default" {
instance_id = alicloud_cr_registryenterpriseinstance.default.id
module_name = "Registry"
domain = "alicloud-provider.cn"
cert_id = data.alicloud_cas_getservicecertificates.default.certificates[0].id
cert_region_id = "cn-hangzhou"
}
variable "name" {
type = string
default = "terraform-example"
}
📚 Need more examples? VIEW MORE EXAMPLES
Create InstanceCustomizedDomain Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InstanceCustomizedDomain(name: string, args: InstanceCustomizedDomainArgs, opts?: CustomResourceOptions);@overload
def InstanceCustomizedDomain(resource_name: str,
args: InstanceCustomizedDomainArgs,
opts: Optional[ResourceOptions] = None)
@overload
def InstanceCustomizedDomain(resource_name: str,
opts: Optional[ResourceOptions] = None,
cert_id: Optional[str] = None,
domain: Optional[str] = None,
instance_id: Optional[str] = None,
module_name: Optional[str] = None,
cert_region_id: Optional[str] = None)func NewInstanceCustomizedDomain(ctx *Context, name string, args InstanceCustomizedDomainArgs, opts ...ResourceOption) (*InstanceCustomizedDomain, error)public InstanceCustomizedDomain(string name, InstanceCustomizedDomainArgs args, CustomResourceOptions? opts = null)
public InstanceCustomizedDomain(String name, InstanceCustomizedDomainArgs args)
public InstanceCustomizedDomain(String name, InstanceCustomizedDomainArgs args, CustomResourceOptions options)
type: alicloud:cr:InstanceCustomizedDomain
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "alicloud_cr_instance_customized_domain" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args InstanceCustomizedDomainArgs
- 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 InstanceCustomizedDomainArgs
- 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 InstanceCustomizedDomainArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceCustomizedDomainArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InstanceCustomizedDomainArgs
- 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 instanceCustomizedDomainResource = new AliCloud.CR.InstanceCustomizedDomain("instanceCustomizedDomainResource", new()
{
CertId = "string",
Domain = "string",
InstanceId = "string",
ModuleName = "string",
CertRegionId = "string",
});
example, err := cr.NewInstanceCustomizedDomain(ctx, "instanceCustomizedDomainResource", &cr.InstanceCustomizedDomainArgs{
CertId: pulumi.String("string"),
Domain: pulumi.String("string"),
InstanceId: pulumi.String("string"),
ModuleName: pulumi.String("string"),
CertRegionId: pulumi.String("string"),
})
resource "alicloud_cr_instance_customized_domain" "instanceCustomizedDomainResource" {
lifecycle {
create_before_destroy = true
}
cert_id = "string"
domain = "string"
instance_id = "string"
module_name = "string"
cert_region_id = "string"
}
var instanceCustomizedDomainResource = new InstanceCustomizedDomain("instanceCustomizedDomainResource", InstanceCustomizedDomainArgs.builder()
.certId("string")
.domain("string")
.instanceId("string")
.moduleName("string")
.certRegionId("string")
.build());
instance_customized_domain_resource = alicloud.cr.InstanceCustomizedDomain("instanceCustomizedDomainResource",
cert_id="string",
domain="string",
instance_id="string",
module_name="string",
cert_region_id="string")
const instanceCustomizedDomainResource = new alicloud.cr.InstanceCustomizedDomain("instanceCustomizedDomainResource", {
certId: "string",
domain: "string",
instanceId: "string",
moduleName: "string",
certRegionId: "string",
});
type: alicloud:cr:InstanceCustomizedDomain
properties:
certId: string
certRegionId: string
domain: string
instanceId: string
moduleName: string
InstanceCustomizedDomain 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 InstanceCustomizedDomain resource accepts the following input properties:
- Cert
Id string - The ID of the custom domain name certificate.
- Domain string
- The custom domain name.
- Instance
Id string - The instance ID.
- Module
Name string - The custom module name.
- Cert
Region stringId - The region to which the certificate belongs.
- Cert
Id string - The ID of the custom domain name certificate.
- Domain string
- The custom domain name.
- Instance
Id string - The instance ID.
- Module
Name string - The custom module name.
- Cert
Region stringId - The region to which the certificate belongs.
- cert_
id string - The ID of the custom domain name certificate.
- domain string
- The custom domain name.
- instance_
id string - The instance ID.
- module_
name string - The custom module name.
- cert_
region_ stringid - The region to which the certificate belongs.
- cert
Id String - The ID of the custom domain name certificate.
- domain String
- The custom domain name.
- instance
Id String - The instance ID.
- module
Name String - The custom module name.
- cert
Region StringId - The region to which the certificate belongs.
- cert
Id string - The ID of the custom domain name certificate.
- domain string
- The custom domain name.
- instance
Id string - The instance ID.
- module
Name string - The custom module name.
- cert
Region stringId - The region to which the certificate belongs.
- cert_
id str - The ID of the custom domain name certificate.
- domain str
- The custom domain name.
- instance_
id str - The instance ID.
- module_
name str - The custom module name.
- cert_
region_ strid - The region to which the certificate belongs.
- cert
Id String - The ID of the custom domain name certificate.
- domain String
- The custom domain name.
- instance
Id String - The instance ID.
- module
Name String - The custom module name.
- cert
Region StringId - The region to which the certificate belongs.
Outputs
All input properties are implicitly available as output properties. Additionally, the InstanceCustomizedDomain resource produces the following output properties:
- Create
Time int - The creation time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
Time int - The modification time.
- Region
Id string - The region ID.
- Create
Time int - The creation time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
Time int - The modification time.
- Region
Id string - The region ID.
- create_
time number - The creation time.
- id string
- The provider-assigned unique ID for this managed resource.
- modified_
time number - The modification time.
- region_
id string - The region ID.
- create
Time Integer - The creation time.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
Time Integer - The modification time.
- region
Id String - The region ID.
- create
Time number - The creation time.
- id string
- The provider-assigned unique ID for this managed resource.
- modified
Time number - The modification time.
- region
Id string - The region ID.
- create_
time int - The creation time.
- id str
- The provider-assigned unique ID for this managed resource.
- modified_
time int - The modification time.
- region_
id str - The region ID.
- create
Time Number - The creation time.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
Time Number - The modification time.
- region
Id String - The region ID.
Look up Existing InstanceCustomizedDomain Resource
Get an existing InstanceCustomizedDomain 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?: InstanceCustomizedDomainState, opts?: CustomResourceOptions): InstanceCustomizedDomain@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cert_id: Optional[str] = None,
cert_region_id: Optional[str] = None,
create_time: Optional[int] = None,
domain: Optional[str] = None,
instance_id: Optional[str] = None,
modified_time: Optional[int] = None,
module_name: Optional[str] = None,
region_id: Optional[str] = None) -> InstanceCustomizedDomainfunc GetInstanceCustomizedDomain(ctx *Context, name string, id IDInput, state *InstanceCustomizedDomainState, opts ...ResourceOption) (*InstanceCustomizedDomain, error)public static InstanceCustomizedDomain Get(string name, Input<string> id, InstanceCustomizedDomainState? state, CustomResourceOptions? opts = null)public static InstanceCustomizedDomain get(String name, Output<String> id, InstanceCustomizedDomainState state, CustomResourceOptions options)resources: _: type: alicloud:cr:InstanceCustomizedDomain get: id: ${id}import {
to = alicloud_cr_instance_customized_domain.example
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.
- Cert
Id string - The ID of the custom domain name certificate.
- Cert
Region stringId - The region to which the certificate belongs.
- Create
Time int - The creation time.
- Domain string
- The custom domain name.
- Instance
Id string - The instance ID.
- Modified
Time int - The modification time.
- Module
Name string - The custom module name.
- Region
Id string - The region ID.
- Cert
Id string - The ID of the custom domain name certificate.
- Cert
Region stringId - The region to which the certificate belongs.
- Create
Time int - The creation time.
- Domain string
- The custom domain name.
- Instance
Id string - The instance ID.
- Modified
Time int - The modification time.
- Module
Name string - The custom module name.
- Region
Id string - The region ID.
- cert_
id string - The ID of the custom domain name certificate.
- cert_
region_ stringid - The region to which the certificate belongs.
- create_
time number - The creation time.
- domain string
- The custom domain name.
- instance_
id string - The instance ID.
- modified_
time number - The modification time.
- module_
name string - The custom module name.
- region_
id string - The region ID.
- cert
Id String - The ID of the custom domain name certificate.
- cert
Region StringId - The region to which the certificate belongs.
- create
Time Integer - The creation time.
- domain String
- The custom domain name.
- instance
Id String - The instance ID.
- modified
Time Integer - The modification time.
- module
Name String - The custom module name.
- region
Id String - The region ID.
- cert
Id string - The ID of the custom domain name certificate.
- cert
Region stringId - The region to which the certificate belongs.
- create
Time number - The creation time.
- domain string
- The custom domain name.
- instance
Id string - The instance ID.
- modified
Time number - The modification time.
- module
Name string - The custom module name.
- region
Id string - The region ID.
- cert_
id str - The ID of the custom domain name certificate.
- cert_
region_ strid - The region to which the certificate belongs.
- create_
time int - The creation time.
- domain str
- The custom domain name.
- instance_
id str - The instance ID.
- modified_
time int - The modification time.
- module_
name str - The custom module name.
- region_
id str - The region ID.
- cert
Id String - The ID of the custom domain name certificate.
- cert
Region StringId - The region to which the certificate belongs.
- create
Time Number - The creation time.
- domain String
- The custom domain name.
- instance
Id String - The instance ID.
- modified
Time Number - The modification time.
- module
Name String - The custom module name.
- region
Id String - The region ID.
Import
CR Instance Customized Domain can be imported using the id, which consists of instance_id, moduleName and domain, e.g.
$ pulumi import alicloud:cr/instanceCustomizedDomain:InstanceCustomizedDomain example <instance_id>:<module_name>:<domain>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
published on Thursday, Sep 17, 2026 by Pulumi