Skip to content

Commit

Permalink
adding gateway prpagtion option in module
Browse files Browse the repository at this point in the history
  • Loading branch information
ShabazzAbdulrahmanHO committed Feb 20, 2025
1 parent 3cad434 commit a23a6e2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions modules/aws/networking/tgw-vpc-attachment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ No requirements.
|------|-------------|------|---------|:--------:|
| <a name="input_attachment_subnet_ids"></a> [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 |
| <a name="input_azs"></a> [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 |
| <a name="input_transit_gateway_default_route_table_propagation"></a> [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 |
| <a name="input_transit_gateway_id"></a> [transit\_gateway\_id](#input\_transit\_gateway\_id) | The ID of the Transit Gateway. | `string` | n/a | yes |
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The ID of the VPC to attach. | `string` | n/a | yes |
## Outputs
Expand Down
7 changes: 4 additions & 3 deletions modules/aws/networking/tgw-vpc-attachment/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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

}
5 changes: 5 additions & 0 deletions modules/aws/networking/tgw-vpc-attachment/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit a23a6e2

Please sign in to comment.