UNPKG

@pulumi/gcp

Version:

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

78 lines 3.04 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getKMSCryptoKeyVersionOutput = exports.getKMSCryptoKeyVersion = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides access to a Google Cloud Platform KMS CryptoKeyVersion. For more information see * [the official documentation](https://cloud.google.com/kms/docs/object-hierarchy#key_version) * and * [API](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions). * * A CryptoKeyVersion represents an individual cryptographic key, and the associated key material. * * ## 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, * })); * const myCryptoKeyVersion = gcp.kms.getKMSCryptoKeyVersion({ * cryptoKey: myKey.id, * }); * ``` */ function getKMSCryptoKeyVersion(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("gcp:kms/getKMSCryptoKeyVersion:getKMSCryptoKeyVersion", { "cryptoKey": args.cryptoKey, "version": args.version, }, opts); } exports.getKMSCryptoKeyVersion = getKMSCryptoKeyVersion; /** * Provides access to a Google Cloud Platform KMS CryptoKeyVersion. For more information see * [the official documentation](https://cloud.google.com/kms/docs/object-hierarchy#key_version) * and * [API](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions). * * A CryptoKeyVersion represents an individual cryptographic key, and the associated key material. * * ## 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, * })); * const myCryptoKeyVersion = gcp.kms.getKMSCryptoKeyVersion({ * cryptoKey: myKey.id, * }); * ``` */ function getKMSCryptoKeyVersionOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("gcp:kms/getKMSCryptoKeyVersion:getKMSCryptoKeyVersion", { "cryptoKey": args.cryptoKey, "version": args.version, }, opts); } exports.getKMSCryptoKeyVersionOutput = getKMSCryptoKeyVersionOutput; //# sourceMappingURL=getKMSCryptoKeyVersion.js.map