Cloud KMS
Cloud Key Management Service allows you to create, import, and manage cryptographic keys and perform cryptographic operations in a single centralized cloud service. You can use these keys and perform these operations by using Cloud KMS directly, by using Cloud HSM or Cloud External Key Manager, or by using Customer-Managed Encryption Keys (CMEK) integrations within other Google Cloud services.
This module create a key ring with a list of crypto keys with these possibilities :
Create a KeyRing.
Configure the IAM policy for the newly created key ring.
Create a map of crypto keys.
Configure the IAM policy for the newly created crypto keys.
Note: KeyRings cannot be deleted from Google Cloud Platform. Destroying a Terraform-managed KeyRing will remove it from state but will not delete the resource from the project. See Documentation.
Note: CryptoKeys cannot be deleted from Google Cloud Platform. Destroying a Terraform-managed CryptoKey will remove it from state and delete all CryptoKeyVersions, rendering the key unusable, but will not delete the resource from the project. When Terraform destroys these keys, any data previously encrypted with these keys will be irrecoverable. For this reason, it is strongly recommended that you add lifecycle hooks to the resource to prevent accidental destruction.
Requirements
Name |
Version |
|---|---|
>= 1.0 |
|
>= 4.75.0 |
Providers
Name |
Version |
|---|---|
>= 4.75.0 |
Modules
No modules.
Resources
Name |
Type |
|---|---|
resource |
|
resource |
|
resource |
|
resource |
|
data source |
Inputs
Name |
Description |
Type |
Default |
Required |
|---|---|---|---|---|
Map of crypto keys representing a logical key that can be used for cryptographic operations. The valid parameters are defined in Crypto key in Terraform. In addition, a map of roles, of type “map(set(string))”, can be defined for each crypto key, ex: “roles = {“roles/cloudkms.cryptoKeyEncrypter” = [“user:jane@example.com”, “user:david@example.com”]}”. |
|
|
no |
|
The resource name for the KeyRing. |
|
n/a |
yes |
|
Roles to bind to the kKeyRing. |
|
|
no |
|
Labels with user-defined metadata to apply to crypto keys. |
|
|
no |
|
The location for the KeyRing. A full list of valid locations can be found by running “gcloud kms locations list”. |
|
|
no |
Outputs
Name |
Description |
|---|---|
The Map of the created crypto keys. |
|
The IAM roles for the crypto keys. |
|
The ID of the KeyRing. |
|
The location for the KeyRing. |
|
The resource name for the KeyRing. |
|
The IAM roles for the KeyRing. |