Skip to content

Commit

Permalink
Merge pull request #25 from companieshouse/feature/update-sg-rules
Browse files Browse the repository at this point in the history
Add temporary rules for testing with on-prem servers in live
  • Loading branch information
marcransome authored Jun 9, 2021
2 parents ca074e4 + deb4a9e commit cc62ad1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
13 changes: 13 additions & 0 deletions groups/frontend/instance.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,19 @@ resource "aws_security_group" "services" {
}
}

# TODO Remove this; this was added for testing Tuxedo services in live using on-premise frontend services
dynamic "ingress" {
for_each = var.environment == "live" ? each.value : {}
iterator = service
content {
description = "Allow client requests from on-premise frontend web servers to ${service.key} service in ${each.key} server group"
from_port = service.value
to_port = service.value
protocol = "TCP"
cidr_blocks = [var.on_premise_frontend_cidr]
}
}

dynamic "ingress" {
for_each = each.value
iterator = service
Expand Down
7 changes: 7 additions & 0 deletions groups/frontend/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ variable "lvm_block_devices" {
default = []
}

# TODO Remove this; this was added for testing Tuxedo services in live using on-premise frontend services
variable "on_premise_frontend_cidr" {
type = string
description = "A string representing the CIDR range for on-premise frontend services"
default = ""
}

variable "region" {
type = string
description = "The AWS region in which resources will be administered"
Expand Down

0 comments on commit cc62ad1

Please sign in to comment.