Identify any idle Compute Engine Cloud SQL database instances found by Google Cloud Recommender and stop the idle compute resources in order to help lower the cost of your Google Cloud bill. Recommender is a Google Cloud service that provides usage recommendations and insights for GCP resources. The Recommender service generates recommendations about idle Cloud SQL database instances based on certain usage metrics.
optimisation
Google Cloud Recommender service provides recommendations to help you identify Cloud SQL database instances that have not been used (i.e. idle). These recommendations are generated automatically based on system metrics collected by the Cloud Monitoring service over the previous 30 days. You can use Recommender to find and stop idle Cloud SQL database instances in order to reduce waste of resources and avoid accumulating unnecessary compute charges.
Audit
To determine if there are any idle Cloud SQL database instances available within your GCP projects, perform the following actions:
Note: Getting recommendations about idle Cloud SQL database instances using Google Cloud Management Console is not currently supported.Remediation / Resolution
To apply the optimization recommendations provided by Google Cloud Recommender service for idle Cloud SQL database instances, perform the following actions:
Step 1 Check the SQL database instances state to determine if the resource is still running:Remediation / Resolution
Replace the resource's status with a new value: NEVER. You can do this by stopping the idle SQL database instance:
Step 2 Check the SQL database instances state to determine if the resource is still running:References
- Google Cloud Platform (GCP) Documentation
- What is Active Assist
- Identify idle Cloud SQL instances
- Start, stop, and restart instances
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- gcloud beta recommender recommendations list
- gcloud sql instances describe
- gcloud sql instances patch