Skip to content

Latest commit

 

History

History
81 lines (70 loc) · 8.41 KB

File metadata and controls

81 lines (70 loc) · 8.41 KB

Requirements

Name Version
terraform >= 1.0
aws >= 4.59

Providers

Name Version
aws >= 4.59
cloudinit n/a

Modules

Name Source Version
alb terraform-aws-modules/alb/aws ~> 6.0

Resources

Name Type
aws_autoscaling_group.nomad_server resource
aws_iam_instance_profile.nomad_server resource
aws_iam_role.nomad_server resource
aws_iam_role_policy_attachment.default_iam_policies resource
aws_launch_template.nomad_server resource
aws_security_group.alb resource
aws_security_group.nomad_agent resource
aws_ec2_instance_type.type data source
aws_iam_policy_document.instance-assume-role-policy data source
cloudinit_config.config data source

Inputs

Name Description Type Default Required
alb_certificate_arn ARN of the HTTPS certificate to use with the ALB string "" no
ami AMI ID to use for deploying Nomad servers string n/a yes
autoscale_metrics List of autoscaling metrics to enable for the Autoscaling Group list(string)
[
"GroupMinSize",
"GroupMaxSize",
"GroupDesiredCapacity",
"GroupInServiceInstances",
"GroupPendingInstances",
"GroupStandbyInstances",
"GroupTerminatingInstances",
"GroupTotalInstances"
]
no
aws_region AWS region to deploy the Nomad cluster in string "ap-south-1" no
cluster_name Identifier for the cluster, used as a prefix for all resources string n/a yes
cluster_tags Map of tag key-value pairs to assign to the EC2 instances spawned by the ASG map(string) n/a yes
create_alb Whether to create an ALB for the Nomad servers or not bool false no
default_iam_policies List of IAM policy ARNs to attach to the Nomad server instances list(string) [] no
default_security_groups List of security group IDs to assign to the Nomad server instances list(string) [] no
ebs_encryption Enable EBS encryption bool true no
ebs_tags A map of additional tags to apply to the EBS volumes map(string) {} no
extra_script Path to custom script to be run as part of cloud-init string "" no
http_put_response_hop_limit The hop limit for HTTP PUT response for the EC2 instance metadata service number 2 no
http_tokens Whether the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Can be 'optional', 'required', or 'no-preference'. string "optional" no
iam_tags A map of custom tags to be assigned to the IAM role map(string) {} no
instance_count Number of Nomad server instances to run number 3 no
instance_type Instance type to use for the Nomad server instances string "c5a.large" no
nomad_acl_bootstrap_token Nomad ACL bootstrap token to use for bootstrapping ACLs string "" no
nomad_acl_enable Whether to enable ACLs on the Nomad cluster or not bool true no
nomad_alb_hostname ALB hostname to use for accessing the Nomad web UI string "nomad.example.internal" no
nomad_bootstrap_expect Number of instances expected to bootstrap a new Nomad cluster number 3 no
nomad_file_limit Value for LimitNOFILE in nomad systemd config number 900000 no
nomad_gossip_encrypt_key Gossip encryption key to use for Nomad servers string n/a yes
nomad_join_tag_value Value of the tag used for Nomad server auto-join string n/a yes
nomad_server_incoming_ips List of IPs to allow incoming connections from to Nomad server ALBs list(string) [] no
nomad_server_incoming_security_groups List of Security Groups to allow incoming connections from to Nomad server ALBs list(string) [] no
subnets List of subnets to assign for deploying instances list(string) [] no
vpc ID of the AWS VPC to deploy all the resources in string n/a yes

Outputs

Name Description
alb_dns_name The DNS name of the ALB
alb_security_group_id The ID of the ALB security group
nomad_agent_security_group_id The ID of the Nomad agent security group
nomad_server_asg_arn The ARN of the Nomad server Auto Scaling Group
nomad_server_asg_name The name of the Nomad server Auto Scaling Group
nomad_server_iam_role_arn The ARN of the Nomad server IAM role
nomad_server_launch_template_id The ID of the Nomad server launch template