@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
74 lines • 2.94 kB
JavaScript
;
// *** 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.getCryptoKeyLatestVersionOutput = exports.getCryptoKeyLatestVersion = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides access to the latest Google Cloud Platform KMS CryptoKeyVersion in a CryptoKey. 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).
*
* ## 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 myCryptoKeyLatestVersion = gcp.kms.getCryptoKeyLatestVersion({
* cryptoKey: myKey.id,
* });
* ```
*/
function getCryptoKeyLatestVersion(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("gcp:kms/getCryptoKeyLatestVersion:getCryptoKeyLatestVersion", {
"cryptoKey": args.cryptoKey,
"filter": args.filter,
}, opts);
}
exports.getCryptoKeyLatestVersion = getCryptoKeyLatestVersion;
/**
* Provides access to the latest Google Cloud Platform KMS CryptoKeyVersion in a CryptoKey. 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).
*
* ## 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 myCryptoKeyLatestVersion = gcp.kms.getCryptoKeyLatestVersion({
* cryptoKey: myKey.id,
* });
* ```
*/
function getCryptoKeyLatestVersionOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("gcp:kms/getCryptoKeyLatestVersion:getCryptoKeyLatestVersion", {
"cryptoKey": args.cryptoKey,
"filter": args.filter,
}, opts);
}
exports.getCryptoKeyLatestVersionOutput = getCryptoKeyLatestVersionOutput;
//# sourceMappingURL=getCryptoKeyLatestVersion.js.map