Google - Linux - Docker autoscaler: Allow creating spot VMs

In google cloud there is a concept of spot VMs.

These VMs may be killed by google at any time, but the come at a greatly reduced price. This makes them ideal for CI jobs, as they can generally be retried. It would be nice if this could be enabled through a variable, so that users can choose to take advantage of the spot VMs.

In my general (lack of) understanding, this could be done by adding the following content inside of the resource "google_compute_instance_template" "ephemeral-runner".

scheduling {
    preemptible                 = true
    automatic_restart           = false
    provisioning_model          = "SPOT"
    instance_termination_action = "STOP"
  }
Assignee Loading
Time tracking Loading