diff --git a/gcp/compute-vm.tf b/gcp/compute-vm.tf index fa9b896..6c9d621 100644 --- a/gcp/compute-vm.tf +++ b/gcp/compute-vm.tf @@ -33,6 +33,14 @@ module "github-runners-vm-templates" { } } + scheduling { + instance_termination_action = "DELETE" + max_run_duration { + # https://docs.github.com/en/actions/reference/limits#existing-system-limits + seconds = (86400 * 5) + 300 # Terminate Instance after 5 days, 5 minutes + } + } + service_account = { auto_create = false email = module.service-account-compute-vm-github-runners.email