Skip to content

Commit ca9bc6b

Browse files
authored
Merge pull request #4 from companieshouse/feature/initial-implementation
Add security group rule for backend server requests
2 parents cacd349 + 40c6041 commit ca9bc6b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

groups/frontend/instance.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,18 @@ resource "aws_security_group" "services" {
8585
}
8686
}
8787

88+
dynamic "ingress" {
89+
for_each = each.value
90+
iterator = service
91+
content {
92+
description = "Allow client requests from backend servers to ${service.key} service in ${each.key} server group"
93+
from_port = service.value
94+
to_port = service.value
95+
protocol = "TCP"
96+
cidr_blocks = data.aws_subnet.application.*.cidr_block
97+
}
98+
}
99+
88100
tags = merge(local.common_tags, {
89101
Name = "${each.key}-${local.common_resource_name}"
90102
TuxedoServerType = each.key

0 commit comments

Comments
 (0)