Skip to content

Commit

Permalink
remove tags as they are handled at the provider
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Oct 22, 2025
1 parent 8d8d1aa commit 5df5812
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 23 deletions.
8 changes: 8 additions & 0 deletions additional_sg_rules.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,13 @@ locals {
to_port = 10251
type = "ingress"
}
ingress_cert_manager_webhook = {
description = "Cert Manager webhook"
from_port = 9402
protocol = "tcp"
source_cluster_security_group = true
to_port = 9402
type = "ingress"
}
}
}
6 changes: 0 additions & 6 deletions cluster-admin.tf
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ resource "aws_iam_role" "role_cluster-admin" {

assume_role_policy = data.aws_iam_policy_document.allow_sts.json
force_detach_policies = true
tags = var.tags
}

resource "aws_iam_policy_attachment" "cluster-admin-attach" {
Expand All @@ -100,11 +99,6 @@ resource "aws_iam_policy" "cluster-admin-policy" {
path = "/"
description = "Allow for administration of the cluster ${var.cluster_name} using AWS resources"
policy = data.aws_iam_policy_document.cluster-admin-policy.json

tags = merge(
local.base_tags,
var.tags
)
}

data "aws_iam_policy_document" "cluster-admin-policy" {
Expand Down
4 changes: 0 additions & 4 deletions irsa-roles.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ module "vpc_cni_irsa_role" {
namespace_service_accounts = ["kube-system:aws-node"]
}
}
tags = local.tags
}

module "ebs_csi_irsa_role" {
Expand All @@ -31,7 +30,6 @@ module "ebs_csi_irsa_role" {
namespace_service_accounts = ["kube-system:ebs-csi-controller-sa"]
}
}
tags = local.tags
}

module "efs_csi_irsa_role" {
Expand All @@ -48,7 +46,6 @@ module "efs_csi_irsa_role" {
namespace_service_accounts = ["kube-system:efs-csi-controller-sa"]
}
}
tags = local.tags
}

module "cloudwatch_observability_irsa_role" {
Expand All @@ -67,5 +64,4 @@ module "cloudwatch_observability_irsa_role" {
]
}
}
tags = local.tags
}
18 changes: 5 additions & 13 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
locals {
additional_policies = {}
base_tags = {
"boc:eks_cluster_name" = var.cluster_name
"boc:tf_module_name" = local.module_name
"boc:tf_module_version" = local.module_version
"karpenter.sh/discovery" = var.cluster_name
}
max_tag_count = 45
ng_name = format("%v%v-nodegroup", local.prefixes["eks"], var.cluster_name)
subnets = [for k, v in data.aws_subnet.subnets : v.id if length(regexall("us-east-1e", v.availability_zone)) == 0]
tags = merge(local.base_tags, var.tags)
vpc_cidr_block = data.aws_vpc.eks_vpc.cidr_block
vpc_id = data.aws_vpc.eks_vpc.id
max_tag_count = 45
ng_name = format("%v%v-nodegroup", local.prefixes["eks"], var.cluster_name)
subnets = [for k, v in data.aws_subnet.subnets : v.id if length(regexall("us-east-1e", v.availability_zone)) == 0]
vpc_cidr_block = data.aws_vpc.eks_vpc.cidr_block
vpc_id = data.aws_vpc.eks_vpc.id
}

resource "terraform_data" "subnet_validation" {
Expand Down Expand Up @@ -129,7 +122,6 @@ module "cluster" {
}
}
}
tags = local.tags
}

# Tag existing subnets for EKS
Expand Down

0 comments on commit 5df5812

Please sign in to comment.