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-resource-group",
 *     location: "West Europe",
 * });
 * const exampleZone = new azure.dns.Zone("example", {
 *     name: "fabrikam.com",
 *     resourceGroupName: example.name,
 * });
 * const exampleFrontdoorProfile = new azure.cdn.FrontdoorProfile("example", {
 *     name: "example-cdn-frontdoor-profile",
 *     resourceGroupName: example.name,
 *     skuName: "Standard_AzureFrontDoor",
 * });
 * const exampleFrontdoorEndpoint = new azure.cdn.FrontdoorEndpoint("example", {
 *     name: "example-cdn-frontdoor-endpoint",
 *     cdnFrontdoorProfileId: exampleFrontdoorProfile.id,
 * });
 * const exampleFrontdoorOriginGroup = new azure.cdn.FrontdoorOriginGroup("example", {
 *     name: "example-cdn-frontdoor-origin-group",
 *     cdnFrontdoorProfileId: exampleFrontdoorProfile.id,
 *     loadBalancing: {},
 * });
 * const exampleFrontdoorOrigin = new azure.cdn.FrontdoorOrigin("example", {
 *     name: "example-cdn-frontdoor-origin",
 *     cdnFrontdoorOriginGroupId: exampleFrontdoorOriginGroup.id,
 *     hostName: "contoso.fabrikam.com",
 *     certificateNameCheckEnabled: false,
 * });
 * const exampleFrontdoorCustomDomain = new azure.cdn.FrontdoorCustomDomain("example", {
 *     name: "example-cdn-frontdoor-custom-domain",
 *     cdnFrontdoorProfileId: exampleFrontdoorProfile.id,
 *     dnsZoneId: exampleZone.id,
 *     hostName: exampleFrontdoorOrigin.hostName,
 *     tls: {
 *         certificateType: "ManagedCertificate",
 *         minimumVersion: "TLS12",
 *     },
 * });
 * const exampleFrontdoorRoute = new azure.cdn.FrontdoorRoute("example", {
 *     name: "example-cdn-frontdoor-route",
 *     cdnFrontdoorEndpointId: exampleFrontdoorEndpoint.id,
 *     cdnFrontdoorOriginGroupId: exampleFrontdoorOriginGroup.id,
 *     cdnFrontdoorOriginIds: [exampleFrontdoorOrigin.id],
 *     cdnFrontdoorCustomDomainIds: [exampleFrontdoorCustomDomain.id],
 *     patternsToMatches: ["/*"],
 *     supportedProtocols: [
 *         "Http",
 *         "Https",
 *     ],
 * });
 * const exampleFrontdoorFirewallPolicy = new azure.cdn.FrontdoorFirewallPolicy("example", {
 *     name: "examplecdnfrontdoorfirewallpolicy",
 *     resourceGroupName: example.name,
 *     skuName: exampleFrontdoorProfile.skuName,
 *     mode: "Prevention",
 * });
 * const exampleFrontdoorSecurityPolicy = new azure.cdn.FrontdoorSecurityPolicy("example", {
 *     name: "example-cdn-frontdoor-security-policy",
 *     cdnFrontdoorProfileId: exampleFrontdoorProfile.id,
 *     securityPolicies: {
 *         firewall: {
 *             cdnFrontdoorFirewallPolicyId: exampleFrontdoorFirewallPolicy.id,
 *             association: {
 *                 domains: [{
 *                     cdnFrontdoorDomainId: exampleFrontdoorCustomDomain.id,
 *                 }],
 *                 patternsToMatch: "/*",
 *             },
 *         },
 *     },
 * });
 * ```
 *
 * ## Example DNS Auth TXT Record Usage
 *
 * The name of your DNS TXT record should be in the format of `_dnsauth.<your_subdomain>`. 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.
 *
 * > **Note:** Domain ownership validation is performed asynchronously by the Azure Front Door service (the domain typically transitions through states like `Submitting` and `Pending` before becoming `Approved`). If validation appears to be taking longer than expected, refer to the Azure Front Door documentation on [domain validation](https://learn.microsoft.com/azure/frontdoor/domain#domain-validation) and [domain validation states](https://learn.microsoft.com/azure/frontdoor/domain#domain-validation).
 *
 * > **Note:** Azure Front Door custom domain operations are currently gated by an internal service-side validation and backend synchronization process. While that process is running, the service can reject otherwise valid follow-up write operations until the custom domain reaches an approved state, which can make create, update, and delete operations take significantly longer than expected.
 *
 * ```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.split({
 *         separator: ".",
 *         text: exampleAzurermCdnFrontdoorCustomDomain.hostName,
 *     }).then(invoke => std.join({
 *         separator: ".",
 *         input: [
 *             "_dnsauth",
 *             invoke.result?.[0],
 *         ],
 *     })).then(invoke => invoke.result),
 *     zoneName: exampleAzurermDnsZone.name,
 *     resourceGroupName: exampleAzurermResourceGroup.name,
 *     ttl: 3600,
 *     records: [{
 *         value: exampleAzurermCdnFrontdoorCustomDomain.validationToken,
 *     }],
 * });
 * ```
 *
 * ## Example CNAME Record Usage
 *
 * > **Note:** When managing the CNAME record using Terraform, you may need to ensure your Custom Domain is associated with a Front Door Route (and any applicable Security Policy) before creating the CNAME record. This example uses `dependsOn` to enforce that ordering.
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * import * as std from "@pulumi/std";
 *
 * const example = new azure.dns.CNameRecord("example", {
 *     name: std.split({
 *         separator: ".",
 *         text: exampleAzurermCdnFrontdoorCustomDomain.hostName,
 *     }).then(invoke => invoke.result?.[0]),
 *     zoneName: exampleAzurermDnsZone.name,
 *     resourceGroupName: exampleAzurermResourceGroup.name,
 *     ttl: 3600,
 *     record: exampleAzurermCdnFrontdoorEndpoint.hostName,
 * }, {
 *     dependsOn: [
 *         exampleAzurermCdnFrontdoorRoute,
 *         exampleAzurermCdnFrontdoorSecurityPolicy,
 *     ],
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.Cdn` - 2025-04-15
 *
 * ## Import
 *
 * A Front Door Custom Domain 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<pulumi.ID>, 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 resource to be created.
     */
    readonly cdnFrontdoorProfileId: pulumi.Output<string>;
    /**
     * The ID of the Azure DNS Zone which should be used for this Front Door Custom Domain.
     *
     * > **Note:** 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.
     *
     * <!-- * `preValidatedCdnFrontdoorCustomDomainId` - (Optional) The resource ID of the pre-validated Front Door Custom Domain. This domain type is used when you wish to onboard a validated Azure service domain, and then configure the Azure service behind an Azure Front Door.
     *
     * > **Note:** Currently `preValidatedCdnFrontdoorCustomDomainId` only supports domains validated by Static Web App. -->
     */
    readonly dnsZoneId: pulumi.Output<string | undefined>;
    /**
     * The date and time that the token expires.
     */
    readonly expirationDate: pulumi.Output<string>;
    /**
     * The host name of the domain. Changing this forces a new resource to be created.
     *
     * > **Note:** The `hostName` field must be the FQDN of your domain (e.g. `contoso.fabrikam.com`).
     */
    readonly hostName: pulumi.Output<string>;
    /**
     * The name which should be used for this Front Door Custom Domain. Changing this forces a new resource to be created.
     *
     * > **Note:** `name` 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.
     */
    readonly name: pulumi.Output<string>;
    /**
     * A `tls` block as defined below.
     */
    readonly tls: pulumi.Output<outputs.cdn.FrontdoorCustomDomainTls>;
    /**
     * Challenge used for DNS TXT record or file based validation.
     */
    readonly validationToken: pulumi.Output<string>;
    /**
     * 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 resource to be created.
     */
    cdnFrontdoorProfileId?: pulumi.Input<string | undefined>;
    /**
     * The ID of the Azure DNS Zone which should be used for this Front Door Custom Domain.
     *
     * > **Note:** 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.
     *
     * <!-- * `preValidatedCdnFrontdoorCustomDomainId` - (Optional) The resource ID of the pre-validated Front Door Custom Domain. This domain type is used when you wish to onboard a validated Azure service domain, and then configure the Azure service behind an Azure Front Door.
     *
     * > **Note:** Currently `preValidatedCdnFrontdoorCustomDomainId` only supports domains validated by Static Web App. -->
     */
    dnsZoneId?: pulumi.Input<string | undefined>;
    /**
     * The date and time that the token expires.
     */
    expirationDate?: pulumi.Input<string | undefined>;
    /**
     * The host name of the domain. Changing this forces a new resource to be created.
     *
     * > **Note:** The `hostName` field must be the FQDN of your domain (e.g. `contoso.fabrikam.com`).
     */
    hostName?: pulumi.Input<string | undefined>;
    /**
     * The name which should be used for this Front Door Custom Domain. Changing this forces a new resource to be created.
     *
     * > **Note:** `name` 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.
     */
    name?: pulumi.Input<string | undefined>;
    /**
     * A `tls` block as defined below.
     */
    tls?: pulumi.Input<inputs.cdn.FrontdoorCustomDomainTls | undefined>;
    /**
     * Challenge used for DNS TXT record or file based validation.
     */
    validationToken?: pulumi.Input<string | undefined>;
}
/**
 * The set of arguments for constructing a FrontdoorCustomDomain resource.
 */
