+
+
+ To create a key ring and a key, take the following steps:
+
+ 1. In the [Google Cloud console](https://console.cloud.google.com/), navigate to **Security** > **Key Management**.
+ 2. Click **Create key ring**, enter a name for the key ring, select the region selected in step 3, and then click **Create**.
+ 3. In the created key ring, click **Create key**.
+ 4. For **Key name**, enter the full key name copied from the TiDB Cloud console.
+ 5. For **Protection level**, select **Software** or **HSM** (both are supported).
+ 6. For **Key material**, keep **Generated key**.
+ 7. For **Purpose**, select **Symmetric encrypt/decrypt**.
+ 8. Click **Create**.
+
+
+
+
+ Run the following commands. Replace `
`, ``, ``, and `` with your own values. The `--project` flag makes sure that the key is created in the same Google Cloud project that you reference in step 7, and `--purpose=encryption` creates a symmetric key for encrypt and decrypt operations.
+
+ ```shell
+ gcloud kms keyrings create --location= --project=
+
+ gcloud kms keys create \
+ --keyring= \
+ --location= \
+ --project= \
+ --purpose=encryption \
+ --protection-level=software
+ ```
+
+
+
+
+6. Grant both TiDB Cloud service agents the **Cloud KMS CryptoKey Encrypter/Decrypter** (`roles/cloudkms.cryptoKeyEncrypterDecrypter`) role on the key. Both grants are required: the cluster disks and the backup data are handled by two different Google service agents.
+
+ The two identities are displayed on the **Add CMEK** page of the TiDB Cloud console:
+
+ - **Compute Engine Service Agent (Cluster Disks)**: `service-