{"id":24044966,"url":"https://github.com/oun/gcp-instances-scheduler","last_synced_at":"2025-08-21T12:18:41.657Z","repository":{"id":203235710,"uuid":"708847006","full_name":"oun/gcp-instances-scheduler","owner":"oun","description":"Schedule start and stop instances in Google Cloud","archived":false,"fork":false,"pushed_at":"2024-11-05T11:44:32.000Z","size":266,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-25T00:19:22.718Z","etag":null,"topics":["cost-optimization","google-cloud-platform","pulumi","terraform"],"latest_commit_sha":null,"homepage":"https://medium.com/@whatthedev/lower-gcp-cost-schedule-gke-cluster-to-start-and-stop-6db39a5e6ea7","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-10-23T14:04:11.000Z","updated_at":"2024-11-05T11:40:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"49ce40b6-4344-4fa6-80d6-f7be5d69ef37","html_url":"https://github.com/oun/gcp-instances-scheduler","commit_stats":null,"previous_names":["oun/gcp-instances-scheduler"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/oun/gcp-instances-scheduler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oun%2Fgcp-instances-scheduler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oun%2Fgcp-instances-scheduler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oun%2Fgcp-instances-scheduler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oun%2Fgcp-instances-scheduler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oun","download_url":"https://codeload.github.com/oun/gcp-instances-scheduler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oun%2Fgcp-instances-scheduler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271478131,"owners_count":24766450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cost-optimization","google-cloud-platform","pulumi","terraform"],"created_at":"2025-01-08T23:51:40.893Z","updated_at":"2025-08-21T12:18:41.577Z","avatar_url":"https://github.com/oun.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Functions to Start and Stop Google Cloud Resources\n\nCloud Schedulers and Cloud Functions to automatically start and stop Compute Engine instance, SQL instance and Google Kubernetes Engine node pool on a regular schedule. This can be used in non-production environment that you need to stop on a nightly basis and restart them in the morning to save costs.\n\n## Architecture\n\n![docs/architecture.jpeg](docs/architecture.jpeg)\n\nThis includes the following Google Components:\n\n- `Cloud scheduler` to make calls on a set schedule to start and stop the instance.\n- `Pubsub topics` to send message for each start and stop event.\n- `Cloud functions` to start and stop the instances we want to schedule.\n- `Cloud SQL`, `GKE cluster`, `Compute Engine instance` we want to run on a schedule.\n\n## Usage\n\nThere is a Terraform module that you can use to provision Cloud scheduler, Pubsub topics and cloud functions. Example can be seen in [`terraform/examples`](./terraform/examples/) directory.\n\n```\nmodule \"start_stop_scheduler\" {\n  source             = \"github.com/oun/gcp-instances-scheduler.git//terraform\"\n  project_id         = \"scheduler-project-id\"\n  region             = \"asia-southeast1\"\n  time_zone          = \"Asia/Bangkok\"\n\n  schedules = [\n    {\n      start_job_name = \"start-instances\"\n      stop_job_name  = \"stop-instances\"\n      start_schedule = \"0 8 * * 1-5\"\n      stop_schedule  = \"0 20 * * 1-5\"\n      project        = \"resource-project-id\"\n    }\n  ]\n  \n  gce_function_config = {\n    enabled = true\n  }\n  sql_function_config = {\n    enabled = true\n  }\n  gke_function_config = {\n    enabled = true\n  }\n}\n```\n\n## Versioning\n\nWe use SemVer for versioning. For the versions available, see the [tags](https://github.com/oun/gcp-instances-scheduler/tags) on this repository.\n\n## Authors\n\n- Worawat - Initial work\n\n## License\n\nThis project is licensed under the Apache-2.0 License - see the [LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foun%2Fgcp-instances-scheduler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foun%2Fgcp-instances-scheduler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foun%2Fgcp-instances-scheduler/lists"}