import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../../types/input"; import * as outputs from "../../types/output"; import * as enums from "../../types/enums"; /** * Create a new CryptoKey within a KeyRing. CryptoKey.purpose and CryptoKey.version_template.algorithm are required. * Note - this resource's API doesn't support deletion. When deleted, the resource will persist * on Google Cloud even though it will be deleted from Pulumi state. */ export declare class CryptoKey extends pulumi.CustomResource { /** * Get an existing CryptoKey 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 opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): CryptoKey; /** * Returns true if the given object is an instance of CryptoKey. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is CryptoKey; /** * The time at which this CryptoKey was created. */ readonly createTime: pulumi.Output; /** * Immutable. The resource name of the backend environment where the key material for all CryptoKeyVersions associated with this CryptoKey reside and where all related cryptographic operations are performed. Only applicable if CryptoKeyVersions have a ProtectionLevel of EXTERNAL_VPC, with the resource name in the format `projects/*/locations/*/ekmConnections/*`. Note, this list is non-exhaustive and may apply to additional ProtectionLevels in the future. */ readonly cryptoKeyBackend: pulumi.Output; /** * Required. It must be unique within a KeyRing and match the regular expression `[a-zA-Z0-9_-]{1,63}` */ readonly cryptoKeyId: pulumi.Output; /** * Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours. */ readonly destroyScheduledDuration: pulumi.Output; /** * Immutable. Whether this key may contain imported versions only. */ readonly importOnly: pulumi.Output; readonly keyRingId: pulumi.Output; /** * Labels with user-defined metadata. For more information, see [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). */ readonly labels: pulumi.Output<{ [key: string]: string; }>; readonly location: pulumi.Output; /** * The resource name for this CryptoKey in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*`. */ readonly name: pulumi.Output; /** * At next_rotation_time, the Key Management Service will automatically: 1. Create a new version of this CryptoKey. 2. Mark the new version as primary. Key rotations performed manually via CreateCryptoKeyVersion and UpdateCryptoKeyPrimaryVersion do not affect next_rotation_time. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted. */ readonly nextRotationTime: pulumi.Output; /** * A copy of the "primary" CryptoKeyVersion that will be used by Encrypt when this CryptoKey is given in EncryptRequest.name. The CryptoKey's primary version can be updated via UpdateCryptoKeyPrimaryVersion. Keys with purpose ENCRYPT_DECRYPT may have a primary. For other keys, this field will be omitted. */ readonly primary: pulumi.Output; readonly project: pulumi.Output; /** * Immutable. The immutable purpose of this CryptoKey. */ readonly purpose: pulumi.Output; /** * next_rotation_time will be advanced by this period when the service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours. If rotation_period is set, next_rotation_time must also be set. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted. */ readonly rotationPeriod: pulumi.Output; /** * If set to true, the request will create a CryptoKey without any CryptoKeyVersions. You must manually call CreateCryptoKeyVersion or ImportCryptoKeyVersion before you can use this CryptoKey. */ readonly skipInitialVersionCreation: pulumi.Output; /** * A template describing settings for new CryptoKeyVersion instances. The properties of new CryptoKeyVersion instances created by either CreateCryptoKeyVersion or auto-rotation are controlled by this template. */ readonly versionTemplate: pulumi.Output; /** * Create a CryptoKey resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: CryptoKeyArgs, opts?: pulumi.CustomResourceOptions); } /** * The set of arguments for constructing a CryptoKey resource. */ export interface CryptoKeyArgs { /** * Immutable. The resource name of the backend environment where the key material for all CryptoKeyVersions associated with this CryptoKey reside and where all related cryptographic operations are performed. Only applicable if CryptoKeyVersions have a ProtectionLevel of EXTERNAL_VPC, with the resource name in the format `projects/*/locations/*/ekmConnections/*`. Note, this list is non-exhaustive and may apply to additional ProtectionLevels in the future. */ cryptoKeyBackend?: pulumi.Input; /** * Required. It must be unique within a KeyRing and match the regular expression `[a-zA-Z0-9_-]{1,63}` */ cryptoKeyId?: pulumi.Input; /** * Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours. */ destroyScheduledDuration?: pulumi.Input; /** * Immutable. Whether this key may contain imported versions only. */ importOnly?: pulumi.Input; keyRingId: pulumi.Input; /** * Labels with user-defined metadata. For more information, see [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; location?: pulumi.Input; /** * At next_rotation_time, the Key Management Service will automatically: 1. Create a new version of this CryptoKey. 2. Mark the new version as primary. Key rotations performed manually via CreateCryptoKeyVersion and UpdateCryptoKeyPrimaryVersion do not affect next_rotation_time. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted. */ nextRotationTime?: pulumi.Input; project?: pulumi.Input; /** * Immutable. The immutable purpose of this CryptoKey. */ purpose?: pulumi.Input; /** * next_rotation_time will be advanced by this period when the service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours. If rotation_period is set, next_rotation_time must also be set. Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted. */ rotationPeriod?: pulumi.Input; /** * If set to true, the request will create a CryptoKey without any CryptoKeyVersions. You must manually call CreateCryptoKeyVersion or ImportCryptoKeyVersion before you can use this CryptoKey. */ skipInitialVersionCreation?: pulumi.Input; /** * A template describing settings for new CryptoKeyVersion instances. The properties of new CryptoKeyVersion instances created by either CreateCryptoKeyVersion or auto-rotation are controlled by this template. */ versionTemplate?: pulumi.Input; }