Skip to content

Commit a516b27

Browse files
authored
Update networking.tf
1 parent e5638b3 commit a516b27

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

terraform-unity/networking.tf

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
data "local_file" "unity_yaml" {
2+
filename = "/home/ubuntu/.unity/unity.yaml"
3+
}
4+
locals {
5+
unity_config = yamldecode(data.local_file.unity_yaml.content)
6+
project = local.unity_config.project
7+
venue = local.unity_config.venue
8+
}
9+
110
# Create an Application Load Balancer (ALB)
211
resource "aws_lb" "httpd_alb" {
312
name = "${var.deployment_name}-httpd-alb"
@@ -50,8 +59,8 @@ resource "aws_lb_listener" "httpd_listener" {
5059

5160

5261
resource "aws_ssm_parameter" "mgmt_endpoint" {
53-
name = "/unity/cs/management/httpd/loadbalancer-url"
62+
name = "/unity/${local.project}/${local.venue}/management/httpd/loadbalancer-url"
5463
type = "String"
5564
value = "${aws_lb_listener.httpd_listener.protocol}://${aws_lb.httpd_alb.dns_name}:${aws_lb_listener.httpd_listener.port}/management/ui"
5665
overwrite = true
57-
}
66+
}

0 commit comments

Comments
 (0)