Skip to content

Commit cc62ad1

Browse files
authored
Merge pull request #25 from companieshouse/feature/update-sg-rules
Add temporary rules for testing with on-prem servers in live
2 parents ca074e4 + deb4a9e commit cc62ad1

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

groups/frontend/instance.tf

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

88+
# TODO Remove this; this was added for testing Tuxedo services in live using on-premise frontend services
89+
dynamic "ingress" {
90+
for_each = var.environment == "live" ? each.value : {}
91+
iterator = service
92+
content {
93+
description = "Allow client requests from on-premise frontend web servers to ${service.key} service in ${each.key} server group"
94+
from_port = service.value
95+
to_port = service.value
96+
protocol = "TCP"
97+
cidr_blocks = [var.on_premise_frontend_cidr]
98+
}
99+
}
100+
88101
dynamic "ingress" {
89102
for_each = each.value
90103
iterator = service

groups/frontend/variables.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ variable "lvm_block_devices" {
8282
default = []
8383
}
8484

85+
# TODO Remove this; this was added for testing Tuxedo services in live using on-premise frontend services
86+
variable "on_premise_frontend_cidr" {
87+
type = string
88+
description = "A string representing the CIDR range for on-premise frontend services"
89+
default = ""
90+
}
91+
8592
variable "region" {
8693
type = string
8794
description = "The AWS region in which resources will be administered"

0 commit comments

Comments
 (0)