From e830037c31000f020f5f9342abd1c0e96604aad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20B=C3=B6nning?= Date: Tue, 17 Feb 2026 09:54:47 +0100 Subject: [PATCH] Terminate Compute Engine Instance after 5 days --- gcp/compute-vm.tf | 8 ++++++++ 1 file changed, 8 insertions(+) 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