Skip to content

Commit 34434c4

Browse files
feat: add support for security group referencing to transit-gateway module
AWS recently introduced security group referencing for Transit Gateway VPC attachments. This feature was available in the standalone resource `aws_ec2_transit_gateway_vpc_attachment` but not in the transit-gateway module. Added support for it in the module.
1 parent 8c2d966 commit 34434c4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

examples/complete/main.tf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ module "tgw" {
3434

3535
vpc_attachments = {
3636
vpc1 = {
37-
vpc_id = module.vpc1.vpc_id
38-
subnet_ids = module.vpc1.private_subnets
39-
dns_support = true
40-
ipv6_support = true
37+
vpc_id = module.vpc1.vpc_id
38+
subnet_ids = module.vpc1.private_subnets
39+
security_group_referencing_support = true
40+
dns_support = true
41+
ipv6_support = true
4142

4243
transit_gateway_default_route_table_association = false
4344
transit_gateway_default_route_table_propagation = false

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ resource "aws_ec2_transit_gateway_vpc_attachment" "this" {
7373
dns_support = try(each.value.dns_support, true) ? "enable" : "disable"
7474
ipv6_support = try(each.value.ipv6_support, false) ? "enable" : "disable"
7575
appliance_mode_support = try(each.value.appliance_mode_support, false) ? "enable" : "disable"
76+
security_group_referencing_support = try(each.value.security_group_referencing_support, false) ? "enable" : "disable"
7677
transit_gateway_default_route_table_association = try(each.value.transit_gateway_default_route_table_association, true)
7778
transit_gateway_default_route_table_propagation = try(each.value.transit_gateway_default_route_table_propagation, true)
7879

0 commit comments

Comments
 (0)