Allow Google accelerators (i.e. GPUs) on workers

This commit is contained in:
Dalton Hubble
2018-03-02 17:26:51 -08:00
parent 6c5e287c29
commit 2592a0aad4
4 changed files with 22 additions and 2 deletions

View File

@ -63,9 +63,13 @@ resource "google_compute_instance_template" "worker" {
}
can_ip_forward = true
tags = ["worker", "${var.cluster_name}-worker", "${var.name}-worker"]
guest_accelerator {
count = "${var.accelerator_count}"
type = "${var.accelerator_type}"
}
lifecycle {
# To update an Instance Template, Terraform should replace the existing resource
create_before_destroy = true