Skip to content

Commit

Permalink
Do not enable codesign network route_table when flag is unset
Browse files Browse the repository at this point in the history
  • Loading branch information
hellais committed Apr 24, 2024
1 parent 20ea235 commit bcb1309
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tf/modules/network/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ resource "aws_subnet" "cloudhsm" {
}

resource "aws_route_table" "cloudhsm" {
count = var.enable_codesign_network ? 1 : 0

vpc_id = aws_vpc.main.id

route {
Expand All @@ -182,5 +184,5 @@ resource "aws_route_table" "cloudhsm" {
resource "aws_route_table_association" "cloudhsm" {
count = var.enable_codesign_network ? 1 : 0
subnet_id = element(aws_subnet.cloudhsm[*].id, count.index)
route_table_id = aws_route_table.cloudhsm.id
route_table_id = aws_route_table.cloudhsm[count.index].id
}

0 comments on commit bcb1309

Please sign in to comment.