From ba2d0d5cd3240bc5ad59b13df0a8112c49daddb9 Mon Sep 17 00:00:00 2001 From: Nick Frichette Date: Sun, 6 Mar 2022 16:11:11 -0600 Subject: [PATCH] Added a new SG rule to allow attackbox to reach the target --- aws/cicdont/target_service.tf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/aws/cicdont/target_service.tf b/aws/cicdont/target_service.tf index 0d1f3e7..2b1641b 100644 --- a/aws/cicdont/target_service.tf +++ b/aws/cicdont/target_service.tf @@ -37,6 +37,15 @@ resource "aws_security_group_rule" "allow_local_http_rule" { cidr_blocks = ["${aws_instance.target_service.public_ip}/32"] } +resource "aws_security_group_rule" "allow_attackbox_inbound_rule" { + security_group_id = aws_security_group.allow_http.id + from_port = 0 + to_port = 0 + protocol = "-1" + type = "ingress" + cidr_blocks = ["${aws_instance.attackbox.public_ip}/32"] +} + data "template_file" "target_user_data" { template = file("target_service_user_data.sh") vars = {