diff --git a/example/main.tf b/example/main.tf index 1b929e2..bc26b8a 100644 --- a/example/main.tf +++ b/example/main.tf @@ -19,7 +19,7 @@ resource "aws_key_pair" "cluster_key" { } module "ecs_cluster" { - source = "github.com/kpenfound/ecs-cluster?ref=1.1.0" + source = "github.com/kpenfound/ecs-cluster?ref=1.1.2" region = var.region ecs_ami = var.ecs_ami diff --git a/main.tf b/main.tf index f7049c2..dbcfe5e 100644 --- a/main.tf +++ b/main.tf @@ -110,6 +110,13 @@ resource "aws_security_group" "cluster_instance" { self = true } + ingress { + from_port = "0" + to_port = "0" + protocol = "-1" + security_groups = var.allowed_sgs + } + egress { from_port = 0 to_port = 0 diff --git a/variables.tf b/variables.tf index 7a8dcba..8e5f30b 100644 --- a/variables.tf +++ b/variables.tf @@ -35,3 +35,8 @@ variable vpc_id { variable subnets { description = "List of subnet ids to deploy the ECS cluster in" } + +variable allowed_sgs { + description = "List of security groups to allow for ecs cluster ingress" + default = [] +}