{"id":15995714,"url":"https://github.com/mattes/gce-graceful-shutdown","last_synced_at":"2025-07-07T00:06:44.494Z","repository":{"id":64303416,"uuid":"300748824","full_name":"mattes/gce-graceful-shutdown","owner":"mattes","description":"Gracefully shutdown long-running Google Compute Instances managed by Instance Group Managers.","archived":false,"fork":false,"pushed_at":"2020-10-30T05:54:07.000Z","size":2698,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T00:41:25.742Z","etag":null,"topics":["google","google-cloud","google-cloud-compute","google-instance-group","graceful-shutdown"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattes.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}},"created_at":"2020-10-02T22:23:00.000Z","updated_at":"2023-03-04T06:06:15.000Z","dependencies_parsed_at":"2023-01-15T10:00:33.748Z","dependency_job_id":null,"html_url":"https://github.com/mattes/gce-graceful-shutdown","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mattes/gce-graceful-shutdown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattes%2Fgce-graceful-shutdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattes%2Fgce-graceful-shutdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattes%2Fgce-graceful-shutdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattes%2Fgce-graceful-shutdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattes","download_url":"https://codeload.github.com/mattes/gce-graceful-shutdown/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattes%2Fgce-graceful-shutdown/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263991445,"owners_count":23540665,"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","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":["google","google-cloud","google-cloud-compute","google-instance-group","graceful-shutdown"],"created_at":"2024-10-08T07:20:31.317Z","updated_at":"2025-07-07T00:06:44.471Z","avatar_url":"https://github.com/mattes.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google Compute Engine Graceful Shutdown \n\nThis tool monitors an Instance Group for changes. The moment the given Instance Template\nis no longer part of the monitored Instance Group, `on-shutdown` is run. Afterwards\nthe Instance is deleted via an API call.\n\nIt does not currently trigger if:\n\n* Instance is deleted\n* Instance is restarted\n* Instance is re-created during autohealing\n\n\n## Motivation\n\nGoogle Shutdown Scripts are unreliable and only run for 60-90s max.\n\n\n## Usage\n\n```\n./gce-graceful-shutdown -on-shutdown 'docker stop --time 30 my-container' -timeout 30s \n```\n\n| Variable                         | Description                                                                                                                                                                                                                                          |\n|----------------------------------|---------------------------------------------------------------------------------------|\n| `-creds`                         | Path to Google Service Account Credentials. Defaults to Application Credentials.      |\n| `-on-shutdown`                   | ***Required*** Command to run when instance is about to be deleted.                   |\n| `-timeout`                       | Time to wait for -`on-shutdown` to finish. Default `10m`.                             |\n| `-project`                       | Manually set Google Project.                                                          |\n| `-region`                        | Manually set Region.                                                                  |\n| `-zone`                          | Manually set Zone.                                                                    |\n| `-instance-group`                | Manually set Instance Group.                                                          |\n| `-instance-template`             | Manually set Instance Template.                                                       |\n| `-instance`                      | Manually set Instance.                                                                |\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattes%2Fgce-graceful-shutdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattes%2Fgce-graceful-shutdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattes%2Fgce-graceful-shutdown/lists"}