Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to set the name of a node group manually #739

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
- Added example `examples/irsa` for IAM Roles for Service Accounts (by @max-rocket-internet)
- **Breaking:** Removal of autoscaling IAM policy and tags (by @max-rocket-internet)
- Add `iam:{Create,Delete,Get}OpenIDConnectProvider` grants to the list of required IAM permissions in `docs/iam-permissions.md` (by @danielelisi)
- Add an `name` parameter to be able to manually name EKS Managed Node Groups (by @splieth)

#### Important notes

Expand Down
1 change: 1 addition & 0 deletions modules/node_groups/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ The role ARN specified in `var.default_iam_role_arn` will be used by default. In
| key\_name | Key name for workers. Set to empty string to disable remote access | string | `var.workers_group_defaults[key_name]` |
| max\_capacity | Max number of workers | number | `var.workers_group_defaults[asg_max_size]` |
| min\_capacity | Min number of workers | number | `var.workers_group_defaults[asg_min_size]` |
| name | Name of the node group | string | Auto generated |
| 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 |
| subnets | Subnets to contain workers | list(string) | `var.workers_group_defaults[subnets]` |
| version | Kubernetes version | string | Provider default behavior |
Expand Down
2 changes: 1 addition & 1 deletion modules/node_groups/node_groups.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
resource "aws_eks_node_group" "workers" {
for_each = local.node_groups_expanded

node_group_name = join("-", [var.cluster_name, each.key, random_pet.node_groups[each.key].id])
node_group_name = lookup(each.value, "name", join("-", [var.cluster_name, each.key, random_pet.node_groups[each.key].id]))

cluster_name = var.cluster_name
node_role_arn = each.value["iam_role_arn"]
Expand Down