An organization requires that sensitive financial audit logs stored in a Cloud Storage bucket in the europe-west1 region be encrypted using Customer-Managed Encryption Keys (CMEK) managed via Cloud KMS. A cloud engineer creates a Cloud KMS Key Ring named audit-keyring in the us-central1 region and a CryptoKey named audit-key inside it. When attempting to set audit-key as the default encryption key for the europe-west1 Cloud Storage bucket, the command fails. How should the engineer resolve this issue?
- Create a new Key Ring in the europe-west1 region and a new CryptoKey inside it, then configure the Cloud Storage bucket to use the new key.Answer
- BDelete the existing audit-keyring in us-central1 and recreate it with the same name in the europe-west1 region.
- CGrant the primitive Owner role to the Cloud Storage service agent to allow cross-region key access between us-central1 and europe-west1.
- DUse the gcloud kms keyrings move command to relocate audit-keyring from us-central1 to europe-west1.
Answer
Create a new Key Ring in the europe-west1 region and a new CryptoKey inside it, then configure the Cloud Storage bucket to use the new key.
Customer-Managed Encryption Keys (CMEK) require that the Cloud KMS Key Ring be created in the exact same location (region or multi-region) as the resource being encrypted (in this case, europe-west1). Because Cloud KMS Key Rings are immutable and cannot be moved or deleted, the engineer must create a new Key Ring in europe-west1.
Step-by-Step Solution
Key Concept
Cloud KMS Key Ring Location Matching and Immutability