From 33499215d20b56cfae0edca21f40dcfb8876cb49 Mon Sep 17 00:00:00 2001 From: rogiermccv <73637162+rogiermccv@users.noreply.github.com> Date: Mon, 20 Jun 2022 09:17:49 +0200 Subject: [PATCH 1/3] add empty egress and ingress inline definition --- main.tf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.tf b/main.tf index cbd7d7d..f47ae9a 100644 --- a/main.tf +++ b/main.tf @@ -65,6 +65,9 @@ resource "aws_security_group" "default" { description = "Security group for lambda ${var.name}" vpc_id = data.aws_subnet.selected[0].vpc_id tags = var.tags + + ingress = [] + egress = [] } resource "aws_security_group_rule" "allow_all_egress" { From d9971b7f4ee1d90c8633a4eb6a7edfe14d2cf30b Mon Sep 17 00:00:00 2001 From: rogierm Date: Mon, 20 Jun 2022 09:56:46 +0200 Subject: [PATCH 2/3] fmt --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index f47ae9a..f77b87b 100644 --- a/main.tf +++ b/main.tf @@ -65,7 +65,7 @@ resource "aws_security_group" "default" { description = "Security group for lambda ${var.name}" vpc_id = data.aws_subnet.selected[0].vpc_id tags = var.tags - + ingress = [] egress = [] } From 8eafc1ccfcff724f0dfbe5386311f0d539eecfb2 Mon Sep 17 00:00:00 2001 From: rogiermccv <73637162+rogiermccv@users.noreply.github.com> Date: Mon, 20 Jun 2022 16:37:14 +0200 Subject: [PATCH 3/3] order ingress and egress vars alphabetically --- main.tf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.tf b/main.tf index f77b87b..100be7f 100644 --- a/main.tf +++ b/main.tf @@ -63,11 +63,10 @@ resource "aws_security_group" "default" { count = var.subnet_ids != null ? 1 : 0 name = var.name description = "Security group for lambda ${var.name}" + egress = [] + ingress = [] vpc_id = data.aws_subnet.selected[0].vpc_id tags = var.tags - - ingress = [] - egress = [] } resource "aws_security_group_rule" "allow_all_egress" {