The documentation here: https://www.terraform.io/docs/providers/aws/r/default_route_table.html claims that you can import the default route table using the VPC id.
When I try to do that I get the following error:
$ terraform import 'aws_default_route_table.aws-vpc' vpc-12345678
Error: resource aws_default_route_table doesn't support import
I tried to use the route table ID itself, just in case the documentation is inaccurate, but I get the same error.
I imported successfully the VPC the route table belongs to and tried again to import the route table to no avail.
For context - the reason I need to import the default route table is to enable route propagation for VPN gateway as in:
resource aws_default_route_table aws-vpc {
default_route_table_id = var.aws_default_route_table_id
route {
cidr_block = "0.0.0.0/0"
gateway_id = var.aws_internet_gateway_id
}
propagating_vgws = [
aws_vpn_gateway.aws-vpn-gw.id
]
}
Am I missing something, or is it really impossible to import an existing default route table into terraform?