Skip to content

Commit

Permalink
enha: added tags to public and private subnets for AWS LB Controller
Browse files Browse the repository at this point in the history
  • Loading branch information
kfc-manager committed Apr 5, 2024
1 parent 79461d7 commit 011e7fb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ resource "aws_subnet" "public" {
vpc_id = aws_vpc.main.id
availability_zone = length(var.azs) > count.index ? var.azs[count.index] : null

tags = var.tags
tags = merge(
{ "kubernetes.io/role/elb" = "1" },
var.tags
)
}

resource "aws_internet_gateway" "main" {
Expand Down Expand Up @@ -74,7 +77,10 @@ resource "aws_subnet" "private" {
vpc_id = aws_vpc.main.id
availability_zone = length(var.azs) > count.index ? var.azs[count.index] : null

tags = var.tags
tags = merge(
{ "kubernetes.io/role/internal-elb" = "1" },
var.tags
)
}

locals {
Expand Down

0 comments on commit 011e7fb

Please sign in to comment.