Skip to content

Commit

Permalink
Configure routing for marlowe-finance.io
Browse files Browse the repository at this point in the history
Configure the load balancer to route:

- play.marlowe-finance.io -> production.marlowe.iohkdev.io
- run.marlowe-finance.io -> production.marlowe-dash.iohkdev.io
- marlowe-finance.io -> production.marlowe-web.iohkdev.io

The configuration only includes forwarding based on `host_header`
values and does not configure any certificates.
  • Loading branch information
gilligan committed May 4, 2021
1 parent b30fe5d commit f8a5122
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions deployment/terraform/loadbalancing.tf
Expand Up @@ -348,3 +348,55 @@ resource "aws_route53_record" "plutus_playground_alb" {
evaluate_target_health = true
}
}


#
# Production: marlowe-finance.io forwarding
#

resource "aws_alb_listener_rule" "marlowe-finance-marlowe-web" {
listener_arn = aws_alb_listener.playground.arn
action {
type = "forward"
target_group_arn = aws_alb_target_group.marlowe_web.id
}

condition {
host_header {
values = ["marlowe-finance.io"]
}
}
}

resource "aws_alb_listener_rule" "marlowe-finance-marlowe-dash" {
depends_on = [aws_alb_target_group.marlowe_dash]
listener_arn = aws_alb_listener.playground.arn

action {
type = "forward"
target_group_arn = aws_alb_target_group.marlowe_dash.id
}

condition {
host_header {
values = ["run.marlowe-finance.io"]
}
}
}

resource "aws_alb_listener_rule" "marlowe-finance-marlowe-playground" {
depends_on = [aws_alb_target_group.marlowe_playground]
listener_arn = aws_alb_listener.playground.arn

action {
type = "forward"
target_group_arn = aws_alb_target_group.marlowe_playground.id
}

condition {
host_header {
values = ["play.marlowe-finance.io"]
}
}
}

0 comments on commit f8a5122

Please sign in to comment.