I'm trying to create vpc with two subnets: one public with internet gateway and one private that can only communicate with other local resource.
i had no problem creating the public route table:
resource "aws_route_table" "HW2-public-crt" {
vpc_id = "${aws_vpc.hw2_vpc.id}"
route {
//associated subnet can reach everywhere
cidr_block = "0.0.0.0/0"
//CRT uses this IGW to reach internet
gateway_id = "${aws_internet_gateway.hw2-igw.id}"
but when I tried to create the private route table:
resource "aws_route_table" "HW2-private-crt" {
vpc_id = "${aws_vpc.hw2_vpc.id}"
route {
cidr_block = "10.0.0.0/16"
I get this error:
"Error creating route: MissingParameter: The request must contain exactly one of gatewayId, natGatewayId, networkInterfaceId, vpcPeeringConnectionId, egressOnlyInternetGatewayId, transitGatewayId or instanceId status code: 400"
when creating a route table in the console I don't see such requirement any thoughts?