🦑
Cloud SQL を自動起動・停止するためのパイプライン
Cloud SQL Scheduler
You can use this script to schedule a Cloud SQL instance to start and stop at a specific time.
Usage
1. Set the envs
- PROJECT_ID: The project ID of the Cloud SQL instance
- CLOUD_SQL_INSTANCES: The name of the Cloud SQL instances
- e.g. 'my-instance'
- e.g. 'my-instance1,my-instance2'
2. Run the script
- `bash script.sh deploy`: Deploy the pipeline for Start and Stop Cloud SQL instance
- `bash script.sh delete`: Delete the pipeline for Start and Stop Cloud SQL instance
- `bash script.sh deploy:start`: Deploy the pipeline for Start the Cloud SQL instance
- `bash script.sh deploy:stop`: Deploy the pipeline for Stop the Cloud SQL instance
※ If you want to change the schedule and region, timezone, please edit the script.sh.
Ref
Discussion