Skip to content

Commit e830037

Browse files
committed
Terminate Compute Engine Instance after 5 days
1 parent a71cae8 commit e830037

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+
scheduling {
37+
instance_termination_action = "DELETE"
38+
max_run_duration {
39+
# https://docs.github.com/en/actions/reference/limits#existing-system-limits
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)