You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
│ Error: Error in function call
│
│ on .terraform/modules/outbound_vpc/main.tf line 1088, in resource "aws_route" "private_nat_gateway":
│ 1088: route_table_id = element(aws_route_table.private[*].id, count.index)
│ ├────────────────
│ │ while calling element(list, index)
│ │ aws_route_table.private is empty tuple
│ │ count.index is 0
│
│ Call to function "element" failed: cannot use element function with an empty list.
Additional context
This use case comes from AWS Prescriptive Guidance around setting up network architecture. In this case, an outbound VPC would only have NAT gateways. This VPC would then have routes to it via Transit Gateway connections to other VPCs which emulates the same functionality as private subnets. This module does not support that setup in the current form.
The text was updated successfully, but these errors were encountered:
@laserpedro not quite....the egress VPC can live in another account and has just public subnets with NAT gateways living in them. You can then use a Transit Gateway to link those subnets with private subnets in separate VPCs that live in separate accounts. By creating a VPC with just public subnets for the egress VPC, you can keep the IP space small (which is desirable because this will be an internet-facing VPC after all).
Description
When creating a VPC with only public subnets and with
one_nat_gateway_per_az
configured, module fails with an error.Versions
Module version [Required]: 5.7.1
Terraform version: 1.7.5
Provider version(s): 5.45.0
Reproduction Code [Required]
Steps to reproduce the behavior:
Run a
terraform plan
orterraform apply
.Expected behavior
VPC creates without issues.
Actual behavior
Module errors out.
Terminal Output Screenshot(s)
Additional context
This use case comes from AWS Prescriptive Guidance around setting up network architecture. In this case, an outbound VPC would only have NAT gateways. This VPC would then have routes to it via Transit Gateway connections to other VPCs which emulates the same functionality as private subnets. This module does not support that setup in the current form.
The text was updated successfully, but these errors were encountered: