Using Console
Using CLI
[INSTANCE_NAME]
with the name of your SQL Read Replica instance, [KEY_NAME]
with the name of the CMK that you want to use for encryption, and [KEY_PATH]
with the path to the CMK.For example:[INSTANCE_NAME]
with the name of your SQL Read Replica instance.The output of the above command should be True
, indicating that encryption has been enabled for the SQL Read Replica instance using CMKs.By following the above steps, you can remediate the misconfiguration of SQL Read Replica Instances not being encrypted using Customer Managed Keys (CMKs) in GCP.Using Python
google-cloud-sql
Python library. First, install the library using pip:'project-id'
with your GCP project ID, 'my-instance'
with the name of your read replica instance, and 'projects/project-id/locations/global/keyRings/my-key-ring/cryptoKeys/my-key-id'
with the path to your CMK.