diff --git a/main.tf b/main.tf index db4faf7..9fcc7de 100644 --- a/main.tf +++ b/main.tf @@ -127,7 +127,7 @@ module "clients" { source = "./modules/nomad-cluster" cluster_name = "${var.cluster_name}-client" - instance_type = "t2.micro" + instance_type = "${var.instance_type}" # To keep the example simple, we are using a fixed-size cluster. In real-world usage, you could use auto scaling # policies to dynamically resize the cluster in response to load. @@ -187,4 +187,4 @@ data "aws_vpc" "default" { data "aws_subnet_ids" "default" { vpc_id = "${data.aws_vpc.default.id}" -} \ No newline at end of file +} diff --git a/variables.tf b/variables.tf index aab8920..32383b4 100644 --- a/variables.tf +++ b/variables.tf @@ -33,6 +33,11 @@ variable "cluster_name" { default = "nomad-example" } +variable "instance_type" { + description = "What kind of instance type to use for the nomad clients" + default = "t2.micro" +} + variable "num_servers" { description = "The number of server nodes to deploy. We strongly recommend using 3 or 5." default = 3