export interface FrontdoorCustomDomainArgs {
    /**
     * The ID of the Front Door Profile. Changing this forces a new resource to be created.
     */
    cdnFrontdoorProfileId: pulumi.Input<string>;
    /**
     * The ID of the Azure DNS Zone which should be used for this Front Door Custom Domain.
     *
     * > **Note:** 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.
     *
     * <!-- * `preValidatedCdnFrontdoorCustomDomainId` - (Optional) The resource ID of the pre-validated Front Door Custom Domain. This domain type is used when you wish to onboard a validated Azure service domain, and then configure the Azure service behind an Azure Front Door.
     *
     * > **Note:** Currently `preValidatedCdnFrontdoorCustomDomainId` only supports domains validated by Static Web App. -->
     */
    dnsZoneId?: pulumi.Input<string | undefined>;
    /**
     * The host name of the domain. Changing this forces a new resource to be created.
     *
     * > **Note:** The `hostName` field must be the FQDN of your domain (e.g. `contoso.fabrikam.com`).
     */
    hostName: pulumi.Input<string>;
    /**
     * The name which should be used for this Front Door Custom Domain. Changing this forces a new resource to be created.
     *
     * > **Note:** `name` 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.
     */
    name?: pulumi.Input<string | undefined>;
    /**
     * A `tls` block as defined below.
     */
    tls: pulumi.Input<inputs.cdn.FrontdoorCustomDomainTls>;
}
//# sourceMappingURL=frontdoorCustomDomain.d.ts.map