Add optional controller_type and worker_type vars on GCP

* Remove optional machine_type variable on Google Cloud
* Use controller_type and worker_type instead
This commit is contained in:
Dalton Hubble
2018-03-25 22:11:18 -07:00
parent 8d3d4220fd
commit fdb543e834
5 changed files with 19 additions and 9 deletions

View File

@ -8,7 +8,7 @@ module "controllers" {
dns_zone = "${var.dns_zone}"
dns_zone_name = "${var.dns_zone_name}"
count = "${var.controller_count}"
machine_type = "${var.machine_type}"
machine_type = "${var.controller_type}"
os_image = "${var.os_image}"
disk_size = "${var.disk_size}"
@ -30,7 +30,7 @@ module "workers" {
region = "${var.region}"
network = "${google_compute_network.network.name}"
count = "${var.worker_count}"
machine_type = "${var.machine_type}"
machine_type = "${var.worker_type}"
os_image = "${var.os_image}"
disk_size = "${var.disk_size}"
preemptible = "${var.worker_preemptible}"

View File

@ -34,10 +34,16 @@ variable "worker_count" {
description = "Number of workers"
}
variable "machine_type" {
type = "string"
default = "n1-standard-1"
description = "Machine type for compute instances (see `gcloud compute machine-types list`)"
variable controller_type {
type = "string"
default = "n1-standard-1"
description = "Machine type for controllers (see `gcloud compute machine-types list`)"
}
variable worker_type {
type = "string"
default = "n1-standard-1"
description = "Machine type for controllers (see `gcloud compute machine-types list`)"
}
variable "os_image" {