Skip to content

Commit 46f54f7

Browse files
committed
Remove cluster-name tagging from subnets
* These tags were previously required by aws-load-balancer-controller/alb-ingress-controller * We no longer ship a ingress controller with the module since #225 * aws-load-balancer-controller doesn't need those tags anyway since v2.1.2 - kubernetes-sigs/aws-load-balancer-controller#1773
1 parent 6646f5f commit 46f54f7

File tree

4 files changed

+5
-21
lines changed

4 files changed

+5
-21
lines changed

main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ module "vpc" {
44
name = var.cluster_name
55
cidr_block = var.cidr_block
66
availability_zones = var.availability_zones
7-
cluster_names = var.cluster_names
87
}
98

109
module "iam" {

modules/vpc/subnets.tf

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
locals {
22
az_subnet_numbers = zipmap(var.availability_zones, range(0, length(var.availability_zones)))
3-
cluster_tags = { for cluster_name in var.cluster_names : "kubernetes.io/cluster/${cluster_name}" => "shared" }
43
}
54

65
resource "aws_subnet" "public" {
@@ -11,14 +10,11 @@ resource "aws_subnet" "public" {
1110
vpc_id = aws_vpc.network.id
1211
map_public_ip_on_launch = true
1312

14-
tags = merge(
15-
local.cluster_tags,
16-
{
17-
Name = "${var.name}-public-${each.key}"
18-
"kubernetes.io/role/elb" = "1"
19-
"kubernetes.io/role/alb-ingress" = "1"
20-
}
21-
)
13+
tags = {
14+
Name = "${var.name}-public-${each.key}"
15+
"kubernetes.io/role/elb" = "1"
16+
"kubernetes.io/role/alb-ingress" = "1"
17+
}
2218
}
2319

2420
resource "aws_route_table_association" "public" {

modules/vpc/variables.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,3 @@ variable "cidr_block" {
1111
variable "availability_zones" {
1212
description = "The availability zones to create subnets in"
1313
}
14-
15-
variable "cluster_names" {
16-
description = "Names of the EKS clusters deployed in this VPC."
17-
type = list(string)
18-
default = []
19-
}

variables.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ variable "cluster_name" {
33
description = "A name for the EKS cluster, and the resources it depends on"
44
}
55

6-
variable "cluster_names" {
7-
type = list(string)
8-
description = ""
9-
}
10-
116
variable "cidr_block" {
127
type = string
138
description = "The CIDR block for the VPC that EKS will run in"

0 commit comments

Comments
 (0)