UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

74 lines 2.75 kB
"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.getKMSCryptoKeyOutput = exports.getKMSCryptoKey = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides access to a Google Cloud Platform KMS CryptoKey. For more information see * [the official documentation](https://cloud.google.com/kms/docs/object-hierarchy#key) * and * [API](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys). * * A CryptoKey is an interface to key material which can be used to encrypt and decrypt data. A CryptoKey belongs to a * Google Cloud KMS KeyRing. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const myKeyRing = gcp.kms.getKMSKeyRing({ * name: "my-key-ring", * location: "us-central1", * }); * const myCryptoKey = myKeyRing.then(myKeyRing => gcp.kms.getKMSCryptoKey({ * name: "my-crypto-key", * keyRing: myKeyRing.id, * })); * ``` */ function getKMSCryptoKey(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("gcp:kms/getKMSCryptoKey:getKMSCryptoKey", { "keyRing": args.keyRing, "name": args.name, }, opts); } exports.getKMSCryptoKey = getKMSCryptoKey; /** * Provides access to a Google Cloud Platform KMS CryptoKey. For more information see * [the official documentation](https://cloud.google.com/kms/docs/object-hierarchy#key) * and * [API](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys). * * A CryptoKey is an interface to key material which can be used to encrypt and decrypt data. A CryptoKey belongs to a * Google Cloud KMS KeyRing. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const myKeyRing = gcp.kms.getKMSKeyRing({ * name: "my-key-ring", * location: "us-central1", * }); * const myCryptoKey = myKeyRing.then(myKeyRing => gcp.kms.getKMSCryptoKey({ * name: "my-crypto-key", * keyRing: myKeyRing.id, * })); * ``` */ function getKMSCryptoKeyOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("gcp:kms/getKMSCryptoKey:getKMSCryptoKey", { "keyRing": args.keyRing, "name": args.name, }, opts); } exports.getKMSCryptoKeyOutput = getKMSCryptoKeyOutput; //# sourceMappingURL=getKMSCryptoKey.js.map