|
| 1 | +# eks `node_groups` submodule |
| 2 | + |
| 3 | +Helper submodule to create and manage resources related to `eks_node_groups`. |
| 4 | + |
| 5 | +## Assumptions |
| 6 | +* Designed for use by the parent module and not directly by end users |
| 7 | + |
| 8 | +## Node Groups' IAM Role |
| 9 | +The role ARN specified in `var.default_iam_role_arn` will be used by default. In a simple configuration this will be the worker role created by the parent module. |
| 10 | + |
| 11 | +`iam_role_arn` must be specified in either `var.node_groups_defaults` or `var.node_groups` if the default parent IAM role is not being created for whatever reason, for example if `manage_worker_iam_resources` is set to false in the parent. |
| 12 | + |
| 13 | +## `node_groups` and `node_groups_defaults` keys |
| 14 | +`node_groups_defaults` is a map that can take the below keys. Values will be used if not specified in individual node groups. |
| 15 | + |
| 16 | +`node_groups` is a map of maps. Key of first level will be used as unique value for `for_each` resources and in the `aws_eks_node_group` name. Inner map can take the below values. |
| 17 | + |
| 18 | +| Name | Description | Type | If unset | |
| 19 | +|------|-------------|:----:|:-----:| |
| 20 | +| additional\_tags | Additional tags to apply to node group | map(string) | Only `var.tags` applied | |
| 21 | +| ami\_release\_version | AMI version of workers | string | Provider default behavior | |
| 22 | +| ami\_type | AMI Type. See Terraform or AWS docs | string | Provider default behavior | |
| 23 | +| desired\_capacity | Desired number of workers | number | `var.workers_group_defaults[asg_desired_capacity]` | |
| 24 | +| disk\_size | Workers' disk size | number | Provider default behavior | |
| 25 | +| iam\_role\_arn | IAM role ARN for workers | string | `var.default_iam_role_arn` | |
| 26 | +| instance\_type | Workers' instance type | string | `var.workers_group_defaults[instance_type]` | |
| 27 | +| k8s\_labels | Kubernetes labels | map(string) | No labels applied | |
| 28 | +| key\_name | Key name for workers. Set to empty string to disable remote access | string | `var.workers_group_defaults[key_name]` | |
| 29 | +| max\_capacity | Max number of workers | number | `var.workers_group_defaults[asg_max_size]` | |
| 30 | +| min\_capacity | Min number of workers | number | `var.workers_group_defaults[asg_min_size]` | |
| 31 | +| source\_security\_group\_ids | Source security groups for remote access to workers | list(string) | If key\_name is specified: THE REMOTE ACCESS WILL BE OPENED TO THE WORLD | |
| 32 | +| subnets | Subnets to contain workers | list(string) | `var.workers_group_defaults[subnets]` | |
| 33 | +| version | Kubernetes version | string | Provider default behavior | |
| 34 | + |
| 35 | +<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
| 36 | +## Inputs |
| 37 | + |
| 38 | +| Name | Description | Type | Default | Required | |
| 39 | +|------|-------------|:----:|:-----:|:-----:| |
| 40 | +| cluster\_name | Name of parent cluster | string | n/a | yes | |
| 41 | +| create\_eks | Controls if EKS resources should be created (it affects almost all resources) | bool | `"true"` | no | |
| 42 | +| default\_iam\_role\_arn | ARN of the default IAM worker role to use if one is not specified in `var.node_groups` or `var.node_groups_defaults` | string | n/a | yes | |
| 43 | +| node\_groups | Map of maps of `eks_node_groups` to create. See "`node_groups` and `node_groups_defaults` keys" section in README.md for more details | any | `{}` | no | |
| 44 | +| node\_groups\_defaults | map of maps of node groups to create. See "`node_groups` and `node_groups_defaults` keys" section in README.md for more details | any | n/a | yes | |
| 45 | +| tags | A map of tags to add to all resources | map(string) | n/a | yes | |
| 46 | +| workers\_group\_defaults | Workers group defaults from parent | any | n/a | yes | |
| 47 | + |
| 48 | +## Outputs |
| 49 | + |
| 50 | +| Name | Description | |
| 51 | +|------|-------------| |
| 52 | +| aws\_auth\_roles | Roles for use in aws-auth ConfigMap | |
| 53 | +| node\_groups | Outputs from EKS node groups. Map of maps, keyed by `var.node_groups` keys. See `aws_eks_node_group` Terraform documentation for values | |
| 54 | + |
| 55 | +<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
0 commit comments