Remediation
From Google Cloud Console
- Go to https://console.cloud.google.com/sql/instances.
- Click on an instance name to see its configuration overview.
- In the left-side panel, select
Connections. - In the
securitysection, select SSL mode asAllow only SSL connections. - Under
Configure SSL server certificatesclickCreate new certificateand save the setting
From Google Cloud CLI
To enforce SSL encryption for an instance run the command:
```sh
gcloud sql instances patch INSTANCE_NAME --ssl-mode= ENCRYPTED_ONLY
```
Note: RESTART is required for type MySQL Generation 1 Instances (backendType: FIRST_GEN) to get this configuration in effect.