@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
120 lines (119 loc) • 4.26 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "../types/output";
/**
* 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,
* }));
* ```
*/
export declare function getKMSCryptoKey(args: GetKMSCryptoKeyArgs, opts?: pulumi.InvokeOptions): Promise<GetKMSCryptoKeyResult>;
/**
* A collection of arguments for invoking getKMSCryptoKey.
*/
export interface GetKMSCryptoKeyArgs {
/**
* The `id` of the Google Cloud Platform KeyRing to which the key belongs.
*/
keyRing: string;
/**
* The CryptoKey's name.
* A CryptoKey’s name belonging to the specified Google Cloud Platform KeyRing and match the regular expression `[a-zA-Z0-9_-]{1,63}`
*/
name: string;
}
/**
* A collection of values returned by getKMSCryptoKey.
*/
export interface GetKMSCryptoKeyResult {
readonly cryptoKeyBackend: string;
readonly destroyScheduledDuration: string;
readonly effectiveLabels: {
[key: string]: string;
};
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly importOnly: boolean;
readonly keyAccessJustificationsPolicies: outputs.kms.GetKMSCryptoKeyKeyAccessJustificationsPolicy[];
readonly keyRing: string;
readonly labels: {
[key: string]: string;
};
readonly name: string;
readonly primaries: outputs.kms.GetKMSCryptoKeyPrimary[];
readonly pulumiLabels: {
[key: string]: string;
};
/**
* Defines the cryptographic capabilities of the key.
*/
readonly purpose: string;
/**
* Every time this period passes, generate a new CryptoKeyVersion and set it as
* the primary. The first rotation will take place after the specified period. The rotation period has the format
* of a decimal number with up to 9 fractional digits, followed by the letter s (seconds).
*/
readonly rotationPeriod: string;
readonly skipInitialVersionCreation: boolean;
readonly versionTemplates: outputs.kms.GetKMSCryptoKeyVersionTemplate[];
}
/**
* 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,
* }));
* ```
*/
export declare function getKMSCryptoKeyOutput(args: GetKMSCryptoKeyOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetKMSCryptoKeyResult>;
/**
* A collection of arguments for invoking getKMSCryptoKey.
*/
export interface GetKMSCryptoKeyOutputArgs {
/**
* The `id` of the Google Cloud Platform KeyRing to which the key belongs.
*/
keyRing: pulumi.Input<string>;
/**
* The CryptoKey's name.
* A CryptoKey’s name belonging to the specified Google Cloud Platform KeyRing and match the regular expression `[a-zA-Z0-9_-]{1,63}`
*/
name: pulumi.Input<string>;
}