Skip to content

Latest commit

 

History

History
83 lines (72 loc) · 9.17 KB

File metadata and controls

83 lines (72 loc) · 9.17 KB

Requirements

Name Version
terraform >= 1.0
aws >= 4.59

Providers

Name Version
aws >= 4.59
cloudinit n/a

Modules

No modules.

Resources

Name Type
aws_autoscaling_group.nomad_client resource
aws_iam_instance_profile.nomad_client resource
aws_iam_role.nomad_client resource
aws_iam_role_policy_attachment.default_iam_policies resource
aws_instance.nomad_client resource
aws_launch_template.nomad_client 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
ami Amazon Machine Image (AMI) ID used for deploying Nomad clients string n/a yes
autoscale_metrics List of autoscaling metrics to monitor for Auto Scaling Group (ASG) instances list(string)
[
"GroupMinSize",
"GroupMaxSize",
"GroupDesiredCapacity",
"GroupInServiceInstances",
"GroupPendingInstances",
"GroupStandbyInstances",
"GroupTerminatingInstances",
"GroupTotalInstances"
]
no
client_name Name of the Auto Scaling Group (ASG) nodes deployed as Nomad clients string n/a yes
client_security_groups List of security groups to attach to the Nomad client nodes list(string) [] no
client_type Type of client to deploy: 'ec2' or 'asg' string "asg" no
cluster_name Identifier used for naming all resources associated with the cluster string n/a yes
cluster_tags Key-value pairs of tags to assign to the EC2 instances spawned by the ASG map(string) n/a yes
default_iam_policies List of IAM policies to assign to the Nomad clients list(string) [] no
ebs_encryption Enable EBS encryption bool true no
ebs_tags A map of custom tags to be assigned to the EBS volumes map(string) {} no
ebs_volume_size The size of the EBS volume in gigabytes number 100 no
ec2_count Number of Nomad client EC2 instances to run number 1 no
enable_docker_plugin Whether to enable the Docker plugin on the client nodes bool true no
extra_script Path to custom script to be run as part of cloud-init string "" no
health_check_grace_period The time (in seconds) to allow instances in the Auto Scaling group to warm up before beginning health checks. number 180 no
healthcheck_type Health check type for the ASG, either 'EC2' or 'ELB' string "EC2" 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_instance_profile Name of the existing IAM Instance Profile to use string "" no
iam_tags A map of custom tags to be assigned to the IAM role map(string) {} no
instance_desired_count Desired number of Nomad clients to run number 1 no
instance_max_count Maximum number of Nomad clients to run number 3 no
instance_min_count Minimum number of Nomad clients to run number 0 no
instance_type Instance type to use for the Nomad clients string "c5a.large" no
nomad_acl_enable Whether to enable ACLs on the Nomad cluster or not bool true no
nomad_client_exec_host_volumes A map of host volumes to configure for the Nomad client
map(object({
path = string
read_only = bool
}))
{} no
nomad_file_limit Value for LimitNOFILE in nomad systemd config number 900000 no
nomad_join_tag_value The value of the tag used for Nomad server auto-join string n/a yes
override_instance_types List of instance types to define in the mixed_instances_policy block list(string) [] no
route_53_resolver_address Route53 resolver address for querying DNS inside exec tasks string n/a yes
subnets List of subnets to assign for deploying instances list(string) [] no
target_group_arns List of target groups assigned in the ALB to connect to the ASG list(string) [] no
vpc AWS Virtual Private Cloud (VPC) to deploy all resources in string n/a yes
wait_for_capacity_timeout Time for which Terraform waits after ASG creation to see if instances are running. string "10m" no

Outputs

Name Description
nomad_client_asg Autoscaling group for the Nomad client nodes
nomad_client_ec2 EC2 client ID for the Nomad client node
nomad_client_ec2_availability_zones Availability zones for the Nomad client nodes
nomad_client_iam_profile IAM Profile created for Nomad Client
nomad_client_iam_role_arn ARN of the IAM role for the Nomad client nodes
nomad_client_launch_template_id ID of the launch template for the Nomad client nodes