Change worker managed instance group to span zones in region

* Change Google Cloud module to require the `region` variable
* Workers are created in random zones within the given region
* Tolerate Google Cloud zone failures or capacity issues
* If workers are preempted (if enabled), replacement instances can
be drawn from any zone in the region, which should avoid scheduling
issues that were possible before if a single zone aggressively
preempts instances (presumably due to Google Cloud capacity)
This commit is contained in:
Dalton Hubble
2017-11-04 10:57:12 -07:00
parent e32885c9cd
commit 6300383b43
8 changed files with 26 additions and 11 deletions

View File

@ -20,9 +20,9 @@ variable "count" {
description = "Number of worker compute instances the instance group should manage"
}
variable "zone" {
variable "region" {
type = "string"
description = "Google zone that compute instances in the group should be created in (e.g. gcloud compute zones list)"
description = "Google Cloud region to create a regional managed group of workers (e.g. us-central1, see `gcloud compute regions list`)."
}
variable "machine_type" {