Skip to content

Commit

Permalink
fix routing
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Oct 17, 2022
1 parent 9056d90 commit ba5f0ab
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions vpc-transit-gateway-association-data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ No modules.
| <a name="input_create"></a> [create](#input\_create) | Flag to indicate whether to create the resources or not (default: true) | `bool` | `true` | no |
| <a name="input_network_account_profile"></a> [network\_account\_profile](#input\_network\_account\_profile) | AWS profile of the source account sharing the VPC resources | `string` | n/a | yes |
| <a name="input_override_prefixes"></a> [override\_prefixes](#input\_override\_prefixes) | Override built-in prefixes by component. This should be used primarily for common infrastructure things | `map(string)` | `{}` | no |
| <a name="input_private_route_table_ids"></a> [private\_route\_table\_ids](#input\_private\_route\_table\_ids) | Map of private route table IDs (which exclude the attachment subnets) | `map(string)` | `{}` | no |
| <a name="input_private_subnets_ids"></a> [private\_subnets\_ids](#input\_private\_subnets\_ids) | List of private subnet objects including: subnet, label, availability\_zone, id | <pre>list(object({<br> subnet = string<br> label = string<br> availability_zone = string<br> id = string<br> }))</pre> | `[]` | no |
| <a name="input_route_prefix_list_name"></a> [route\_prefix\_list\_name](#input\_route\_prefix\_list\_name) | Shared prefix list name used for routing to TGW. It is comprised of all of the network CIDR blocks in AWS using TGW. | `string` | `"transit-gateway.prod"` | no |
| <a name="input_route_table_label"></a> [route\_table\_label](#input\_route\_table\_label) | Route table lable for the attachment subnets | `string` | `"attachment"` | no |
Expand Down
5 changes: 5 additions & 0 deletions vpc-transit-gateway-association-data/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,8 @@ variable "transit_gateway_label" {
## type = list(string)
## }

variable "private_route_table_ids" {
description = "Map of private route table IDs (which exclude the attachment subnets)"
type = map(string)
default = {}
}
1 change: 1 addition & 0 deletions vpc-transit-gateway-association/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ This sets up the necessary transit gateway configuration for attaching a VPC wit
| <a name="input_data_input"></a> [data\_input](#input\_data\_input) | Map of data generated by vpc-transit-gateway-association-data | <pre>object({<br> availablity_zone = map(any)<br> gateway_self = string<br> gateway_peer = string<br> route_tables_self = map(any)<br> route_tables_peer = map(any)<br> map_route_tables_self = map(any)<br> map_route_tables_peer = map(any)<br> prefix_list_id_ipv4 = string<br> })</pre> | n/a | yes |
| <a name="input_network_account_profile"></a> [network\_account\_profile](#input\_network\_account\_profile) | AWS profile of the source account sharing the VPC resources | `string` | n/a | yes |
| <a name="input_override_prefixes"></a> [override\_prefixes](#input\_override\_prefixes) | Override built-in prefixes by component. This should be used primarily for common infrastructure things | `map(string)` | `{}` | no |
| <a name="input_private_route_table_ids"></a> [private\_route\_table\_ids](#input\_private\_route\_table\_ids) | Map of private route table IDs (which exclude the attachment subnets) | `map(string)` | `{}` | no |
| <a name="input_private_subnets_ids"></a> [private\_subnets\_ids](#input\_private\_subnets\_ids) | List of private subnet objects including: subnet, label, availability\_zone, id | <pre>list(object({<br> subnet = string<br> label = string<br> availability_zone = string<br> id = string<br> }))</pre> | `[]` | no |
| <a name="input_route_prefix_list_name"></a> [route\_prefix\_list\_name](#input\_route\_prefix\_list\_name) | Shared prefix list name used for routing to TGW. It is comprised of all of the network CIDR blocks in AWS using TGW. | `string` | `"transit-gateway.prod"` | no |
| <a name="input_route_table_label"></a> [route\_table\_label](#input\_route\_table\_label) | Route table lable for the attachment subnets | `string` | `"attachment"` | no |
Expand Down
2 changes: 1 addition & 1 deletion vpc-transit-gateway-association/routing.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ resource "null_resource" "vpc_attachment_exists" {

# pick the first prefix list found, either NAME or NAME.ipv4
resource "aws_route" "gateway_ipv4" {
for_each = var.transit_gateway_routing_type == "self" ? module.routing_attachment_ipv4[0].private_route_table_ids : {}
for_each = var.transit_gateway_routing_type == "self" ? var.private_route_table_ids : {}

route_table_id = each.value
# destination_cidr_block = "10.128.0.0/16"
Expand Down
5 changes: 5 additions & 0 deletions vpc-transit-gateway-association/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,8 @@ variable "transit_gateway_label" {
## type = list(string)
## }

variable "private_route_table_ids" {
description = "Map of private route table IDs (which exclude the attachment subnets)"
type = map(string)
default = {}
}

0 comments on commit ba5f0ab

Please sign in to comment.