This Terraform module deploys Nomad Servers and Nodes in AWS.
Check valid versions on:
-
Github Releases: https://github.com/cn-terraform/terraform-aws-nomad/releases
-
Terraform Module Registry: https://registry.terraform.io/modules/cn-terraform/nomad
module "nomad" { source = "cn-terraform/nomad/aws" version = "2.0.2" names_prefix = ${terraform.workspace} profile = var.profile region = var.region vpc_id = var.vpc_id subnets_ids = var.subnets_ids route53_zone_id = var.private_hosted_zone_id domain_name = var.domain_name ssh_key_name = var.ssh_key_name cidrs_to_open_ports_on_security_groups = [ "XXX.XXX.XXX.XXX/XX" ] consul_version = "0.9.2" nomad_version = "0.6.0" consul_address = "consul.${var.domain_name}" server_ami_id = var.aws_linux_ami_id server_instance_type = "t2.medium" server_asg_min_size = 3 server_asg_desired_capacity = 3 server_asg_max_size = 3 client_ami_id = var.aws_linux_ami_id client_instance_type = "m4.xlarge" client_asg_min_size = 1 client_asg_desired_capacity = 3 client_asg_max_size = 25 }
Pleas run this command right after cloning the repository.
pre-commit install
For that you may need to install the folowwing tools:
In order to run all checks at any point run the following command:
pre-commit run --all-files
Name | Version |
---|---|
terraform | >= 0.13 |
aws | >= 4 |
Name | Version |
---|---|
aws | 4.0.0 |
template | 2.2.0 |
No modules.
Name | Description | Type | Default | Required |
---|---|---|---|---|
cidrs_to_open_ports_on_security_groups | List of CIDRs to open ports on instances security group | list(any) |
n/a | yes |
client_ami_id | AMI ID to use on Clients | string |
n/a | yes |
client_asg_desired_capacity | Desired Number of Instances of Nomad Client to Create | any |
n/a | yes |
client_asg_max_size | Max Number of Instances of Nomad Client to Create | any |
n/a | yes |
client_asg_min_size | Min Number of Instances of Nomad Client to Create | any |
n/a | yes |
client_instance_type | AWS Instance type to use on clients | string |
n/a | yes |
consul_address | Consul Address | any |
n/a | yes |
consul_version | Consul Version | string |
"0.9.2" |
no |
domain_name | Domain Name | any |
n/a | yes |
names_prefix | prefix for Resources Names | any |
n/a | yes |
nomad_version | Nomad Version | string |
"0.6.0" |
no |
ports_to_open_on_elb_security_group | Ports to Open on ELB Security Group | list(any) |
[ |
no |
profile | AWS API key credentials to use | any |
n/a | yes |
region | AWS Region the infrastructure is hosted in | any |
n/a | yes |
route53_zone_id | Route53 Zone ID to fetch | any |
n/a | yes |
server_ami_id | AMI ID to use on servers | string |
n/a | yes |
server_asg_desired_capacity | Desired Number of Instances of PAAS Server to Create | any |
n/a | yes |
server_asg_max_size | Max Number of Instances of PAAS Server to Create | any |
n/a | yes |
server_asg_min_size | Min Number of Instances of PAAS Server to Create | any |
n/a | yes |
server_instance_type | AWS Instance type to use on servers | string |
n/a | yes |
ssh_key_name | SSH Key Name | any |
n/a | yes |
subnets_ids | Private Subnets | list(any) |
n/a | yes |
tcp_ports_to_open_on_instances_security_group | TCP Ports to Open on Instances Security Group | list(any) |
[ |
no |
udp_ports_to_open_on_instances_security_group | UDP Ports to Open on Instances Security Group | list(any) |
[ |
no |
vpc_id | VPC ID | any |
n/a | yes |
No outputs.