1. Registry
  2. Packages
  3. Alibaba Cloud Provider
  4. API Docs
  5. cr
  6. InstanceCustomizedDomain
Viewing docs for Alibaba Cloud v3.108.0
published on Thursday, Sep 17, 2026 by Pulumi
alicloud logo alicloud logo
Viewing docs for Alibaba Cloud v3.108.0
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:

    CertId string
    The ID of the custom domain name certificate.
    Domain string
    The custom domain name.
    InstanceId string
    The instance ID.
    ModuleName string
    The custom module name.
    CertRegionId string
    The region to which the certificate belongs.
    CertId string
    The ID of the custom domain name certificate.
    Domain string
    The custom domain name.
    InstanceId string
    The instance ID.
    ModuleName string
    The custom module name.
    CertRegionId string
    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_id string
    The region to which the certificate belongs.
    certId String
    The ID of the custom domain name certificate.
    domain String
    The custom domain name.
    instanceId String
    The instance ID.
    moduleName String
    The custom module name.
    certRegionId String
    The region to which the certificate belongs.
    certId string
    The ID of the custom domain name certificate.
    domain string
    The custom domain name.
    instanceId string
    The instance ID.
    moduleName string
    The custom module name.
    certRegionId string
    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_id str
    The region to which the certificate belongs.
    certId String
    The ID of the custom domain name certificate.
    domain String
    The custom domain name.
    instanceId String
    The instance ID.
    moduleName String
    The custom module name.
    certRegionId String
    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:

    CreateTime int
    The creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedTime int
    The modification time.
    RegionId string
    The region ID.
    CreateTime int
    The creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedTime int
    The modification time.
    RegionId 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.
    createTime Integer
    The creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedTime Integer
    The modification time.
    regionId String
    The region ID.
    createTime number
    The creation time.
    id string
    The provider-assigned unique ID for this managed resource.
    modifiedTime number
    The modification time.
    regionId 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.
    createTime Number
    The creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedTime Number
    The modification time.
    regionId 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) -> InstanceCustomizedDomain
    func 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.
    The following state arguments are supported:
    CertId string
    The ID of the custom domain name certificate.
    CertRegionId string
    The region to which the certificate belongs.
    CreateTime int
    The creation time.
    Domain string
    The custom domain name.
    InstanceId string
    The instance ID.
    ModifiedTime int
    The modification time.
    ModuleName string
    The custom module name.
    RegionId string
    The region ID.
    CertId string
    The ID of the custom domain name certificate.
    CertRegionId string
    The region to which the certificate belongs.
    CreateTime int
    The creation time.
    Domain string
    The custom domain name.
    InstanceId string
    The instance ID.
    ModifiedTime int
    The modification time.
    ModuleName string
    The custom module name.
    RegionId string
    The region ID.
    cert_id string
    The ID of the custom domain name certificate.
    cert_region_id string
    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.
    certId String
    The ID of the custom domain name certificate.
    certRegionId String
    The region to which the certificate belongs.
    createTime Integer
    The creation time.
    domain String
    The custom domain name.
    instanceId String
    The instance ID.
    modifiedTime Integer
    The modification time.
    moduleName String
    The custom module name.
    regionId String
    The region ID.
    certId string
    The ID of the custom domain name certificate.
    certRegionId string
    The region to which the certificate belongs.
    createTime number
    The creation time.
    domain string
    The custom domain name.
    instanceId string
    The instance ID.
    modifiedTime number
    The modification time.
    moduleName string
    The custom module name.
    regionId string
    The region ID.
    cert_id str
    The ID of the custom domain name certificate.
    cert_region_id str
    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.
    certId String
    The ID of the custom domain name certificate.
    certRegionId String
    The region to which the certificate belongs.
    createTime Number
    The creation time.
    domain String
    The custom domain name.
    instanceId String
    The instance ID.
    modifiedTime Number
    The modification time.
    moduleName String
    The custom module name.
    regionId 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 alicloud Terraform Provider.
    alicloud logo alicloud logo
    Viewing docs for Alibaba Cloud v3.108.0
    published on Thursday, Sep 17, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial