diff --git a/modules/aws/networking/tgw-vpc-attachment/README.md b/modules/aws/networking/tgw-vpc-attachment/README.md index 0b11263..e925929 100644 --- a/modules/aws/networking/tgw-vpc-attachment/README.md +++ b/modules/aws/networking/tgw-vpc-attachment/README.md @@ -38,6 +38,7 @@ No requirements. |------|-------------|------|---------|:--------:| | [attachment\_subnet\_ids](#input\_attachment\_subnet\_ids) | A map of dedicated /28 subnet IDs for each AZ. The keys must match the AZ names provided in `azs`. | `map(string)` | n/a | yes | | [azs](#input\_azs) | List of Availability Zones for which the dedicated /28 subnets exist. The order of the AZs determines the order of subnets used in the attachment. | `list(string)` | n/a | yes | +| [transit\_gateway\_default\_route\_table\_propagation](#input\_transit\_gateway\_default\_route\_table\_propagation) | (Optional) Boolean whether the VPC Attachment should propagate routes with the EC2 Transit Gateway propagation default route table. | `bool` | `true` | no | | [transit\_gateway\_id](#input\_transit\_gateway\_id) | The ID of the Transit Gateway. | `string` | n/a | yes | | [vpc\_id](#input\_vpc\_id) | The ID of the VPC to attach. | `string` | n/a | yes | ## Outputs diff --git a/modules/aws/networking/tgw-vpc-attachment/main.tf b/modules/aws/networking/tgw-vpc-attachment/main.tf index 184d038..91437e9 100644 --- a/modules/aws/networking/tgw-vpc-attachment/main.tf +++ b/modules/aws/networking/tgw-vpc-attachment/main.tf @@ -7,8 +7,9 @@ locals { } resource "aws_ec2_transit_gateway_vpc_attachment" "twg_vpc" { - transit_gateway_id = var.transit_gateway_id - vpc_id = var.vpc_id - subnet_ids = local.ordered_attachment_subnet_ids + transit_gateway_id = var.transit_gateway_id + vpc_id = var.vpc_id + subnet_ids = local.ordered_attachment_subnet_ids + transit_gateway_default_route_table_propagation = var.transit_gateway_default_route_table_propagation } diff --git a/modules/aws/networking/tgw-vpc-attachment/variables.tf b/modules/aws/networking/tgw-vpc-attachment/variables.tf index e1eba2a..0730058 100644 --- a/modules/aws/networking/tgw-vpc-attachment/variables.tf +++ b/modules/aws/networking/tgw-vpc-attachment/variables.tf @@ -25,3 +25,8 @@ variable "attachment_subnet_ids" { # } } +variable "transit_gateway_default_route_table_propagation" { + description = "(Optional) Boolean whether the VPC Attachment should propagate routes with the EC2 Transit Gateway propagation default route table." + type = bool + default = true +}