diff --git a/main.tf b/main.tf index 2dffeea..cf6569f 100644 --- a/main.tf +++ b/main.tf @@ -430,6 +430,7 @@ resource "helm_release" "alb_controller" { "region" = local.aws_region_name "vpcId" = local.aws_vpc_id "hostNetwork" = var.enable_host_networking + "replicaCount" = var.k8s_replicas } content { name = set.key @@ -445,6 +446,22 @@ resource "helm_release" "alb_controller" { } } + dynamic "set" { + for_each = var.k8s_pod_annotations + content { + name = "podAnnotations.${set.key}" + value = set.value + } + } + + dynamic "set" { + for_each = var.k8s_pod_labels + content { + name = "podLabels.${set.key}" + value = set.value + } + } + depends_on = [var.alb_controller_depends_on] } diff --git a/variables.tf b/variables.tf index 4e9495d..2e64a5f 100644 --- a/variables.tf +++ b/variables.tf @@ -21,13 +21,14 @@ variable "k8s_replicas" { default = 1 } - +# missing variable "k8s_pod_annotations" { description = "Additional annotations to be added to the Pods." type = map(string) default = {} } +# missing variable "k8s_pod_labels" { description = "Additional labels to be added to the Pods." type = map(string)