"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.Provider = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("./utilities"));
/**
 * The provider type for the azurerm package. By default, resources use package-wide configuration
 * settings, however an explicit `Provider` instance may be created and passed during resource
 * construction to achieve fine-grained programmatic control over provider settings. See the
 * [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
 */
class Provider extends pulumi.ProviderResource {
    /** @internal */
    static __pulumiType = 'azure';
    /**
     * Returns true if the given object is an instance of Provider.  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'] === "pulumi:providers:" + Provider.__pulumiType;
    }
    /**
     * Create a Provider 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, args, opts) {
        let resourceInputs = {};
        opts = opts || {};
        {
            resourceInputs["adoPipelineServiceConnectionId"] = args?.adoPipelineServiceConnectionId;
            resourceInputs["auxiliaryTenantIds"] = pulumi.output(args?.auxiliaryTenantIds ? pulumi.secret(args.auxiliaryTenantIds) : undefined).apply(JSON.stringify);
            resourceInputs["clientCertificate"] = args?.clientCertificate ? pulumi.secret(args.clientCertificate) : undefined;
            resourceInputs["clientCertificatePassword"] = args?.clientCertificatePassword ? pulumi.secret(args.clientCertificatePassword) : undefined;
            resourceInputs["clientCertificatePath"] = args?.clientCertificatePath ? pulumi.secret(args.clientCertificatePath) : undefined;
            resourceInputs["clientId"] = args?.clientId ? pulumi.secret(args.clientId) : undefined;
            resourceInputs["clientIdFilePath"] = args?.clientIdFilePath ? pulumi.secret(args.clientIdFilePath) : undefined;
            resourceInputs["clientSecret"] = args?.clientSecret ? pulumi.secret(args.clientSecret) : undefined;
            resourceInputs["clientSecretFilePath"] = args?.clientSecretFilePath ? pulumi.secret(args.clientSecretFilePath) : undefined;
            resourceInputs["disableCorrelationRequestId"] = pulumi.output(args?.disableCorrelationRequestId).apply(JSON.stringify);
            resourceInputs["disableTerraformPartnerId"] = pulumi.output(args?.disableTerraformPartnerId).apply(JSON.stringify);
            resourceInputs["enhancedValidation"] = pulumi.output(args?.enhancedValidation).apply(JSON.stringify);
            resourceInputs["environment"] = (args?.environment) ?? (utilities.getEnv("AZURE_ENVIRONMENT", "ARM_ENVIRONMENT") || "public");
            resourceInputs["features"] = pulumi.output(args?.features).apply(JSON.stringify);
            resourceInputs["metadataHost"] = (args?.metadataHost) ?? utilities.getEnv("ARM_METADATA_HOSTNAME");
            resourceInputs["msiApiVersion"] = args?.msiApiVersion;
            resourceInputs["msiEndpoint"] = args?.msiEndpoint;
            resourceInputs["oidcRequestToken"] = args?.oidcRequestToken ? pulumi.secret(args.oidcRequestToken) : undefined;
            resourceInputs["oidcRequestUrl"] = args?.oidcRequestUrl;
            resourceInputs["oidcToken"] = args?.oidcToken ? pulumi.secret(args.oidcToken) : undefined;
            resourceInputs["oidcTokenFilePath"] = args?.oidcTokenFilePath ? pulumi.secret(args.oidcTokenFilePath) : undefined;
            resourceInputs["partnerId"] = args?.partnerId;
            resourceInputs["resourceProviderRegistrations"] = args?.resourceProviderRegistrations;
            resourceInputs["resourceProvidersToRegisters"] = pulumi.output(args?.resourceProvidersToRegisters).apply(JSON.stringify);
            resourceInputs["skipProviderRegistration"] = pulumi.output((args?.skipProviderRegistration) ?? (utilities.getEnvBoolean("ARM_SKIP_PROVIDER_REGISTRATION") || false)).apply(JSON.stringify);
            resourceInputs["storageUseAzuread"] = pulumi.output((args?.storageUseAzuread) ?? (utilities.getEnvBoolean("ARM_STORAGE_USE_AZUREAD") || false)).apply(JSON.stringify);
            resourceInputs["subscriptionId"] = (args?.subscriptionId ? pulumi.secret(args.subscriptionId) : undefined) ?? (utilities.getEnv("ARM_SUBSCRIPTION_ID") || "");
            resourceInputs["tenantId"] = args?.tenantId ? pulumi.secret(args.tenantId) : undefined;
            resourceInputs["useAksWorkloadIdentity"] = pulumi.output(args?.useAksWorkloadIdentity).apply(JSON.stringify);
            resourceInputs["useCli"] = pulumi.output(args?.useCli).apply(JSON.stringify);
            resourceInputs["useMsi"] = pulumi.output(args?.useMsi).apply(JSON.stringify);
            resourceInputs["useOidc"] = pulumi.output(args?.useOidc).apply(JSON.stringify);
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["clientCertificate", "clientCertificatePassword", "clientCertificatePath", "clientId", "clientIdFilePath", "clientSecret", "clientSecretFilePath", "oidcRequestToken", "oidcToken", "oidcTokenFilePath", "subscriptionId", "tenantId"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(Provider.__pulumiType, name, resourceInputs, opts);
    }
    /**
     * This function returns a Terraform config object with terraform-namecased keys,to be used with the Terraform Module Provider.
     */
    terraformConfig() {
        return pulumi.runtime.call("pulumi:providers:azure/terraformConfig", {
            "__self__": this,
        }, this);
    }
}
exports.Provider = Provider;
//# sourceMappingURL=provider.js.map