diff --git a/_example/aws_managed/example.tf b/_example/aws_managed/example.tf index 8206a1f..9303b2e 100644 --- a/_example/aws_managed/example.tf +++ b/_example/aws_managed/example.tf @@ -46,8 +46,15 @@ module "subnets" { ipv6_cidr_block = module.vpc.ipv6_cidr_block enable_ipv6 = false - extra_public_tags = { "kubernetes.io/role/elb" = "1" } - extra_private_tags = { "kubernetes.io/role/internal-elb" = "1" } + extra_public_tags = { + "kubernetes.io/cluster/${module.eks.cluster_name}" = "owned" + "kubernetes.io/role/elb" = "1" + } + + extra_private_tags = { + "kubernetes.io/cluster/${module.eks.cluster_name}" = "owned" + "kubernetes.io/role/internal-elb" = "1" + } public_inbound_acl_rules = [ { diff --git a/_example/aws_managed_with_fargate/example.tf b/_example/aws_managed_with_fargate/example.tf index bf546ea..93fe1a4 100644 --- a/_example/aws_managed_with_fargate/example.tf +++ b/_example/aws_managed_with_fargate/example.tf @@ -46,8 +46,15 @@ module "subnets" { ipv6_cidr_block = module.vpc.ipv6_cidr_block enable_ipv6 = false - extra_public_tags = { "kubernetes.io/role/elb" = "1" } - extra_private_tags = { "kubernetes.io/role/internal-elb" = "1" } + extra_public_tags = { + "kubernetes.io/cluster/${module.eks.cluster_name}" = "owned" + "kubernetes.io/role/elb" = "1" + } + + extra_private_tags = { + "kubernetes.io/cluster/${module.eks.cluster_name}" = "owned" + "kubernetes.io/role/internal-elb" = "1" + } public_inbound_acl_rules = [ { diff --git a/_example/complete/example.tf b/_example/complete/example.tf index 30d0ea1..6754bbd 100644 --- a/_example/complete/example.tf +++ b/_example/complete/example.tf @@ -34,7 +34,6 @@ module "subnets" { name = "${local.name}-subnets" environment = local.environment - tags = local.tags nat_gateway_enabled = true availability_zones = ["${local.region}a", "${local.region}b"] @@ -44,8 +43,15 @@ module "subnets" { type = "public-private" igw_id = module.vpc.igw_id - extra_public_tags = { "kubernetes.io/role/elb" = "1" } - extra_private_tags = { "kubernetes.io/role/internal-elb" = "1" } + extra_public_tags = { + "kubernetes.io/cluster/${module.eks.cluster_name}" = "shared" + "kubernetes.io/role/elb" = "1" + } + + extra_private_tags = { + "kubernetes.io/cluster/${module.eks.cluster_name}" = "shared" + "kubernetes.io/role/internal-elb" = "1" + } public_inbound_acl_rules = [ { diff --git a/_example/self_managed/example.tf b/_example/self_managed/example.tf index 329765b..d6556de 100644 --- a/_example/self_managed/example.tf +++ b/_example/self_managed/example.tf @@ -34,7 +34,6 @@ module "subnets" { name = "${local.name}-subnets" environment = local.environment - tags = local.tags nat_gateway_enabled = true availability_zones = ["${local.region}a", "${local.region}b"] vpc_id = module.vpc.vpc_id @@ -43,8 +42,15 @@ module "subnets" { type = "public-private" igw_id = module.vpc.igw_id - extra_public_tags = { "kubernetes.io/role/elb" = "1" } - extra_private_tags = { "kubernetes.io/role/internal-elb" = "1" } + extra_public_tags = { + "kubernetes.io/cluster/${module.eks.cluster_name}" = "shared" + "kubernetes.io/role/elb" = "1" + } + + extra_private_tags = { + "kubernetes.io/cluster/${module.eks.cluster_name}" = "shared" + "kubernetes.io/role/internal-elb" = "1" + } public_inbound_acl_rules = [ {