Skip to content

Commit

Permalink
Fixed subnet id build error
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronaldo Macapobre committed Jul 25, 2024
1 parent b848277 commit f494283
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion infrastructure/cloud/modules/networking/vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ resource "aws_route_table" "route_table" {
}

resource "aws_route_table_association" "route_table_association" {
subnet_id = aws_subnet.subnet[*].id
count = length(var.private_subnets)
subnet_id = element(aws_subnet.subnet.*.id, count.index)
route_table_id = aws_route_table.route_table.id
}

Expand Down

0 comments on commit f494283

Please sign in to comment.