Skip to content

Commit

Permalink
Add tags to public and private subnets (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenmartius authored Apr 22, 2024
2 parents e45154a + dcd0fc3 commit 13b13fa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions stacks/prod/us-east-1/vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@ module "vpc" {
enable_nat_gateway = true
enable_vpn_gateway = true
name = "prd-vpc"
private_subnet_tags = {
Tier = "private"
}
private_subnets = [
"10.0.1.0/24",
"10.0.2.0/24",
"10.0.3.0/24",
]
public_subnet_tags = {
Tier = "public"
}
public_subnets = [
"10.0.101.0/24",
"10.0.102.0/24",
Expand Down
8 changes: 8 additions & 0 deletions stacks/prod/us-east-1/vpc/main.tm.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ generate_hcl "main.tf" {
enable_nat_gateway = tm_try(global.vpc.enable_nat_gateway, true)
enable_vpn_gateway = tm_try(global.vpc.enable_vpn_gateway, true)

public_subnet_tags = {
Tier = "public"
}

private_subnet_tags = {
Tier = "private"
}

tags = tm_try(global.tags, {})
}
}
Expand Down

0 comments on commit 13b13fa

Please sign in to comment.