[Enhancement]: Need a feature to work with vpc_endpoint_id and destination_prefix_list_id to create AWS routes #39916
Labels
enhancement
Requests to existing resources that expand the functionality or scope.
service/vpc
Issues and PRs that pertain to the vpc service.
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 (#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
#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
The text was updated successfully, but these errors were encountered: