Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: additional tags for public and private subnets #58

Merged
merged 2 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions _example/aws_managed/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ module "subnets" {
ipv6_cidr_block = module.vpc.ipv6_cidr_block
enable_ipv6 = false

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 = [
{
rule_number = 100
Expand Down
10 changes: 10 additions & 0 deletions _example/aws_managed_with_fargate/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ module "subnets" {
ipv6_cidr_block = module.vpc.ipv6_cidr_block
enable_ipv6 = false

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 = [
{
rule_number = 100
Expand Down
11 changes: 10 additions & 1 deletion _example/complete/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -44,6 +43,16 @@ module "subnets" {
type = "public-private"
igw_id = module.vpc.igw_id

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 = [
{
rule_number = 100
Expand Down
12 changes: 11 additions & 1 deletion _example/self_managed/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,24 @@ 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
cidr_block = module.vpc.vpc_cidr_block
ipv6_cidr_block = module.vpc.ipv6_cidr_block
type = "public-private"
igw_id = module.vpc.igw_id

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 = [
{
rule_number = 100
Expand Down