Skip to content

Commit 4a7ec98

Browse files
Update main.tf
Fixed issue with route tables
1 parent 2845ff8 commit 4a7ec98

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

workshop/aws/ec2/main.tf

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,22 +146,28 @@ resource "aws_internet_gateway" "o11y-ws-ig" {
146146
)
147147
}
148148

149-
resource "aws_route_table" "o11y-ws-rt" {
150-
vpc_id = aws_vpc.o11y-ws-vpc.id
151-
tags = merge(
152-
local.common_tags,
153-
{
154-
"Name" = "o11y-ws-rt"
155-
}
156-
)
157-
}
149+
# resource "aws_route_table" "o11y-ws-rt" {
150+
# vpc_id = aws_vpc.o11y-ws-vpc.id
151+
# tags = merge(
152+
# local.common_tags,
153+
# {
154+
# "Name" = "o11y-ws-rt"
155+
# }
156+
# )
157+
# }
158158

159159
resource "aws_route" "o11y-ws-route" {
160-
route_table_id = aws_route_table.o11y-ws-rt.id
160+
route_table_id = aws_vpc.o11y-ws-vpc.main_route_table_id
161161
destination_cidr_block = "0.0.0.0/0"
162162
gateway_id = aws_internet_gateway.o11y-ws-ig.id
163163
}
164164

165+
# resource "aws_route" "o11y-ws-route" {
166+
# route_table_id = aws_route_table.o11y-ws-rt.id
167+
# destination_cidr_block = "0.0.0.0/0"
168+
# gateway_id = aws_internet_gateway.o11y-ws-ig.id
169+
# }
170+
165171
# resource "aws_route_table_association" "o11y-ws-rta" {
166172
# subnet_id = aws_subnet.o11y-ws-subnet.id
167173
# route_table_id = aws_route_table.o11y-ws-rt.id

0 commit comments

Comments
 (0)