I am trying to create AWS routes using aws_route block. My use-case is to create route(s) for multiple cidr blocks which will serve cross-AZ network establishment. My approach is to create a prefix list. Then pass the prefix list to the routes block under destination_prefix_list_id argument. However, I get stuck due to conflict between destination_prefix_list_id and vpc_endpoint_id arguments. I am aware of the underlying AWS API error for my use-case since my VPCE is of Gateway Load Balancer type. I need to have a work around for my use-case to avoid long list of route blocks in my code and have an iterative approach where I run my loop across a list of route table IDs and attach the prefix list IDs. I am using aws_vpc_endpoint_route_table_association referring to a previous blog (https://github.com/hashicorp/terraform-provider-aws/issues/18607). But the VPCE type is another blocker for me in that case.
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Description
I am trying to create AWS routes using aws_route block. My use-case is to create route(s) for multiple cidr blocks which will serve cross-AZ network establishment. My approach is to create a prefix list. Then pass the prefix list to the routes block under destination_prefix_list_id argument. However, I get stuck due to conflict between destination_prefix_list_id and vpc_endpoint_id arguments. I am aware of the underlying AWS API error for my use-case since my VPCE is of Gateway Load Balancer type. I need to have a work around for my use-case to avoid long list of route blocks in my code and have an iterative approach where I run my loop across a list of route table IDs and attach the prefix list IDs. I am using aws_vpc_endpoint_route_table_association referring to a previous blog (https://github.com/hashicorp/terraform-provider-aws/issues/18607). But the VPCE type is another blocker for me in that case.
AWS Provider: 5.50.0 Terraform Version: 1.8.3
Affected Resource(s) and/or Data Source(s)
aws_route aws_vpc_endpoint_route_table_association aws_ec2_managed_prefix_list
Potential Terraform Configuration
References
https://github.com/hashicorp/terraform-provider-aws/issues/18607 https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_endpoint_route_table_association https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route
Would you like to implement a fix?
Yes