Skip to content

Commit

Permalink
Add option to set the name of a node group manually (#739)
Browse files Browse the repository at this point in the history
  • Loading branch information
splieth authored Feb 14, 2020
1 parent a9c73b2 commit 10ca272
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
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

0 comments on commit 10ca272

Please sign in to comment.