Home > Software engineering >  How to reference AWS local prefix list in terraform route table?
How to reference AWS local prefix list in terraform route table?

Time:12-23

If I have the below route table, how can create a route which uses the AWS local prefix list?

resource "aws_route_table" "public" {
  vpc_id = aws_vpc.vpc.id

  route {
    cidr_block = "0.0.0.0/0"
    gateway_id = aws_internet_gateway.igw.id
  }

  route {
    cidr_block = "10.0.0.0/16"
    destination_prefix_list_id = "local"
  }

  tags = {
    Name = "public"
  }
}

enter image description here

CodePudding user response:

The local route is always present by default. You don't have to do anything to add it, nor you can remove it.

  • Related