Skip to content

Commit

Permalink
Added support for additional VPC cidr block associations
Browse files Browse the repository at this point in the history
  • Loading branch information
kieranbrown committed Jan 23, 2024
1 parent d30df52 commit 751d0b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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, {
Expand Down

0 comments on commit 751d0b6

Please sign in to comment.