Use Cloud KMS keys in Google Cloud

This page explains how to use Cloud KMS customer-managed encryptionkeys in other Google Cloud services to secure your resources. For moreinformation, seeCustomer-managed encryption keys (CMEK).

When a service supports CMEK, it's said to have aCMEK integration. Some services, such as GKE, have multipleCMEK integrations for protecting different types of data related to the service.For a list of services with CMEK integrations, seeEnable CMEK for supportedservices on this page.

Before you begin

Before you can use Cloud KMS keys in other Google Cloud services,you must have a project resource to contain your Cloud KMS keys. Werecommend using a separate project for your Cloud KMS resources thatdoes not contain any other Google Cloud resources.

CMEK integrations

Prepare to enable CMEK integration

For the exact steps to enable CMEK, see the documentation for the relevantGoogle Cloud service. You can find a link to the CMEK documentation foreach service inEnable CMEK for supported services onthis page. For each service, you can expect to follow steps similar to thefollowing:

  1. Create a key ring or select an existing keyring. The key ring should be located as geographically near as possible tothe resources you want to secure.

  2. In the selected key ring,create a key or selectan existing key. Ensure that the protection level, purpose, and algorithmfor the key are appropriate for the resources you want to protect. This keyis the CMEK key.

  3. Get the resource ID for the CMEKkey.You need this resource ID later.

  4. Grant theCryptoKey Encrypter/Decrypter IAMrole(roles/cloudkms.cryptoKeyEncrypterDecrypter) on the CMEK key to theservice account for the service.

    Note: You can grant the Cloud KMS CryptoKey Encrypter/Decrypterrole at the key, key ring, project, folder, or organization level. To followthe principle of least privilege, we recommend granting this role at thelowest level that meets your needs.Caution: As long as your service account has the Cloud KMSCryptoKey Encrypter/Decrypter role, the service can encrypt and decrypt itsdata. If you revoke the role or if you disable or destroy the CMEK key, thedata can no longer be accessed. Leaving your CMEK key inaccessible canaffect your services.

After you have created the key and assigned the required permissions, you cancreate or configure a service to use your CMEK key.

Note: Some services only let you configure CMEK keys at the time the resource iscreated. Other services let you enable and disable CMEK keys on existingresources.

Use Cloud KMS keys with CMEK-integrated services

The following steps use Secret Manager as an example. For the exactsteps to use a Cloud KMS CMEK key in a given service, locate thatservice in thelist of CMEK-integrated services.

In Secret Manager, you can use a CMEK to protect data at rest.

  1. In the Google Cloud console, go to theSecret Manager page.

    Go to Secret Manager

  2. To create a secret, clickCreate Secret.

  3. In theEncryption section, selectUse a customer-managed encryptionkey (CMEK).

  4. In theEncryption key box do the following:

    1. Optional: To use a key in another project, do the following:

      1. ClickSwitch project.
      2. Enter all or part of the project name in the search bar, then selectthe project.
      3. To view available keys for the selected project, clickSelect.
    2. Optional: To filter available keys by location, key ring, name, orprotection level, enter search terms in the filter bar.

    3. Select a key from the list of available keys in the selected project.You can use the displayed location, key ring, and protection leveldetails to be sure you choose the correct key.

    4. If the key you want to use is not shown in the list, then clickEnterkey manually and enter theresource ID of thekey

  5. Finish configuring your secret, and then clickCreate secret.Secret Manager creates the secret and encrypts it using thespecified CMEK key.

Enable CMEK for supported services

To enable CMEK, first locate the desired service in the following table. You canenter search terms in the field to filter the table.All services in this list support software and hardware (HSM) keys.Products that integrate with Cloud KMS when using externalCloud EKM keys are indicated in theEKM supportedcolumn.

Follow the instructions for each service you want to enable CMEK keys for.

