From d4e6cdbf2b717e3c212419219cb22f5f170f16ec Mon Sep 17 00:00:00 2001 From: Angelos Kyratzakos Date: Tue, 1 Oct 2024 17:05:42 +0300 Subject: [PATCH] add referencing tgw sg support for tgw attachments --- aws/transit-gateway-attachment/README.md | 4 ++-- aws/transit-gateway-attachment/main.tf | 7 ++++--- aws/transit-gateway-attachment/variables.tf | 6 ++++++ aws/transit-gateway-attachment/versions.tf | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/aws/transit-gateway-attachment/README.md b/aws/transit-gateway-attachment/README.md index 2fd6f4b6..5d3f65df 100644 --- a/aws/transit-gateway-attachment/README.md +++ b/aws/transit-gateway-attachment/README.md @@ -3,13 +3,13 @@ | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.6.3 | -| [aws](#requirement\_aws) | >= 5.41.0 | +| [aws](#requirement\_aws) | >= 5.69.0 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.41.0 | +| [aws](#provider\_aws) | >= 5.69.0 | ## Modules diff --git a/aws/transit-gateway-attachment/main.tf b/aws/transit-gateway-attachment/main.tf index 3b8877eb..1997b695 100644 --- a/aws/transit-gateway-attachment/main.tf +++ b/aws/transit-gateway-attachment/main.tf @@ -1,7 +1,8 @@ resource "aws_ec2_transit_gateway_vpc_attachment" "this" { - subnet_ids = var.subnet_ids - transit_gateway_id = var.transit_gateway_id - vpc_id = var.vpc_id + subnet_ids = var.subnet_ids + transit_gateway_id = var.transit_gateway_id + vpc_id = var.vpc_id + security_group_referencing_support = var.security_group_referencing_support tags = { Name = var.name diff --git a/aws/transit-gateway-attachment/variables.tf b/aws/transit-gateway-attachment/variables.tf index 8f47bae5..89c0eebe 100644 --- a/aws/transit-gateway-attachment/variables.tf +++ b/aws/transit-gateway-attachment/variables.tf @@ -14,3 +14,9 @@ variable "name" { description = "The name tag of the tgw attachment" type = string } + +variable "security_group_referencing_support" { + description = "Security Group Referencing allows to specify other SGs as references, or matching criterion in inbound security rules to allow instance-to-instance traffic" + type = string + default = "disable" +} diff --git a/aws/transit-gateway-attachment/versions.tf b/aws/transit-gateway-attachment/versions.tf index 9b6c635e..7feb0e04 100644 --- a/aws/transit-gateway-attachment/versions.tf +++ b/aws/transit-gateway-attachment/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.41.0" + version = ">= 5.69.0" } } }