Skip to content

Commit

Permalink
feat: add tags to eks cluster (#374)
Browse files Browse the repository at this point in the history

Co-authored-by: robervexcel <[email protected]>
  • Loading branch information
rupertgti and robervexcel authored May 13, 2024
1 parent 043ff75 commit 22981dc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions modules/cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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) :
Expand Down
6 changes: 6 additions & 0 deletions modules/cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 22981dc

Please sign in to comment.