"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! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.RegionalSecretVersion = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * ## Example Usage
 *
 * ### Regional Secret Version Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const secret_basic = new gcp.secretmanager.RegionalSecret("secret-basic", {
 *     secretId: "secret-version",
 *     location: "us-central1",
 * });
 * const regionalSecretVersionBasic = new gcp.secretmanager.RegionalSecretVersion("regional_secret_version_basic", {
 *     secret: secret_basic.id,
 *     secretData: "secret-data",
 * });
 * ```
 * ### Regional Secret Version With Base64 Data
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as std from "@pulumi/std";
 *
 * const secret_basic = new gcp.secretmanager.RegionalSecret("secret-basic", {
 *     secretId: "secret-version",
 *     location: "us-central1",
 * });
 * const regionalSecretVersionBase64 = new gcp.secretmanager.RegionalSecretVersion("regional_secret_version_base64", {
 *     secret: secret_basic.id,
 *     secretData: std.filebase64({
 *         input: "secret-data.pfx",
 *     }).then(invoke => invoke.result),
 *     isSecretDataBase64: true,
 * });
 * ```
 * ### Regional Secret Version Disabled
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const secret_basic = new gcp.secretmanager.RegionalSecret("secret-basic", {
 *     secretId: "secret-version",
 *     location: "us-central1",
 * });
 * const regionalSecretVersionDisabled = new gcp.secretmanager.RegionalSecretVersion("regional_secret_version_disabled", {
 *     secret: secret_basic.id,
 *     secretData: "secret-data",
 *     enabled: false,
 * });
 * ```
 * ### Regional Secret Version Deletion Policy Abandon
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const secret_basic = new gcp.secretmanager.RegionalSecret("secret-basic", {
 *     secretId: "secret-version",
 *     location: "us-central1",
 * });
 * const regionalSecretVersionDeletionPolicy = new gcp.secretmanager.RegionalSecretVersion("regional_secret_version_deletion_policy", {
 *     secret: secret_basic.id,
 *     secretData: "secret-data",
 *     deletionPolicy: "ABANDON",
 * });
 * ```
 * ### Regional Secret Version Deletion Policy Disable
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const secret_basic = new gcp.secretmanager.RegionalSecret("secret-basic", {
 *     secretId: "secret-version",
 *     location: "us-central1",
 * });
 * const regionalSecretVersionDeletionPolicy = new gcp.secretmanager.RegionalSecretVersion("regional_secret_version_deletion_policy", {
 *     secret: secret_basic.id,
 *     secretData: "secret-data",
 *     deletionPolicy: "DISABLE",
 * });
 * ```
 *
 * ## Import
 *
 * RegionalSecretVersion can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}/versions/{{version}}`
 *
 * When using the `pulumi import` command, RegionalSecretVersion can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:secretmanager/regionalSecretVersion:RegionalSecretVersion default projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}/versions/{{version}}
 * ```
 */
class RegionalSecretVersion extends pulumi.CustomResource {
    /**
     * Get an existing RegionalSecretVersion 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 RegionalSecretVersion(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of RegionalSecretVersion.  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'] === RegionalSecretVersion.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["customerManagedEncryptions"] = state?.customerManagedEncryptions;
            resourceInputs["deletionPolicy"] = state?.deletionPolicy;
            resourceInputs["destroyTime"] = state?.destroyTime;
            resourceInputs["enabled"] = state?.enabled;
            resourceInputs["isSecretDataBase64"] = state?.isSecretDataBase64;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["secret"] = state?.secret;
            resourceInputs["secretData"] = state?.secretData;
            resourceInputs["version"] = state?.version;
        }
        else {
            const args = argsOrState;
            if (args?.secret === undefined && !opts.urn) {
                throw new Error("Missing required property 'secret'");
            }
            if (args?.secretData === undefined && !opts.urn) {
                throw new Error("Missing required property 'secretData'");
            }
            resourceInputs["deletionPolicy"] = args?.deletionPolicy;
            resourceInputs["enabled"] = args?.enabled;
            resourceInputs["isSecretDataBase64"] = args?.isSecretDataBase64;
            resourceInputs["secret"] = args?.secret;
            resourceInputs["secretData"] = args?.secretData ? pulumi.secret(args.secretData) : undefined;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["customerManagedEncryptions"] = undefined /*out*/;
            resourceInputs["destroyTime"] = undefined /*out*/;
            resourceInputs["location"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["version"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["secretData"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(RegionalSecretVersion.__pulumiType, name, resourceInputs, opts);
    }
}
exports.RegionalSecretVersion = RegionalSecretVersion;
/** @internal */
RegionalSecretVersion.__pulumiType = 'gcp:secretmanager/regionalSecretVersion:RegionalSecretVersion';
//# sourceMappingURL=regionalSecretVersion.js.map