eks-workers

cloudposse/eks-workers/aws

Terraform Module HCL AWS

Terraform module to provision an AWS AutoScaling Group, IAM Role, and Security Group for EKS Workers

Install
module "eks-workers" {
source = "cloudposse/eks-workers/aws"
version = "1.3.0"
}
⭐ Source on GitHub 📦 Registry page
README

Terraform module to provision AWS resources to run EC2 worker nodes for Elastic Kubernetes Service. Instantiate it multiple times to create many EKS worker node pools with specific settings such as GPUs, EC2 instance types, or autoscale parameters. > [!TIP] > #### 👽 Use Atmos with Terraform > Cloud Posse uses atmos to easily orchestrate multiple environments using Terraform. > Works with Github Actions, Atlantis, or Spacelift. > > > Watch demo of using Atmos with Terraform > > Example of running atmos to manage infrastructure from our Quick Start tutorial. > Introduction The module provisions the following resources: - IAM Role and Instance Profile to allow Kubernetes nodes to access other AWS services - Security Group with rules for EKS workers to allow networking traffic - AutoScaling Gr

Inputs (50)
NameTypeDescriptionDefault
cluster_endpointstringEKS cluster endpoint required
cluster_namestringThe name of the EKS cluster required
vpc_idstringVPC ID for the EKS cluster required
scale_down_cooldown_secondsnumberThe amount of time, in seconds, after a scaling activity completes and before th300
scale_down_scaling_adjustmentnumberThe number of instances by which to scale. `scale_down_scaling_adjustment` deter-1
use_existing_security_groupboolIf set to `true`, will use variable `workers_security_group_id` to run EKS workefalse
use_existing_aws_iam_instance_profileboolIf set to `true`, will use variable `aws_iam_instance_profile_name` to run EKS wfalse
use_custom_image_idboolIf set to `true`, will use variable `image_id` for the EKS workers inside autoscfalse
suspended_processeslist(string)A list of processes to suspend for the AutoScaling Group. The allowed values are[]
metrics_granularitystringThe granularity to associate with the metrics to collect. The only valid value i"1Minute"
allowed_security_groupslist(string)List of Security Group IDs to be allowed to connect to the worker nodes[]
key_namestringSSH key name that should be used for the instance""
health_check_grace_periodnumberTime (in seconds) after instance comes into service before checking health300
force_deleteboolAllows deleting the autoscaling group without waiting for all instances in the pfalse
cpu_utilization_high_statisticstringThe statistic to apply to the alarm's associated metric. Either of the following"Average"
cpu_utilization_low_statisticstringThe statistic to apply to the alarm's associated metric. Either of the following"Average"
eks_worker_ami_name_regexstringA regex string to apply to the AMI list returned by AWS"^amazon-eks-node-[0-9,.]+-v[0-9]{8}$"
target_group_arnslist(string)A list of aws_alb_target_group ARNs, for use with Application Load Balancing[]
min_elb_capacitynumberSetting this causes Terraform to wait for this number of instances to show up he0
scale_down_adjustment_typestringSpecifies whether the adjustment is an absolute number or a percentage of the cu"ChangeInCapacity"
after_cluster_joining_userdatastringAdditional commands to execute on each worker node after joining the EKS cluster""
additional_tag_mapmap(string)Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not add{}
id_length_limitnumberLimit `id` to this many characters (minimum 6). Set to `0` for unlimited length.null
… and 10 more inputs
Outputs (17)
autoscaling_group_id — The AutoScaling Group ID
autoscaling_group_min_size — The minimum size of the AutoScaling Group
autoscaling_group_arn — ARN of the AutoScaling Group
autoscaling_group_desired_capacity — The number of Amazon EC2 instances that should be running in the group
autoscaling_group_health_check_grace_period — Time after instance comes into service before checking health
security_group_id — ID of the worker nodes Security Group
launch_template_id — The ID of the launch template
launch_template_arn — ARN of the launch template
workers_role_name — Name of the worker nodes IAM role
autoscaling_group_name — The AutoScaling Group name
autoscaling_group_default_cooldown — Time between a scaling activity and the succeeding scaling activity
autoscaling_group_health_check_type — `EC2` or `ELB`. Controls how health checking is done
security_group_arn — ARN of the worker nodes Security Group
security_group_name — Name of the worker nodes Security Group
workers_role_arn — ARN of the worker nodes IAM role
autoscaling_group_tags — A list of tag settings associated with the AutoScaling Group
autoscaling_group_max_size — The maximum size of the AutoScaling Group
Resources (5)
aws_iam_instance_profileaws_iam_roleaws_iam_role_policy_attachmentaws_security_groupaws_security_group_rule
Details
FrameworkTerraform Module
LanguageHCL
Version1.3.0
Cloud AWS
★ Stars92
Forks76
Total downloads68.7k
Inputs50
Outputs17
Resources5
Examples1
LicenseApache-2.0
Namespacecloudposse
Updated