Terraform module that allows you to create EKS worker pools.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Christophe van de Kerchove cde6d7b07e
maintenance: (BREAKING) Add versions.tf file
2 months ago
examples maintenance: (BREAKING) Add versions.tf file 2 months ago
templates fix: bootstrap arguments position 10 months ago
.gitignore feature: pre-commit config and execution fixes 1 year ago
.pre-commit-config.yaml chore: Update pre-commit configuration 2 months ago
AUTHORS feature: Add spot-price variable and examples 10 months ago
CHANGELOG.md maintenance: (BREAKING) Add versions.tf file 2 months ago
Jenkinsfile feature: Add Jenkinsfile 1 year ago
LICENSE feature: fill in license file 1 year ago
README.md maintenance: (BREAKING) Add versions.tf file 2 months ago
main.tf feat: Add asg metric collection options 2 months ago
outputs.tf feat: Add output that will provide aws-auth data 1 year ago
variables.tf maintenance: (BREAKING) Add versions.tf file 2 months ago
versions.tf maintenance: (BREAKING) Add versions.tf file 2 months ago

README.md

terraform-module-aws-eks-worker-pool

Terraform module that allows you to create EKS worker pools.

Requirements

Name Version
terraform >= 0.13
aws >= 2.27

Providers

Name Version
aws >= 2.27

Inputs

Name Description Type Default Required
additional_bootstrap_arguments Additionnal arguments to pass to the EKS bootstrap script (from AWS). string "" no
allowed_cidr_blocks List of CIDR blocks that will be allowed to communicate on high ports with the worker pool. list [] no
allowed_security_group_ids List of security group ID's that are allowed to communicate on high ports with the worker pool. list [] no
associate_public_ip_address Whether or not to associate public IP's to the worker pool nodes. bool false no
autoscaling_group_desired_capacity Desired number of nodes in the worker pool. NOTE: Do not specify it if you plan to do autoscaling. number null no
autoscaling_group_enabled_metrics A list of metrics to collect. The allowed values are GroupDesiredCapacity, GroupInServiceCapacity, GroupPendingCapacity, GroupMinSize, GroupMaxSize, GroupInServiceInstances, GroupPendingInstances, GroupStandbyInstances, GroupStandbyCapacity, GroupTerminatingCapacity, GroupTerminatingInstances, GroupTotalCapacity, GroupTotalInstances. list(string) [] no
autoscaling_group_max_size Maximum number of nodes in the worker pool. number 10 no
autoscaling_group_min_size Minimum number of nodes in the worker pool. number 2 no
autoscaling_group_name Name of the autoscaling group of the worker pool. string "eks-worker-pool" no
autoscaling_group_tags List of map of tags of the autoscaling group of the worker pool. NOTE: map format [ { key = STRING, value = STRING, propagate_at_launch = BOOL } ]. list [] no
cluster_name Name of the EKS cluster to be joined by the worker pool nodes. string n/a yes
cluster_security_group_id ID of the security group of the EKS cluster. string n/a yes
customized_commands List of shell commands to execute before joining eks cluster string "" no
enabled Whther or not to enable this worker pool. bool true no
iam_instance_profile_name Name of the instance profile that will be attached to the worker pool nodes. string "eks-worker-pool" no
iam_role_name Name of the IAM role that will be assigned on the worker pool nodes. string "eks-worker-pool" no
iam_role_policy_attachment_arns List of additionnal policy arns that will be attached to the role of the worker pool nodes. list [] no
iam_role_tags Map of tags that will be added on the IAM role. map {} no
image_id ID of the AMI that will be used for the worker nodes. NOTE: Leave empty to use ami_name variable. string "" no
instance_type Type of instance that will be used for the worker pool nodes. string "t3.small" no
key_name Name of the AWS Key pair to attach to the instances. string null no
kubernetes_version Version of the EKS cluster. Will be used to determine which AMI to use for eks worker nodes. NOTE: If ami is set, this will be ignored. string n/a yes
name_prefix Name prefix to use for the launch configuration of the worker pool. string "eks-worker-pool" no
security_group_ids List of additionnal security group ids that will be attached to the worker pool nodes. list [] no
security_group_name Name of the security group for the worker pool nodes. string "eks-worker-pool" no
security_group_tags Map of tags that will be applied on the security group for the worker pool nodes. map {} no
spot_price The maximum price to use for reserving spot instances. string null no
subnet_ids List of subnet ID's that will be used to deploy the EKS worker pool. list n/a yes
tags Map of tags that will be added on all resources. map {} no
use_max_pods Maximum number of pods that will be allowed to be scheduled on each node. bool false no
volume_size Root block device volume size. number 50 no
volume_type Root block device volume type. string "standard" no
worker_pool_security_group_ids List of security group ids of the other worker pools available on the cluster. list [] no

Outputs

Name Description
autoscaling_group_arn ARN of the autoscaling group that is created.
autoscaling_group_id ID of the autoscaling group that is created.
aws_auth_data List of maps representing the needed config to add to the aws-auth configmap on EKS.
iam_instance_profile_arn ARN of the IAM instance profile that is created.
iam_instance_profile_id ID of the IAM instance profile that is created.
iam_instance_profile_name Name of the IAM instance profile that is created.
iam_instance_profile_unique_id Uniauq ID of the IAM instance profile that is created.
iam_role_arn ARN of the IAM role that is created.
iam_role_id ID of the IAM role that is created.
iam_role_name Name of the IAM role that is created.
iam_role_unique_id Uniauq ID of the IAM role that is created.
launch_configuration_id ID of the launch configruation that is created.
launch_configuration_name Name of the launch configruation that is created.
security_group_arn ARN of the security group that is created.
security_group_id ID of the security group that is created.
security_group_name Name of the security group that is created.