diff --git a/main.tf b/main.tf index f6b2914..e999b71 100644 --- a/main.tf +++ b/main.tf @@ -68,6 +68,7 @@ module "cluster" { use_kms_s3 = var.use_kms_s3 s3_kms_arn = var.s3_kms_arn s3_extra_tags = var.s3_extra_tags + eks_cluster_tags = var.eks_cluster_tags is_jx2 = var.is_jx2 content = local.content cluster_endpoint_public_access = var.cluster_endpoint_public_access diff --git a/modules/cluster/main.tf b/modules/cluster/main.tf index 0196529..8cd4d6e 100644 --- a/modules/cluster/main.tf +++ b/modules/cluster/main.tf @@ -67,6 +67,7 @@ module "eks" { subnets = var.create_vpc ? (var.cluster_in_private_subnet ? module.vpc.private_subnets : module.vpc.public_subnets) : var.subnets vpc_id = var.create_vpc ? module.vpc.vpc_id : var.vpc_id enable_irsa = true + tags = var.eks_cluster_tags worker_groups_launch_template = var.enable_worker_group && var.enable_worker_groups_launch_template ? [ for subnet in(var.create_vpc ? module.vpc.public_subnets : var.subnets) : diff --git a/modules/cluster/variables.tf b/modules/cluster/variables.tf index dde045b..c8d00f0 100644 --- a/modules/cluster/variables.tf +++ b/modules/cluster/variables.tf @@ -14,6 +14,12 @@ variable "cluster_version" { default = "1.26.6" } +variable "eks_cluster_tags" { + description = "Add tags for the EKS Cluster" + type = map + default = {} +} + variable "profile" { description = "The AWS Profile used to provision the EKS Cluster" type = string diff --git a/variables.tf b/variables.tf index e8050b4..b4b51d6 100644 --- a/variables.tf +++ b/variables.tf @@ -340,6 +340,12 @@ variable "s3_extra_tags" { default = {} } +variable "eks_cluster_tags" { + description = "Add tags for the EKS Cluster" + type = map + default = {} +} + variable "is_jx2" { default = true type = bool