"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.ConfigurationStore = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages an Azure App Configuration.
 *
 * ## Disclaimers
 *
 * > **Note:** Version 3.27.0 and later of the Azure Provider include a Feature Toggle which will purge an App Configuration resource on destroy, rather than the default soft-delete. The Provider will automatically recover a soft-deleted App Configuration during creation if one is found. See the Features block documentation for more information on Feature Toggles within Terraform.
 *
 * > **Note:** Reading and purging soft-deleted App Configurations requires the `Microsoft.AppConfiguration/locations/deletedConfigurationStores/read` and `Microsoft.AppConfiguration/locations/deletedConfigurationStores/purge/action` permission on Subscription scope. Recovering a soft-deleted App Configuration requires the `Microsoft.AppConfiguration/configurationStores/write` permission on Subscription or Resource Group scope. [More information can be found in the Azure Documentation for App Configuration](https://learn.microsoft.com/en-us/azure/azure-app-configuration/concept-soft-delete#permissions-to-recover-a-deleted-store). See the following links for more information on assigning [Azure custom roles](https://learn.microsoft.com/en-us/azure/role-based-access-control/custom-roles) or using the `azure.authorization.Assignment` resource to assign a custom role.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const appconf = new azure.appconfiguration.ConfigurationStore("appconf", {
 *     name: "appConf1",
 *     resourceGroupName: example.name,
 *     location: example.location,
 * });
 * ```
 *
 * ### Encryption)
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleUserAssignedIdentity = new azure.authorization.UserAssignedIdentity("example", {
 *     name: "example-identity",
 *     location: example.location,
 *     resourceGroupName: example.name,
 * });
 * const current = azure.core.getClientConfig({});
 * const exampleKeyVault = new azure.keyvault.KeyVault("example", {
 *     name: "exampleKVt123",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     tenantId: current.then(current => current.tenantId),
 *     skuName: "standard",
 *     softDeleteRetentionDays: 7,
 *     purgeProtectionEnabled: true,
 * });
 * const server = new azure.keyvault.AccessPolicy("server", {
 *     keyVaultId: exampleKeyVault.id,
 *     tenantId: current.then(current => current.tenantId),
 *     objectId: exampleUserAssignedIdentity.principalId,
 *     keyPermissions: [
 *         "Get",
 *         "UnwrapKey",
 *         "WrapKey",
 *     ],
 *     secretPermissions: ["Get"],
 * });
 * const client = new azure.keyvault.AccessPolicy("client", {
 *     keyVaultId: exampleKeyVault.id,
 *     tenantId: current.then(current => current.tenantId),
 *     objectId: current.then(current => current.objectId),
 *     keyPermissions: [
 *         "Get",
 *         "Create",
 *         "Delete",
 *         "List",
 *         "Restore",
 *         "Recover",
 *         "UnwrapKey",
 *         "WrapKey",
 *         "Purge",
 *         "Encrypt",
 *         "Decrypt",
 *         "Sign",
 *         "Verify",
 *         "GetRotationPolicy",
 *     ],
 *     secretPermissions: ["Get"],
 * });
 * const exampleKey = new azure.keyvault.Key("example", {
 *     name: "exampleKVkey",
 *     keyVaultId: exampleKeyVault.id,
 *     keyType: "RSA",
 *     keySize: 2048,
 *     keyOpts: [
 *         "decrypt",
 *         "encrypt",
 *         "sign",
 *         "unwrapKey",
 *         "verify",
 *         "wrapKey",
 *     ],
 * }, {
 *     dependsOn: [
 *         client,
 *         server,
 *     ],
 * });
 * const exampleConfigurationStore = new azure.appconfiguration.ConfigurationStore("example", {
 *     name: "appConf2",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     sku: "standard",
 *     localAuthEnabled: true,
 *     publicNetworkAccess: "Enabled",
 *     purgeProtectionEnabled: false,
 *     softDeleteRetentionDays: 1,
 *     identity: {
 *         type: "UserAssigned",
 *         identityIds: [exampleUserAssignedIdentity.id],
 *     },
 *     encryption: {
 *         keyVaultKeyIdentifier: exampleKey.id,
 *         identityClientId: exampleUserAssignedIdentity.clientId,
 *     },
 *     replicas: [{
 *         name: "replica1",
 *         location: "West US",
 *     }],
 *     tags: {
 *         environment: "development",
 *     },
 * }, {
 *     dependsOn: [
 *         client,
 *         server,
 *     ],
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.AppConfiguration` - 2024-05-01
 *
 * ## Import
 *
 * App Configurations can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:appconfiguration/configurationStore:ConfigurationStore appconf /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.AppConfiguration/configurationStores/appConf1
 * ```
 */
class ConfigurationStore extends pulumi.CustomResource {
    /**
     * Get an existing ConfigurationStore 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 ConfigurationStore(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:appconfiguration/configurationStore:ConfigurationStore';
    /**
     * Returns true if the given object is an instance of ConfigurationStore.  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'] === ConfigurationStore.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["dataPlaneProxyAuthenticationMode"] = state?.dataPlaneProxyAuthenticationMode;
            resourceInputs["dataPlaneProxyPrivateLinkDelegationEnabled"] = state?.dataPlaneProxyPrivateLinkDelegationEnabled;
            resourceInputs["encryption"] = state?.encryption;
            resourceInputs["endpoint"] = state?.endpoint;
            resourceInputs["identity"] = state?.identity;
            resourceInputs["localAuthEnabled"] = state?.localAuthEnabled;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["primaryReadKeys"] = state?.primaryReadKeys;
            resourceInputs["primaryWriteKeys"] = state?.primaryWriteKeys;
            resourceInputs["publicNetworkAccess"] = state?.publicNetworkAccess;
            resourceInputs["purgeProtectionEnabled"] = state?.purgeProtectionEnabled;
            resourceInputs["replicas"] = state?.replicas;
            resourceInputs["resourceGroupName"] = state?.resourceGroupName;
            resourceInputs["secondaryReadKeys"] = state?.secondaryReadKeys;
            resourceInputs["secondaryWriteKeys"] = state?.secondaryWriteKeys;
            resourceInputs["sku"] = state?.sku;
            resourceInputs["softDeleteRetentionDays"] = state?.softDeleteRetentionDays;
            resourceInputs["tags"] = state?.tags;
        }
        else {
            const args = argsOrState;
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            resourceInputs["dataPlaneProxyAuthenticationMode"] = args?.dataPlaneProxyAuthenticationMode;
            resourceInputs["dataPlaneProxyPrivateLinkDelegationEnabled"] = args?.dataPlaneProxyPrivateLinkDelegationEnabled;
            resourceInputs["encryption"] = args?.encryption;
            resourceInputs["identity"] = args?.identity;
            resourceInputs["localAuthEnabled"] = args?.localAuthEnabled;
            resourceInputs["location"] = args?.location;
            resourceInputs["name"] = args?.name;
            resourceInputs["publicNetworkAccess"] = args?.publicNetworkAccess;
            resourceInputs["purgeProtectionEnabled"] = args?.purgeProtectionEnabled;
            resourceInputs["replicas"] = args?.replicas;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["sku"] = args?.sku;
            resourceInputs["softDeleteRetentionDays"] = args?.softDeleteRetentionDays;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["endpoint"] = undefined /*out*/;
            resourceInputs["primaryReadKeys"] = undefined /*out*/;
            resourceInputs["primaryWriteKeys"] = undefined /*out*/;
            resourceInputs["secondaryReadKeys"] = undefined /*out*/;
            resourceInputs["secondaryWriteKeys"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(ConfigurationStore.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ConfigurationStore = ConfigurationStore;
//# sourceMappingURL=configurationStore.js.map