From a516b27cbfa6bc35f3c621d10c95127dead32f30 Mon Sep 17 00:00:00 2001 From: Brandon Hargitay <141683542+hargitayjpl@users.noreply.github.com> Date: Tue, 28 May 2024 11:05:40 -0700 Subject: [PATCH] Update networking.tf --- terraform-unity/networking.tf | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/terraform-unity/networking.tf b/terraform-unity/networking.tf index d2289a4..1ac6d91 100644 --- a/terraform-unity/networking.tf +++ b/terraform-unity/networking.tf @@ -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" @@ -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 -} \ No newline at end of file +}