on main.tf line 30, in resource "aws_route_table" "you-route":
route = [
{
cidr_block = ["0.0.0.0/0"]
gateway_id = aws_internet_gateway.you-gw.id
route = null
carrier_gateway_id = ""
destination_prefix_list_id = ""
egress_only_gateway_id = ""
instance_id = aws_instance.you-instance.id
ipv6_cidr_block = ""
local_gateway_id = ""
nat_gateway_id = ""
network_interface_id = ""
transit_gateway_id = ""
vpc_endpoint_id = ""
vpc_peering_connection_id = ""
},
{
ipv6_cidr_block = ["::/0"]
gateway_id = aws_internet_gateway.you-gw.id
route = null
carrier_gateway_id = ""
destination_prefix_list_id = ""
egress_only_gateway_id = ""
instance_id = aws_instance.you-instance.id
ipv6_cidr_block = ""
local_gateway_id = ""
nat_gateway_id = ""
network_interface_id = ""
transit_gateway_id = ""
vpc_endpoint_id = ""
vpc_peering_connection_id = ""
}
]
aws_instance.you-instance。申请后才会知道我的身份aws_internet_gateway.you-gw。Id只有在apply
之后才会知道属性"route"; element 0: attribute "cidr_block": string required
cidr_block
应该是这样的
cidr_block = "0.0.0.0/0"