mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-04-30 20:34:37 +02:00
feat: Allow users to selectively attach the EKS created cluster primary security group to nodes (#1952)
This commit is contained in:
@@ -86,6 +86,7 @@ module "self_managed_node_group" {
|
||||
| <a name="input_cluster_endpoint"></a> [cluster\_endpoint](#input\_cluster\_endpoint) | Endpoint of associated EKS cluster | `string` | `""` | no |
|
||||
| <a name="input_cluster_ip_family"></a> [cluster\_ip\_family](#input\_cluster\_ip\_family) | The IP family used to assign Kubernetes pod and service addresses. Valid values are `ipv4` (default) and `ipv6` | `string` | `null` | no |
|
||||
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Name of associated EKS cluster | `string` | `""` | no |
|
||||
| <a name="input_cluster_primary_security_group_id"></a> [cluster\_primary\_security\_group\_id](#input\_cluster\_primary\_security\_group\_id) | The ID of the EKS cluster primary security group to associate with the instance(s). This is the security group that is automatically created by the EKS service | `string` | `null` | no |
|
||||
| <a name="input_cluster_security_group_id"></a> [cluster\_security\_group\_id](#input\_cluster\_security\_group\_id) | Cluster control plane security group ID | `string` | `null` | no |
|
||||
| <a name="input_cluster_version"></a> [cluster\_version](#input\_cluster\_version) | Kubernetes cluster version - used to lookup default AMI ID if one is not provided | `string` | `null` | no |
|
||||
| <a name="input_cpu_options"></a> [cpu\_options](#input\_cpu\_options) | The CPU options for the instance | `map(string)` | `null` | no |
|
||||
|
||||
@@ -57,7 +57,7 @@ resource "aws_launch_template" "this" {
|
||||
key_name = var.key_name
|
||||
user_data = module.user_data.user_data
|
||||
|
||||
vpc_security_group_ids = compact(concat([try(aws_security_group.this[0].id, "")], var.vpc_security_group_ids))
|
||||
vpc_security_group_ids = compact(concat([try(aws_security_group.this[0].id, ""), var.cluster_primary_security_group_id], var.vpc_security_group_ids))
|
||||
|
||||
default_version = var.launch_template_default_version
|
||||
update_default_version = var.update_launch_template_default_version
|
||||
|
||||
@@ -234,6 +234,12 @@ variable "vpc_security_group_ids" {
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "cluster_primary_security_group_id" {
|
||||
description = "The ID of the EKS cluster primary security group to associate with the instance(s). This is the security group that is automatically created by the EKS service"
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "enable_monitoring" {
|
||||
description = "Enables/disables detailed monitoring"
|
||||
type = bool
|
||||
|
||||
Reference in New Issue
Block a user