Using Console
Using CLI
gcloud sql instances list
gcloud sql instances patch INSTANCE_NAME --assign-ip
Replace INSTANCE_NAME with the name of the instance that you noted down in step 3.gcloud sql instances describe INSTANCE_NAME
Replace INSTANCE_NAME with the name of the instance that you noted down in step 3.Using Python
INSTANCE_NAME
, PROJECT_ID
, and PATH_TO_SERVICE_ACCOUNT_KEY_FILE
with the appropriate values for your environment.This code will update the Cloud SQL instance settings to disable public IP access and require SSL encryption for all connections.