From 751d0b6be9cffe83e13d088d2a4f040a3fd81e30 Mon Sep 17 00:00:00 2001 From: Kieran Brown Date: Tue, 23 Jan 2024 12:17:31 +0000 Subject: [PATCH] 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, {