-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
Ability to add additional security groups to a node group #66
Changes from all commits
5203839
aa3335a
3148848
414b925
c636f11
e43e507
2d3453c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
name: Validate Codeowners | ||
on: | ||
workflow_dispatch: | ||
|
||
pull_request: | ||
|
||
jobs: | ||
|
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ locals { | |
|
||
need_remote_access_sg = local.enabled && local.have_ssh_key && local.generate_launch_template | ||
|
||
get_cluster_data = local.enabled ? (local.need_cluster_kubernetes_version || local.need_bootstrap || local.need_remote_access_sg) : false | ||
get_cluster_data = local.enabled ? (local.need_cluster_kubernetes_version || local.need_bootstrap || local.need_remote_access_sg || length(var.additional_security_group_ids) > 0) : false | ||
|
||
autoscaler_enabled = var.enable_cluster_autoscaler != null ? var.enable_cluster_autoscaler : var.cluster_autoscaler_enabled == true | ||
# | ||
|
@@ -86,6 +86,7 @@ locals { | |
ec2_ssh_key = local.have_ssh_key ? var.ec2_ssh_key : "none" | ||
# Keep sorted so that change in order does not trigger replacement via random_pet | ||
source_security_group_ids = local.ng_needs_remote_access ? sort(var.source_security_group_ids) : [] | ||
additional_security_group_ids = sort(var.additional_security_group_ids) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
} | ||
} | ||
|
||
|
@@ -114,7 +115,8 @@ resource "random_pet" "cbd" { | |
# actually track security groups by using | ||
# source_security_group_ids = join(",", local.ng.source_security_group_ids, aws_security_group.remote_access.*.id) | ||
# | ||
source_security_group_ids = local.need_remote_access_sg ? "generated for launch template" : join(",", local.ng.source_security_group_ids) | ||
source_security_group_ids = local.need_remote_access_sg ? "generated for launch template" : join(",", local.ng.source_security_group_ids) | ||
additional_security_group_ids = join(",", local.ng.additional_security_group_ids) | ||
|
||
launch_template_id = local.use_launch_template ? local.launch_template_id : "none" | ||
} | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -46,6 +46,12 @@ variable "source_security_group_ids" { | |||||
description = "Set of EC2 Security Group IDs to allow SSH access (port 22) to the worker nodes. If you specify `ec2_ssh_key`, but do not specify this configuration when you create an EKS Node Group, port 22 on the worker nodes is opened to the Internet (0.0.0.0/0)" | ||||||
} | ||||||
|
||||||
variable "additional_security_group_ids" { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have a new naming convention. Please rename this
Suggested change
|
||||||
type = list(string) | ||||||
default = [] | ||||||
description = "Set of additional EC2 Security Group IDs that will be associated with the EKS Node Group" | ||||||
} | ||||||
|
||||||
variable "desired_size" { | ||||||
type = number | ||||||
description = "Initial desired number of worker nodes (external changes ignored)" | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed.
get_cluster_date
is true only if we need to invoke a data provider to get more information about the cluster.