Skip to content

Commit

Permalink
Update networking.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
hargitayjpl authored May 28, 2024
1 parent e5638b3 commit a516b27
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions terraform-unity/networking.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
data "local_file" "unity_yaml" {
filename = "/home/ubuntu/.unity/unity.yaml"
}
locals {
unity_config = yamldecode(data.local_file.unity_yaml.content)
project = local.unity_config.project
venue = local.unity_config.venue
}

# Create an Application Load Balancer (ALB)
resource "aws_lb" "httpd_alb" {
name = "${var.deployment_name}-httpd-alb"
Expand Down Expand Up @@ -50,8 +59,8 @@ resource "aws_lb_listener" "httpd_listener" {


resource "aws_ssm_parameter" "mgmt_endpoint" {
name = "/unity/cs/management/httpd/loadbalancer-url"
name = "/unity/${local.project}/${local.venue}/management/httpd/loadbalancer-url"
type = "String"
value = "${aws_lb_listener.httpd_listener.protocol}://${aws_lb.httpd_alb.dns_name}:${aws_lb_listener.httpd_listener.port}/management/ui"
overwrite = true
}
}

0 comments on commit a516b27

Please sign in to comment.