1. Packages
  2. stackit
  3. API Docs
  4. CdnCustomDomain
Viewing docs for stackit v0.0.4
published on Friday, Feb 20, 2026 by stackitcloud
stackit logo
Viewing docs for stackit v0.0.4
published on Friday, Feb 20, 2026 by stackitcloud

    CDN distribution data source schema.

    This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide for how to opt-in to use beta resources.

    Example Usage

    resource "stackit_cdn_custom_domain" "example" {
      project_id      = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      distribution_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      name            = "https://xxx.xxx"
      certificate = {
        certificate = "-----BEGIN CERTIFICATE-----\nY2VydGlmaWNhdGVfZGF0YQ==\n-----END CERTIFICATE---"
        private_key = "-----BEGIN RSA PRIVATE KEY-----\nY2VydGlmaWNhdGVfZGF0YQ==\n-----END RSA PRIVATE KEY---"
      }
    }
    
    # Only use the import statement, if you want to import an existing cdn custom domain
    import {
      to = stackit_cdn_custom_domain.import-example
      id = "${var.project_id},${var.distribution_id},${var.custom_domain_name}"
    }
    

    Create CdnCustomDomain Resource

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

    Constructor syntax

    new CdnCustomDomain(name: string, args: CdnCustomDomainArgs, opts?: CustomResourceOptions);
    @overload
    def CdnCustomDomain(resource_name: str,
                        args: CdnCustomDomainArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def CdnCustomDomain(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        distribution_id: Optional[str] = None,
                        project_id: Optional[str] = None,
                        certificate: Optional[CdnCustomDomainCertificateArgs] = None,
                        name: Optional[str] = None)
    func NewCdnCustomDomain(ctx *Context, name string, args CdnCustomDomainArgs, opts ...ResourceOption) (*CdnCustomDomain, error)
    public CdnCustomDomain(string name, CdnCustomDomainArgs args, CustomResourceOptions? opts = null)
    public CdnCustomDomain(String name, CdnCustomDomainArgs args)
    public CdnCustomDomain(String name, CdnCustomDomainArgs args, CustomResourceOptions options)
    
    type: stackit:CdnCustomDomain
    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 CdnCustomDomainArgs
    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 CdnCustomDomainArgs
    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 CdnCustomDomainArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CdnCustomDomainArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CdnCustomDomainArgs
    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 cdnCustomDomainResource = new Stackit.CdnCustomDomain("cdnCustomDomainResource", new()
    {
        DistributionId = "string",
        ProjectId = "string",
        Certificate = new Stackit.Inputs.CdnCustomDomainCertificateArgs
        {
            Certificate = "string",
            PrivateKey = "string",
            Version = 0,
        },
        Name = "string",
    });
    
    example, err := stackit.NewCdnCustomDomain(ctx, "cdnCustomDomainResource", &stackit.CdnCustomDomainArgs{
    	DistributionId: pulumi.String("string"),
    	ProjectId:      pulumi.String("string"),
    	Certificate: &stackit.CdnCustomDomainCertificateArgs{
    		Certificate: pulumi.String("string"),
    		PrivateKey:  pulumi.String("string"),
    		Version:     pulumi.Int(0),
    	},
    	Name: pulumi.String("string"),
    })
    
    var cdnCustomDomainResource = new CdnCustomDomain("cdnCustomDomainResource", CdnCustomDomainArgs.builder()
        .distributionId("string")
        .projectId("string")
        .certificate(CdnCustomDomainCertificateArgs.builder()
            .certificate("string")
            .privateKey("string")
            .version(0)
            .build())
        .name("string")
        .build());
    
    cdn_custom_domain_resource = stackit.CdnCustomDomain("cdnCustomDomainResource",
        distribution_id="string",
        project_id="string",
        certificate={
            "certificate": "string",
            "private_key": "string",
            "version": 0,
        },
        name="string")
    
    const cdnCustomDomainResource = new stackit.CdnCustomDomain("cdnCustomDomainResource", {
        distributionId: "string",
        projectId: "string",
        certificate: {
            certificate: "string",
            privateKey: "string",
            version: 0,
        },
        name: "string",
    });
    
    type: stackit:CdnCustomDomain
    properties:
        certificate:
            certificate: string
            privateKey: string
            version: 0
        distributionId: string
        name: string
        projectId: string
    

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

    DistributionId string
    CDN distribution ID
    ProjectId string
    STACKIT project ID associated with the distribution
    Certificate CdnCustomDomainCertificate
    The TLS certificate for the custom domain. If omitted, a managed certificate will be used. If the block is specified, a custom certificate is used.
    Name string
    DistributionId string
    CDN distribution ID
    ProjectId string
    STACKIT project ID associated with the distribution
    Certificate CdnCustomDomainCertificateArgs
    The TLS certificate for the custom domain. If omitted, a managed certificate will be used. If the block is specified, a custom certificate is used.
    Name string
    distributionId String
    CDN distribution ID
    projectId String
    STACKIT project ID associated with the distribution
    certificate CdnCustomDomainCertificate
    The TLS certificate for the custom domain. If omitted, a managed certificate will be used. If the block is specified, a custom certificate is used.
    name String
    distributionId string
    CDN distribution ID
    projectId string
    STACKIT project ID associated with the distribution
    certificate CdnCustomDomainCertificate
    The TLS certificate for the custom domain. If omitted, a managed certificate will be used. If the block is specified, a custom certificate is used.
    name string
    distribution_id str
    CDN distribution ID
    project_id str
    STACKIT project ID associated with the distribution
    certificate CdnCustomDomainCertificateArgs
    The TLS certificate for the custom domain. If omitted, a managed certificate will be used. If the block is specified, a custom certificate is used.
    name str
    distributionId String
    CDN distribution ID
    projectId String
    STACKIT project ID associated with the distribution
    certificate Property Map
    The TLS certificate for the custom domain. If omitted, a managed certificate will be used. If the block is specified, a custom certificate is used.
    name String

    Outputs

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

    Errors List<string>
    List of distribution errors
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Status of the distribution
    Errors []string
    List of distribution errors
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Status of the distribution
    errors List<String>
    List of distribution errors
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Status of the distribution
    errors string[]
    List of distribution errors
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Status of the distribution
    errors Sequence[str]
    List of distribution errors
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    Status of the distribution
    errors List<String>
    List of distribution errors
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Status of the distribution

    Look up Existing CdnCustomDomain Resource

    Get an existing CdnCustomDomain 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?: CdnCustomDomainState, opts?: CustomResourceOptions): CdnCustomDomain
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            certificate: Optional[CdnCustomDomainCertificateArgs] = None,
            distribution_id: Optional[str] = None,
            errors: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            project_id: Optional[str] = None,
            status: Optional[str] = None) -> CdnCustomDomain
    func GetCdnCustomDomain(ctx *Context, name string, id IDInput, state *CdnCustomDomainState, opts ...ResourceOption) (*CdnCustomDomain, error)
    public static CdnCustomDomain Get(string name, Input<string> id, CdnCustomDomainState? state, CustomResourceOptions? opts = null)
    public static CdnCustomDomain get(String name, Output<String> id, CdnCustomDomainState state, CustomResourceOptions options)
    resources:  _:    type: stackit:CdnCustomDomain    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:
    Certificate CdnCustomDomainCertificate
    The TLS certificate for the custom domain. If omitted, a managed certificate will be used. If the block is specified, a custom certificate is used.
    DistributionId string
    CDN distribution ID
    Errors List<string>
    List of distribution errors
    Name string
    ProjectId string
    STACKIT project ID associated with the distribution
    Status string
    Status of the distribution
    Certificate CdnCustomDomainCertificateArgs
    The TLS certificate for the custom domain. If omitted, a managed certificate will be used. If the block is specified, a custom certificate is used.
    DistributionId string
    CDN distribution ID
    Errors []string
    List of distribution errors
    Name string
    ProjectId string
    STACKIT project ID associated with the distribution
    Status string
    Status of the distribution
    certificate CdnCustomDomainCertificate
    The TLS certificate for the custom domain. If omitted, a managed certificate will be used. If the block is specified, a custom certificate is used.
    distributionId String
    CDN distribution ID
    errors List<String>
    List of distribution errors
    name String
    projectId String
    STACKIT project ID associated with the distribution
    status String
    Status of the distribution
    certificate CdnCustomDomainCertificate
    The TLS certificate for the custom domain. If omitted, a managed certificate will be used. If the block is specified, a custom certificate is used.
    distributionId string
    CDN distribution ID
    errors string[]
    List of distribution errors
    name string
    projectId string
    STACKIT project ID associated with the distribution
    status string
    Status of the distribution
    certificate CdnCustomDomainCertificateArgs
    The TLS certificate for the custom domain. If omitted, a managed certificate will be used. If the block is specified, a custom certificate is used.
    distribution_id str
    CDN distribution ID
    errors Sequence[str]
    List of distribution errors
    name str
    project_id str
    STACKIT project ID associated with the distribution
    status str
    Status of the distribution
    certificate Property Map
    The TLS certificate for the custom domain. If omitted, a managed certificate will be used. If the block is specified, a custom certificate is used.
    distributionId String
    CDN distribution ID
    errors List<String>
    List of distribution errors
    name String
    projectId String
    STACKIT project ID associated with the distribution
    status String
    Status of the distribution

    Supporting Types

    CdnCustomDomainCertificate, CdnCustomDomainCertificateArgs

    Certificate string
    The PEM-encoded TLS certificate. Required for custom certificates.
    PrivateKey string
    The PEM-encoded private key for the certificate. Required for custom certificates. The certificate will be updated if this field is changed.
    Version int
    A version identifier for the certificate. Required for custom certificates. The certificate will be updated if this field is changed.
    Certificate string
    The PEM-encoded TLS certificate. Required for custom certificates.
    PrivateKey string
    The PEM-encoded private key for the certificate. Required for custom certificates. The certificate will be updated if this field is changed.
    Version int
    A version identifier for the certificate. Required for custom certificates. The certificate will be updated if this field is changed.
    certificate String
    The PEM-encoded TLS certificate. Required for custom certificates.
    privateKey String
    The PEM-encoded private key for the certificate. Required for custom certificates. The certificate will be updated if this field is changed.
    version Integer
    A version identifier for the certificate. Required for custom certificates. The certificate will be updated if this field is changed.
    certificate string
    The PEM-encoded TLS certificate. Required for custom certificates.
    privateKey string
    The PEM-encoded private key for the certificate. Required for custom certificates. The certificate will be updated if this field is changed.
    version number
    A version identifier for the certificate. Required for custom certificates. The certificate will be updated if this field is changed.
    certificate str
    The PEM-encoded TLS certificate. Required for custom certificates.
    private_key str
    The PEM-encoded private key for the certificate. Required for custom certificates. The certificate will be updated if this field is changed.
    version int
    A version identifier for the certificate. Required for custom certificates. The certificate will be updated if this field is changed.
    certificate String
    The PEM-encoded TLS certificate. Required for custom certificates.
    privateKey String
    The PEM-encoded private key for the certificate. Required for custom certificates. The certificate will be updated if this field is changed.
    version Number
    A version identifier for the certificate. Required for custom certificates. The certificate will be updated if this field is changed.

    Package Details

    Repository
    stackit stackitcloud/pulumi-stackit
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the stackit Terraform Provider.
    stackit logo
    Viewing docs for stackit v0.0.4
    published on Friday, Feb 20, 2026 by stackitcloud
      Try Pulumi Cloud free. Your team will thank you.