"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.Kmsconfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * NetApp Volumes always encrypts your data at rest using volume-specific keys.
 *
 * A CMEK policy (customer-managed encryption key) warps such volume-specific keys in a key stored in Cloud Key Management Service (KMS).
 *
 * To get more information about kmsconfig, see:
 *
 * * [API documentation](https://cloud.google.com/netapp/volumes/docs/reference/rest/v1/projects.locations.kmsConfigs)
 * * How-to Guides
 *     * [Documentation](https://cloud.google.com/netapp/volumes/docs/configure-and-use/cmek/cmek-overview)
 *
 * ## Example Usage
 *
 * ### Kms Config Create
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const kmsConfig = new gcp.netapp.Kmsconfig("kmsConfig", {
 *     name: "kms-test",
 *     description: "this is a test description",
 *     cryptoKeyName: "crypto-name",
 *     location: "us-central1",
 * });
 * ```
 *
 * ## Import
 *
 * kmsconfig can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/kmsConfigs/{{name}}`
 *
 * * `{{project}}/{{location}}/{{name}}`
 *
 * * `{{location}}/{{name}}`
 *
 * When using the `pulumi import` command, kmsconfig can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:netapp/kmsconfig:Kmsconfig default projects/{{project}}/locations/{{location}}/kmsConfigs/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:netapp/kmsconfig:Kmsconfig default {{project}}/{{location}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:netapp/kmsconfig:Kmsconfig default {{location}}/{{name}}
 * ```
 */
class Kmsconfig extends pulumi.CustomResource {
    /**
     * Get an existing Kmsconfig 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 Kmsconfig(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Kmsconfig.  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'] === Kmsconfig.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["cryptoKeyName"] = state?.cryptoKeyName;
            resourceInputs["description"] = state?.description;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["instructions"] = state?.instructions;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["serviceAccount"] = state?.serviceAccount;
        }
        else {
            const args = argsOrState;
            if (args?.cryptoKeyName === undefined && !opts.urn) {
                throw new Error("Missing required property 'cryptoKeyName'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            resourceInputs["cryptoKeyName"] = args?.cryptoKeyName;
            resourceInputs["description"] = args?.description;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["location"] = args?.location;
            resourceInputs["name"] = args?.name;
            resourceInputs["project"] = args?.project;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["instructions"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
            resourceInputs["serviceAccount"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(Kmsconfig.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Kmsconfig = Kmsconfig;
/** @internal */
Kmsconfig.__pulumiType = 'gcp:netapp/kmsconfig:Kmsconfig';
//# sourceMappingURL=kmsconfig.js.map