如何在 terraform route table 中引用 AWS 本地前缀列表?
How to reference AWS local prefix list in terraform route table?
如果我有以下路由 table,如何创建使用 AWS local
前缀列表的路由?
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"
}
}
local
路由始终默认 存在。您无需执行任何操作即可添加它,也可以将其删除。
如果我有以下路由 table,如何创建使用 AWS local
前缀列表的路由?
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"
}
}
local
路由始终默认 存在。您无需执行任何操作即可添加它,也可以将其删除。