"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomHttpsConfiguration = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * !> **Note:** This deploys an Azure Front Door (classic) resource which has been deprecated and will receive security updates only. Please migrate your existing Azure Front Door (classic) deployments to the new Azure Front Door (standard/premium) resources. For your convenience, the service team has exposed a `Front Door Classic` to `Front Door Standard/Premium` [migration tool](https://learn.microsoft.com/azure/frontdoor/tier-migration) to allow you to migrate your existing `Front Door Classic` instances to the new `Front Door Standard/Premium` product tiers.
 *
 * Manages the Custom HTTPS Configuration for an Azure Front Door (classic) Frontend Endpoint.
 *
 * > **Note:** Defining custom HTTPS configurations using a separate `azure.frontdoor.CustomHttpsConfiguration` resource allows for parallel creation/update.
 *
 * !> **Note:** In order to address the ordering issue we have changed the design on how to retrieve existing sub resources such as frontend endpoints. Existing design will be deprecated and will result in an incorrect configuration. Please refer to the updated documentation below for more information.
 *
 * !> **Note:** The `resourceGroupName` field has been removed as of the `v2.58.0` provider release. If the `resourceGroupName` field has been defined in your current `azure.frontdoor.CustomHttpsConfiguration` resource configuration file please remove it else you will receive a `An argument named "resourceGroupName" is not expected here.` error. If your pre-existing Front Door instance contained inline `customHttpsConfiguration` blocks there are additional steps that will need to be completed to successfully migrate your Front Door onto the `v2.58.0` provider which can be found in this guide.
 *
 * !> **Note:** Azure rolled out a breaking change on Friday 9th April 2021 which may cause issues with the CDN/FrontDoor resources. More information is available in this GitHub issue - unfortunately this may necessitate a breaking change to the CDN and Front Door resources, more information will be posted in the GitHub issue as the necessary changes are identified.
 *
 * !> **Note:** The creation of new Azure Front Door (classic) resources is no longer supported following its deprecation on `April 1, 2025`. However, modifications to existing Azure Front Door (classic) resources will continue to be supported until the API reaches full retirement on `March 31, 2027`.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "FrontDoorExampleResourceGroup",
 *     location: "West Europe",
 * });
 * const vault = azure.keyvault.getKeyVault({
 *     name: "example-vault",
 *     resourceGroupName: "example-vault-rg",
 * });
 * const exampleFrontdoor = new azure.frontdoor.Frontdoor("example", {
 *     name: "example-FrontDoor",
 *     resourceGroupName: example.name,
 *     routingRules: [{
 *         name: "exampleRoutingRule1",
 *         acceptedProtocols: [
 *             "Http",
 *             "Https",
 *         ],
 *         patternsToMatches: ["/*"],
 *         frontendEndpoints: ["exampleFrontendEndpoint1"],
 *         forwardingConfiguration: {
 *             forwardingProtocol: "MatchRequest",
 *             backendPoolName: "exampleBackendBing",
 *         },
 *     }],
 *     backendPoolLoadBalancings: [{
 *         name: "exampleLoadBalancingSettings1",
 *     }],
 *     backendPoolHealthProbes: [{
 *         name: "exampleHealthProbeSetting1",
 *     }],
 *     backendPools: [{
 *         name: "exampleBackendBing",
 *         backends: [{
 *             hostHeader: "www.bing.com",
 *             address: "www.bing.com",
 *             httpPort: 80,
 *             httpsPort: 443,
 *         }],
 *         loadBalancingName: "exampleLoadBalancingSettings1",
 *         healthProbeName: "exampleHealthProbeSetting1",
 *     }],
 *     frontendEndpoints: [
 *         {
 *             name: "exampleFrontendEndpoint1",
 *             hostName: "example-FrontDoor.azurefd.net",
 *         },
 *         {
 *             name: "exampleFrontendEndpoint2",
 *             hostName: "examplefd1.examplefd.net",
 *         },
 *     ],
 * });
 * const exampleCustomHttps0 = new azure.frontdoor.CustomHttpsConfiguration("example_custom_https_0", {
 *     frontendEndpointId: exampleFrontdoor.frontendEndpointsMap.exampleFrontendEndpoint1,
 *     customHttpsProvisioningEnabled: false,
 * });
 * const exampleCustomHttps1 = new azure.frontdoor.CustomHttpsConfiguration("example_custom_https_1", {
 *     frontendEndpointId: exampleFrontdoor.frontendEndpointsMap.exampleFrontendEndpoint2,
 *     customHttpsProvisioningEnabled: true,
 *     customHttpsConfiguration: {
 *         certificateSource: "AzureKeyVault",
 *         azureKeyVaultCertificateSecretName: "examplefd1",
 *         azureKeyVaultCertificateVaultId: vault.then(vault => vault.id),
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * Front Door Custom HTTPS Configurations can be imported using the `resource id` of the Front Door Custom HTTPS Configuration, e.g.
 *
 * ```sh
 * $ pulumi import azure:frontdoor/customHttpsConfiguration:CustomHttpsConfiguration example_custom_https_1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/frontDoors/frontdoor1/customHttpsConfiguration/endpoint1
 * ```
 */
class CustomHttpsConfiguration extends pulumi.CustomResource {
    /**
     * Get an existing CustomHttpsConfiguration 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, id, state, opts) {
        return new CustomHttpsConfiguration(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:frontdoor/customHttpsConfiguration:CustomHttpsConfiguration';
    /**
     * Returns true if the given object is an instance of CustomHttpsConfiguration.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === CustomHttpsConfiguration.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["customHttpsConfiguration"] = state?.customHttpsConfiguration;
            resourceInputs["customHttpsProvisioningEnabled"] = state?.customHttpsProvisioningEnabled;
            resourceInputs["frontendEndpointId"] = state?.frontendEndpointId;
        }
        else {
            const args = argsOrState;
            if (args?.customHttpsProvisioningEnabled === undefined && !opts.urn) {
                throw new Error("Missing required property 'customHttpsProvisioningEnabled'");
            }
            if (args?.frontendEndpointId === undefined && !opts.urn) {
                throw new Error("Missing required property 'frontendEndpointId'");
            }
            resourceInputs["customHttpsConfiguration"] = args?.customHttpsConfiguration;
            resourceInputs["customHttpsProvisioningEnabled"] = args?.customHttpsProvisioningEnabled;
            resourceInputs["frontendEndpointId"] = args?.frontendEndpointId;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(CustomHttpsConfiguration.__pulumiType, name, resourceInputs, opts);
    }
}
exports.CustomHttpsConfiguration = CustomHttpsConfiguration;
//# sourceMappingURL=customHttpsConfiguration.js.map