From 751d0b6be9cffe83e13d088d2a4f040a3fd81e30 Mon Sep 17 00:00:00 2001 From: Kieran Brown Date: Tue, 23 Jan 2024 12:17:31 +0000 Subject: [PATCH 1/2] Added support for additional VPC cidr block associations --- main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 482cb21..8c529dd 100644 --- a/main.tf +++ b/main.tf @@ -23,7 +23,7 @@ resource "aws_security_group" "main" { from_port = 0 to_port = 0 protocol = "-1" - cidr_blocks = ["${data.aws_vpc.main.cidr_block}"] + cidr_blocks = data.aws_vpc.main.cidr_block_associations[*].cidr_block } egress { @@ -43,7 +43,7 @@ resource "aws_security_group" "main" { resource "aws_network_interface" "main" { description = "${var.name} static private ENI" subnet_id = var.subnet_id - security_groups = [aws_security_group.main.id] + security_groups = local.security_groups source_dest_check = false tags = merge(var.tags, { From f24486f91f1aafd68d75dbe542504c100658985b Mon Sep 17 00:00:00 2001 From: Kieran Brown Date: Sun, 25 Feb 2024 12:56:29 +0000 Subject: [PATCH 2/2] chore: revert network interface sg changes --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 8c529dd..e44d5bf 100644 --- a/main.tf +++ b/main.tf @@ -43,7 +43,7 @@ resource "aws_security_group" "main" { resource "aws_network_interface" "main" { description = "${var.name} static private ENI" subnet_id = var.subnet_id - security_groups = local.security_groups + security_groups = [aws_security_group.main.id] source_dest_check = false tags = merge(var.tags, {