ServiceProtected with CMEKEKM supportedTopic
Agent AssistData at restYesCustomer-managed encryption keys (CMEK)
AlloyDB for PostgreSQLData written to databasesYesUsing customer-managed encryption keys
Anti Money Laundering AIData in AML AI instance resourcesNoEncrypt data using customer-managed encryption keys (CMEK)
ApigeeData at restNoIntroduction to CMEK
Apigee API hubData at restYesEncryption
Application IntegrationData at restYesUsing customer-managed encryption keys
Artifact RegistryData in repositoriesYesEnabling customer-managed encryption keys
Backup and DR ServiceBackup Vault ContainerYesManaging Backup Vault encryption
Backup and DR ServiceBackups at restYesManaging backup encryption
Backup for GKEData in Backup for GKEYesAbout Backup for GKE CMEK encryption
BigQueryData in BigQueryYesProtecting data with Cloud KMS keys
BigtableData at restYesCustomer-managed encryption keys (CMEK)
Cloud ComposerEnvironment dataYesUsing customer-managed encryption keys
Cloud Data FusionEnvironment dataYesUsing customer-managed encryption keys
Cloud Healthcare APICloud Healthcare API datasetsYesUse customer-managed encryption keys (CMEK)
Cloud LoggingData in the Log RouterYesManage the keys that protect Log Router data
Cloud LoggingData in Logging storageYesManage the keys that protect Logging storage data
Cloud RunContainer imageYesUsing customer-managed encryption keys with Cloud Run
Cloud Run functionsData in Cloud Run functionsYesUsing customer-managed encryption keys
Cloud SQLData written to databasesYesUsing customer-managed encryption keys
Cloud StorageData in storage bucketsYesUsing customer-managed encryption keys
Cloud TasksTask body and header at restYesUse customer-managed encryption keys
Cloud TPUPersistent disksNoEncrypt a TPU VM boot disk with a customer-managed encryption key (CMEK)
Cloud WorkstationsData on VM disksYesEncrypt workstation resources
Colab EnterpriseRuntimes and notebook filesNoUse customer-managed encryption keys
Compute EnginePersistent disksYesProtecting resources with Cloud KMS keys
Compute EngineSnapshotsYesProtecting resources with Cloud KMS keys
Compute EngineCustom imagesYesProtecting resources with Cloud KMS keys
Compute EngineMachine imagesYesProtecting resources with Cloud KMS keys
Customer Experience InsightsData at restYesCustomer-managed encryption keys (CMEK)
Database Migration Service Homogeneous MigrationsMySQL migrations - data written to databasesYesUsing customer-managed encryption keys (CMEK)
Database Migration Service Homogeneous MigrationsPostgreSQL migrations - Data written to databasesYesUsing customer-managed encryption keys (CMEK)
Database Migration Service Homogeneous MigrationsPostgreSQL to AlloyDB migrations - Data written to databasesYesAbout CMEK
Database Migration Service Homogeneous MigrationsSQL Server migrations - Data written to databasesYesAbout CMEK
Database Migration Service Heterogeneous MigrationsOracle to PostgreSQL data at restYesUse customer-managed encryption keys (CMEK) for continuous migrations
DataflowPipeline state dataYesUsing customer-managed encryption keys
DataformData in repositoriesYesUse customer-managed encryption keys
Dataplex Universal CatalogData at restYesCustomer-managed encryption keys
DataprocDataproc clusters data on VM disksYesCustomer-managed encryption keys
DataprocDataproc serverless data on VM disksYesCustomer-managed encryption keys
Dataproc MetastoreData at restYesUsing customer-managed encryption keys
DatastreamData in transitYesUsing customer-managed encryption keys (CMEK)
Dialogflow CXData at restYesCustomer-managed encryption keys (CMEK)
Document AIData at rest and data in useYesCustomer-managed encryption keys (CMEK)
Eventarc Advanced (Preview)Data at restYesUse customer-managed encryption keys (CMEK)
Eventarc StandardData at restYesUse customer-managed encryption keys (CMEK)
FilestoreData at restYesEncrypt data with customer-managed encryption keys
FirestoreData at restYesUse customer-managed encryption keys (CMEK)
Gemini Code AssistData at restNoEncrypt data with customer-managed encryption keys
Gemini Enterprise - NotebookLM EnterpriseData at restNoCustomer-managed encryption keys
Gemini Enterprise EnterpriseData at restNoCustomer-managed encryption keys
Google Cloud Managed LustreData at restYesUse customer-managed encryption keys (CMEK)
Google Cloud Managed Service for Apache KafkaData associated with topicsYesConfigure message encryption
Google Cloud NetApp VolumesData at restYesCreate a CMEK policy
Google Distributed CloudData on Edge nodesYesLocal storage security
Google Kubernetes EngineData on VM disksYesUsing customer-managed encryption keys (CMEK)
Google Kubernetes EngineApplication-layer secretsYesApplication-layer Secrets encryption
Integration ConnectorsData at restYesEncryption methods
Looker (Google Cloud core)Data at restYesEnable CMEK for Looker (Google Cloud core)
Memorystore for RedisData at restYesCustomer-managed encryption keys (CMEK)
Memorystore for Redis ClusterData at restYesUse customer-managed encryption keys (CMEK)
Memorystore for ValkeyData at restYesUse customer-managed encryption keys (CMEK)
Migrate to Virtual MachinesData migrated from VMware, AWS, and Azure VM sourcesYesUse CMEK to encrypt data stored during a migration
Migrate to Virtual MachinesData migrated from disk and machine image sourcesYesUse CMEK to encrypt data on target disks and machine images
Parameter ManagerParameter version payloadsYesEnable customer-managed encryption keys for Parameter Manager
Pub/SubData associated with topicsYesConfiguring message encryption
Secret ManagerSecret payloadsYesEnable Customer-Managed Encryption Keys for Secret Manager
Secure Source ManagerInstancesYesEncrypt data with customer-managed encryption keys
Security Command CenterData at restYesEnable CMEK for Security Command Center
SpannerData at restYesCustomer-managed encryption keys (CMEK)
Speaker ID (Restricted GA)Data at restYesUsing customer-managed encryption keys
Speech-to-TextData at restYesUsing customer-managed encryption keys
Vertex AIData associated with resourcesYesUsing customer-managed encryption keys
Vertex AI SearchData at restNoCustomer-managed encryption keys
Vertex AI Workbench managed notebooks (Deprecated)User data at restNoCustomer-managed encryption keys
Vertex AI Workbench user-managed notebooks (Deprecated)Data on VM disksNoCustomer-managed encryption keys
Vertex AI Workbench instancesData on VM disksYesCustomer-managed encryption keys
WorkflowsData at restYesUse customer-managed encryption keys (CMEK)
Workload ManagerCustom rule type evaluation dataYesEnable customer-managed encryption keys for evaluations

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.