Browse Source

Merge pull request #245 from mdr-engineering/feature/ftd_MSOCI-1852_AllowOutbound587

Adds 587 to the outbound security group for all hosts
Frederick Damstra 4 years ago
parent
commit
609f2142b7
1 changed files with 11 additions and 0 deletions
  1. 11 0
      submodules/security_group/typical_host/main.tf

+ 11 - 0
submodules/security_group/typical_host/main.tf

@@ -226,6 +226,17 @@ resource "aws_security_group_rule" "outbound_to_mailrelay_25" {
   count             = length(var.cidr_map["vpc-system-services"]) > 0 ? 1 : 0
 }
 
+resource "aws_security_group_rule" "outbound_to_mailrelay_587" {
+  security_group_id = aws_security_group.security_group.id
+  type              = "egress"
+  description       = "Outbound Email to mailrelay"
+  from_port         = 587
+  to_port           = 587
+  protocol          = "tcp"
+  cidr_blocks       = var.cidr_map["vpc-system-services"]
+  count             = length(var.cidr_map["vpc-system-services"]) > 0 ? 1 : 0
+}
+
 resource "aws_security_group_rule" "outbound_to_ec2_s3_endpoint" {
   security_group_id = aws_security_group.security_group.id
   type              = "egress"