import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a Front Door (standard/premium) Custom Domain. * * !> **Note:** If you are using Terraform to manage your DNS Auth and DNS CNAME records for your Custom Domain you will need to add configuration blocks for both the `azure.dns.TxtRecord`(see the `Example DNS Auth TXT Record Usage` below) and the `azure.dns.CNameRecord`(see the `Example CNAME Record Usage` below) to your configuration file. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-cdn-frontdoor", * location: "West Europe", * }); * const exampleZone = new azure.dns.Zone("example", { * name: "sub-domain.domain.com", * resourceGroupName: example.name, * }); * const exampleFrontdoorProfile = new azure.cdn.FrontdoorProfile("example", { * name: "example-profile", * resourceGroupName: example.name, * skuName: "Standard_AzureFrontDoor", * }); * const exampleFrontdoorCustomDomain = new azure.cdn.FrontdoorCustomDomain("example", { * name: "example-customDomain", * cdnFrontdoorProfileId: exampleFrontdoorProfile.id, * dnsZoneId: exampleZone.id, * hostName: "contoso.fabrikam.com", * tls: { * certificateType: "ManagedCertificate", * minimumTlsVersion: "TLS12", * }, * }); * ``` * * ## Example DNS Auth TXT Record Usage * * The name of your DNS TXT record should be in the format of `_dnsauth.`. So, for example, if we use the `hostName` in the example usage above you would create a DNS TXT record with the name of `_dnsauth.contoso` which contains the value of the Front Door Custom Domains `validationToken` field. See the [product documentation](https://learn.microsoft.com/azure/frontdoor/standard-premium/how-to-add-custom-domain) for more information. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * import * as std from "@pulumi/std"; * * const example = new azure.dns.TxtRecord("example", { * name: std.join({ * separator: ".", * input: [ * "_dnsauth", * "contoso", * ], * }).then(invoke => invoke.result), * zoneName: exampleAzurermDnsZone.name, * resourceGroupName: exampleAzurermResourceGroup.name, * ttl: 3600, * records: [{ * value: exampleAzurermCdnFrontdoorCustomDomain.validationToken, * }], * }); * ``` * * ## Example CNAME Record Usage * * !> **Note:** You **must** include the `dependsOn` meta-argument which references both the `azure.cdn.FrontdoorRoute` and the `azure.cdn.FrontdoorSecurityPolicy` that are associated with your Custom Domain. The reason for these `dependsOn` meta-arguments is because all of the resources for the Custom Domain need to be associated within Front Door before the CNAME record can be written to the domains DNS, else the CNAME validation will fail and Front Door will not enable traffic to the Domain. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.dns.CNameRecord("example", { * name: "contoso", * zoneName: exampleAzurermDnsZone.name, * resourceGroupName: exampleAzurermResourceGroup.name, * ttl: 3600, * record: exampleAzurermCdnFrontdoorEndpoint.hostName, * }, { * dependsOn: [ * exampleAzurermCdnFrontdoorRoute, * exampleAzurermCdnFrontdoorSecurityPolicy, * ], * }); * ``` * * ## Import * * Front Door Custom Domains can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:cdn/frontdoorCustomDomain:FrontdoorCustomDomain example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Cdn/profiles/profile1/customDomains/customDomain1 * ``` */ export declare class FrontdoorCustomDomain extends pulumi.CustomResource { /** * Get an existing FrontdoorCustomDomain 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?: FrontdoorCustomDomainState, opts?: pulumi.CustomResourceOptions): FrontdoorCustomDomain; /** * Returns true if the given object is an instance of FrontdoorCustomDomain. 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 FrontdoorCustomDomain; /** * The ID of the Front Door Profile. Changing this forces a new Front Door Custom Domain to be created. */ readonly cdnFrontdoorProfileId: pulumi.Output; /** * The ID of the Azure DNS Zone which should be used for this Front Door Custom Domain. If you are using Azure to host your [DNS domains](https://learn.microsoft.com/azure/dns/dns-overview), you must delegate the domain provider's domain name system (DNS) to an Azure DNS Zone. For more information, see [Delegate a domain to Azure DNS](https://learn.microsoft.com/azure/dns/dns-delegate-domain-azure-dns). Otherwise, if you're using your own domain provider to handle your DNS, you must validate the Front Door Custom Domain by creating the DNS TXT records manually. * * */ readonly dnsZoneId: pulumi.Output; /** * The date time that the token expires. */ readonly expirationDate: pulumi.Output; /** * The host name of the domain. The `hostName` field must be the FQDN of your domain(e.g. `contoso.fabrikam.com`). Changing this forces a new Front Door Custom Domain to be created. */ readonly hostName: pulumi.Output; /** * The name which should be used for this Front Door Custom Domain. Possible values must be between 2 and 260 characters in length, must begin with a letter or number, end with a letter or number and contain only letters, numbers and hyphens. Changing this forces a new Front Door Custom Domain to be created. */ readonly name: pulumi.Output; /** * A `tls` block as defined below. */ readonly tls: pulumi.Output; /** * Challenge used for DNS TXT record or file based validation. */ readonly validationToken: pulumi.Output; /** * Create a FrontdoorCustomDomain 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: FrontdoorCustomDomainArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering FrontdoorCustomDomain resources. */ export interface FrontdoorCustomDomainState { /** * The ID of the Front Door Profile. Changing this forces a new Front Door Custom Domain to be created. */ cdnFrontdoorProfileId?: pulumi.Input; /** * The ID of the Azure DNS Zone which should be used for this Front Door Custom Domain. If you are using Azure to host your [DNS domains](https://learn.microsoft.com/azure/dns/dns-overview), you must delegate the domain provider's domain name system (DNS) to an Azure DNS Zone. For more information, see [Delegate a domain to Azure DNS](https://learn.microsoft.com/azure/dns/dns-delegate-domain-azure-dns). Otherwise, if you're using your own domain provider to handle your DNS, you must validate the Front Door Custom Domain by creating the DNS TXT records manually. * * */ dnsZoneId?: pulumi.Input; /** * The date time that the token expires. */ expirationDate?: pulumi.Input; /** * The host name of the domain. The `hostName` field must be the FQDN of your domain(e.g. `contoso.fabrikam.com`). Changing this forces a new Front Door Custom Domain to be created. */ hostName?: pulumi.Input; /** * The name which should be used for this Front Door Custom Domain. Possible values must be between 2 and 260 characters in length, must begin with a letter or number, end with a letter or number and contain only letters, numbers and hyphens. Changing this forces a new Front Door Custom Domain to be created. */ name?: pulumi.Input; /** * A `tls` block as defined below. */ tls?: pulumi.Input; /** * Challenge used for DNS TXT record or file based validation. */ validationToken?: pulumi.Input; } /** * The set of arguments for constructing a FrontdoorCustomDomain resource. */ export interface FrontdoorCustomDomainArgs { /** * The ID of the Front Door Profile. Changing this forces a new Front Door Custom Domain to be created. */ cdnFrontdoorProfileId: pulumi.Input; /** * The ID of the Azure DNS Zone which should be used for this Front Door Custom Domain. If you are using Azure to host your [DNS domains](https://learn.microsoft.com/azure/dns/dns-overview), you must delegate the domain provider's domain name system (DNS) to an Azure DNS Zone. For more information, see [Delegate a domain to Azure DNS](https://learn.microsoft.com/azure/dns/dns-delegate-domain-azure-dns). Otherwise, if you're using your own domain provider to handle your DNS, you must validate the Front Door Custom Domain by creating the DNS TXT records manually. * * */ dnsZoneId?: pulumi.Input; /** * The host name of the domain. The `hostName` field must be the FQDN of your domain(e.g. `contoso.fabrikam.com`). Changing this forces a new Front Door Custom Domain to be created. */ hostName: pulumi.Input; /** * The name which should be used for this Front Door Custom Domain. Possible values must be between 2 and 260 characters in length, must begin with a letter or number, end with a letter or number and contain only letters, numbers and hyphens. Changing this forces a new Front Door Custom Domain to be created. */ name?: pulumi.Input; /** * A `tls` block as defined below. */ tls: pulumi.Input; }