From 33788b6e9ced96d970888a6901c5f2dce7457bd6 Mon Sep 17 00:00:00 2001 From: Matthias Naber Date: Thu, 21 Sep 2023 15:54:20 +0200 Subject: [PATCH] feat: new output `alb_target_group_names` To be used in conjunction with [AppAutoscaling](https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_PredefinedScalingMetricSpecification.html) with `ALBRequestCountPerTarget` --- main.tf | 1 + outputs.tf | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.tf b/main.tf index eeae3e3..4974a85 100644 --- a/main.tf +++ b/main.tf @@ -275,6 +275,7 @@ resource "aws_appautoscaling_policy" "ecs" { predefined_metric_specification { predefined_metric_type = lookup(var.appautoscaling_settings, "predefined_metric_type", "ECSServiceAverageCPUUtilization") + resource_label = lookup(var.appautoscaling_settings, "resource_label") } } } diff --git a/outputs.tf b/outputs.tf index 68a5d8f..615125e 100644 --- a/outputs.tf +++ b/outputs.tf @@ -54,8 +54,7 @@ output "task_execution_role_unique_id" { value = try(aws_iam_role.task_execution_role[0].unique_id, "") } -// TODO: this output should not start with "aws" -output "aws_alb_target_group_arns" { +output "alb_target_group_arns" { description = "ARNs of the created target groups." value = aws_alb_target_group.main[*].arn -} +} \ No newline at end of file