Skip to content

Commit a63ff82

Browse files
committed
Allow custom SSL policy for the Load Balancer Controller
Some servers may have more strict requirements for their TLS listeners. The `ELBSecurityPolicy-2016-08` policy is the default security policy for TLS listeners created using the AWS CLI. This change allows a customization on the Load Balancer Controller to specify a different security policy. [Reference](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html).
1 parent 8e29883 commit a63ff82

File tree

4 files changed

+23
-8
lines changed

4 files changed

+23
-8
lines changed

aws/platform/main.tf

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,15 @@ module "common_platform" {
6969
module "aws_load_balancer_controller" {
7070
source = "./modules/load-balancer-controller"
7171

72-
aws_namespace = [module.cluster_name.full]
73-
aws_tags = var.aws_tags
74-
chart_values = var.aws_load_balancer_controller_values
75-
chart_version = var.aws_load_balancer_controller_version
76-
cluster_full_name = module.cluster_name.full
77-
k8s_namespace = var.k8s_namespace
78-
oidc_issuer = data.aws_ssm_parameter.oidc_issuer.value
79-
vpc_cidr_block = module.network.vpc.cidr_block
72+
aws_namespace = [module.cluster_name.full]
73+
aws_tags = var.aws_tags
74+
chart_values = var.aws_load_balancer_controller_values
75+
chart_version = var.aws_load_balancer_controller_version
76+
cluster_full_name = module.cluster_name.full
77+
default_ssl_policy = var.default_ssl_policy
78+
k8s_namespace = var.k8s_namespace
79+
oidc_issuer = data.aws_ssm_parameter.oidc_issuer.value
80+
vpc_cidr_block = module.network.vpc.cidr_block
8081

8182
depends_on = [module.common_platform]
8283
}

aws/platform/modules/load-balancer-controller/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ locals {
9090
"eks.amazonaws.com/role-arn" = module.service_account_role.arn
9191
}
9292
}
93+
94+
defaultSSLPolicy = coalesce(var.default_ssl_policy, "ELBSecurityPolicy-2016-08")
9395
})
9496
]
9597
}

aws/platform/modules/load-balancer-controller/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,9 @@ variable "vpc_cidr_block" {
6666
type = string
6767
description = "CIDR block for the AWS VPC in which the load balancer runs"
6868
}
69+
70+
variable "default_ssl_policy" {
71+
type = string
72+
description = "The default SSL policy to use for the load balancer"
73+
default = null
74+
}

aws/platform/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ variable "custom_roles" {
7474
default = {}
7575
}
7676

77+
variable "default_ssl_policy" {
78+
type = string
79+
description = "The default SSL policy to use for the load balancer"
80+
default = null
81+
}
82+
7783
variable "domain_names" {
7884
type = list(string)
7985
default = []

0 commit comments

Comments
 (0)