Skip to content

Commit 4be9c23

Browse files
authored
Merge pull request #39 from hexa2k9/feature-terminate-instance-after-5-days
Terminate Compute Engine Instance after 5 days
2 parents e913d02 + 9934288 commit 4be9c23

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

gcp/compute-vm.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ module "github-runners-vm-templates" {
3333
}
3434
}
3535

36+
options = {
37+
termination_action = "DELETE"
38+
# https://docs.github.com/en/actions/reference/limits#existing-system-limits
39+
max_run_duration = {
40+
seconds = (86400 * 5) + 300 # Terminate Instance after 5 days, 5 minutes
41+
}
42+
}
43+
3644
service_account = {
3745
auto_create = false
3846
email = module.service-account-compute-vm-github-runners.email

0 commit comments

Comments
 (0)