This module deploys an entire Nomad/Consul cluster, with minimal configuration.
The module can deploy both masters and slaves, in one call, or can be used to deploy them separately.
The module also includes support for AWS Elastic Container Registry (ECR), and will automatically get credentials for the slave nodes.
module "nomad" {
source = "[email protected]:patch-notes/terraform-nomad.git"
num_masters = 1
num_slaves = 1
availability_zones = ["eu-central-1a", "eu-central-1b"]
master_instance_type = "t2.micro"
cidr_vpc = "10.0.0.0/16"
cidr_masters = "10.0.0.0/24"
cidrs_slaves = ["10.0.1.0/24", "10.0.2.0/24"]
key_name = "main"
slave_target_group_arns = ["${aws_lb_target_group.gateway.arn}"]
slave_instance_type = "t2.micro"
}
The range for the masters' and slaves' VPC. default = "192.168.0.0/16"
This will be the name of the VPC, the subnets will be called ${vpc_name}-masters
and ${vpc_name-slaves}
.
default = "nomad"
The IP range for the masters' subnet. default = "192.168.0.0/24"
The ranges for the slaves' subnets. default = ["192.168.1.0/24", "192.168.2.0/24"]
The number of master nodes default = 3
The number of slave nodes default = 1
The availability zones where masters and slaves will be deployed.
The name of the SSH key to deploy to masters and slaves.
The instance type for the masters default = "m4.large
The instance type for the slaves default = "m4.large
The instance name for slaves default = "nomad-slave"
The instance name for slaves default = "nomad-master"
The ARNs of the Target Group to which the slaves are attached, to use with an Application Load Balancer (ALB). default = []
The ids of extra security groups to add the slaves to. default = []