import * as pulumi from "@pulumi/pulumi"; /** * Manages a Container App Custom Domain. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * import * as std from "@pulumi/std"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "West Europe", * }); * const exampleZone = new azure.dns.Zone("example", { * name: "contoso.com", * resourceGroupName: example.name, * }); * const exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("example", { * name: "example", * location: example.location, * resourceGroupName: example.name, * sku: "PerGB2018", * retentionInDays: 30, * }); * const exampleEnvironment = new azure.containerapp.Environment("example", { * name: "Example-Environment", * location: example.location, * resourceGroupName: example.name, * logAnalyticsWorkspaceId: exampleAnalyticsWorkspace.id, * }); * const exampleApp = new azure.containerapp.App("example", { * name: "example-app", * containerAppEnvironmentId: exampleEnvironment.id, * resourceGroupName: example.name, * revisionMode: "Single", * template: { * containers: [{ * name: "examplecontainerapp", * image: "mcr.microsoft.com/k8se/quickstart:latest", * cpu: 0.25, * memory: "0.5Gi", * }], * }, * ingress: { * allowInsecureConnections: false, * externalEnabled: true, * targetPort: 5000, * transport: "http", * trafficWeights: [{ * latestRevision: true, * percentage: 100, * }], * }, * }); * const exampleTxtRecord = new azure.dns.TxtRecord("example", { * name: "asuid.example", * resourceGroupName: exampleZone.resourceGroupName, * zoneName: exampleZone.name, * ttl: 300, * records: [{ * value: exampleApp.customDomainVerificationId, * }], * }); * const exampleEnvironmentCertificate = new azure.containerapp.EnvironmentCertificate("example", { * name: "myfriendlyname", * containerAppEnvironmentId: exampleEnvironment.id, * certificateBlob: std.filebase64({ * input: "path/to/certificate_file.pfx", * }).then(invoke => invoke.result), * certificatePassword: "$3cretSqu1rreL", * }); * const exampleCustomDomain = new azure.containerapp.CustomDomain("example", { * name: std.trimprefix({ * input: api.fqdn, * prefix: "asuid.", * }).then(invoke => std.trimsuffix({ * input: invoke.result, * suffix: ".", * })).then(invoke => invoke.result), * containerAppId: exampleApp.id, * containerAppEnvironmentCertificateId: exampleEnvironmentCertificate.id, * certificateBindingType: "SniEnabled", * }); * ``` * * ### Managed Certificate * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * import * as std from "@pulumi/std"; * * const example = new azure.containerapp.CustomDomain("example", { * name: std.trimprefix({ * input: api.fqdn, * prefix: "asuid.", * }).then(invoke => std.trimsuffix({ * input: invoke.result, * suffix: ".", * })).then(invoke => invoke.result), * containerAppId: exampleAzurermContainerApp.id, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.App` - 2025-07-01 * * ## Import * * A Container App Custom Domain can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:containerapp/customDomain:CustomDomain example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.App/containerApps/myContainerApp/customDomainName/mycustomdomain.example.com" * ``` */ export declare class CustomDomain extends pulumi.CustomResource { /** * Get an existing CustomDomain resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: CustomDomainState, opts?: pulumi.CustomResourceOptions): CustomDomain; /** * Returns true if the given object is an instance of CustomDomain. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is CustomDomain; /** * The Certificate Binding type. Possible values are `Auto`, `Disabled` and `SniEnabled`. Required with `containerAppEnvironmentCertificateId`. Changing this forces a new resource to be created. * * !> **Note:** If using an Azure Managed Certificate `containerAppEnvironmentCertificateId` and `certificateBindingType` should be added to `ignoreChanges` to prevent resource recreation due to these values being modified asynchronously outside of Terraform. */ readonly certificateBindingType: pulumi.Output; /** * The ID of the Container App Environment Certificate to use. Changing this forces a new resource to be created. * * > **Note:** Omit this value if you wish to use an Azure Managed certificate. You must create the relevant DNS verification steps before this process will be successful. */ readonly containerAppEnvironmentCertificateId: pulumi.Output; /** * The ID of the Container App Environment Managed Certificate to use. */ readonly containerAppEnvironmentManagedCertificateId: pulumi.Output; /** * The ID of the Container App to which this Custom Domain should be bound. Changing this forces a new resource to be created. */ readonly containerAppId: pulumi.Output; /** * The fully qualified name of the Custom Domain. Must be the CN or a named SAN in the certificate specified by the `containerAppEnvironmentCertificateId`. Changing this forces a new resource to be created. * * > **Note:** The Custom Domain verification TXT record requires a prefix of `asuid.`, however, this must be trimmed from the `name` property here. See the [official docs](https://learn.microsoft.com/en-us/azure/container-apps/custom-domains-certificates) for more information. */ readonly name: pulumi.Output; /** * Create a CustomDomain resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: CustomDomainArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering CustomDomain resources. */ export interface CustomDomainState { /** * The Certificate Binding type. Possible values are `Auto`, `Disabled` and `SniEnabled`. Required with `containerAppEnvironmentCertificateId`. Changing this forces a new resource to be created. * * !> **Note:** If using an Azure Managed Certificate `containerAppEnvironmentCertificateId` and `certificateBindingType` should be added to `ignoreChanges` to prevent resource recreation due to these values being modified asynchronously outside of Terraform. */ certificateBindingType?: pulumi.Input; /** * The ID of the Container App Environment Certificate to use. Changing this forces a new resource to be created. * * > **Note:** Omit this value if you wish to use an Azure Managed certificate. You must create the relevant DNS verification steps before this process will be successful. */ containerAppEnvironmentCertificateId?: pulumi.Input; /** * The ID of the Container App Environment Managed Certificate to use. */ containerAppEnvironmentManagedCertificateId?: pulumi.Input; /** * The ID of the Container App to which this Custom Domain should be bound. Changing this forces a new resource to be created. */ containerAppId?: pulumi.Input; /** * The fully qualified name of the Custom Domain. Must be the CN or a named SAN in the certificate specified by the `containerAppEnvironmentCertificateId`. Changing this forces a new resource to be created. * * > **Note:** The Custom Domain verification TXT record requires a prefix of `asuid.`, however, this must be trimmed from the `name` property here. See the [official docs](https://learn.microsoft.com/en-us/azure/container-apps/custom-domains-certificates) for more information. */ name?: pulumi.Input; } /** * The set of arguments for constructing a CustomDomain resource. */ export interface CustomDomainArgs { /** * The Certificate Binding type. Possible values are `Auto`, `Disabled` and `SniEnabled`. Required with `containerAppEnvironmentCertificateId`. Changing this forces a new resource to be created. * * !> **Note:** If using an Azure Managed Certificate `containerAppEnvironmentCertificateId` and `certificateBindingType` should be added to `ignoreChanges` to prevent resource recreation due to these values being modified asynchronously outside of Terraform. */ certificateBindingType?: pulumi.Input; /** * The ID of the Container App Environment Certificate to use. Changing this forces a new resource to be created. * * > **Note:** Omit this value if you wish to use an Azure Managed certificate. You must create the relevant DNS verification steps before this process will be successful. */ containerAppEnvironmentCertificateId?: pulumi.Input; /** * The ID of the Container App to which this Custom Domain should be bound. Changing this forces a new resource to be created. */ containerAppId: pulumi.Input; /** * The fully qualified name of the Custom Domain. Must be the CN or a named SAN in the certificate specified by the `containerAppEnvironmentCertificateId`. Changing this forces a new resource to be created. * * > **Note:** The Custom Domain verification TXT record requires a prefix of `asuid.`, however, this must be trimmed from the `name` property here. See the [official docs](https://learn.microsoft.com/en-us/azure/container-apps/custom-domains-certificates) for more information. */ name?: pulumi.Input; }