August 2019
Beginner
608 pages
16h 7m
English
Now that we have hosts and networks, we have to find a way to make them communicate with each other. When they live in the same subnet, that is fine, but we need to route some traffic because we have multiple networks. Here is an example of such an AWS resource, which is called a aws_route_table resource:
resource "aws_route_table" "default" { vpc_id = "${aws_vpc.gitlabha.id}" route { cidr_block = "0.0.0.0/0" gateway_id = "${aws_internet_gateway.internet_gateway.id}" } tags { Name = "Default route table" }}
The first property is the VPC it belongs to:
vpc_id = "${aws_vpc.gitlabha.id}"
Then, a route is defined. In this example, it is the default route, 0.0.0.0/0:
cidr_block = "0.0.0.0/0"
The gateway in this block is the internet ...
Read now
Unlock full access