diff --git a/modules/internal/autoscaling/main.tf b/modules/internal/autoscaling/main.tf index a48adcf..0d7b213 100644 --- a/modules/internal/autoscaling/main.tf +++ b/modules/internal/autoscaling/main.tf @@ -50,7 +50,7 @@ resource "aws_appautoscaling_policy" "down" { # CloudWatch alarm that triggers the autoscaling up policy resource "aws_cloudwatch_metric_alarm" "service_cpu_high" { - alarm_name = "${terraform.workspace}_cpu_utilization_high" + alarm_name = "${var.service_name}_cpu_utilization_high" comparison_operator = "GreaterThanOrEqualToThreshold" evaluation_periods = "2" metric_name = "CPUUtilization" @@ -69,7 +69,7 @@ resource "aws_cloudwatch_metric_alarm" "service_cpu_high" { # CloudWatch alarm that triggers the autoscaling down policy resource "aws_cloudwatch_metric_alarm" "service_cpu_low" { - alarm_name = "${terraform.workspace}_cpu_utilization_low" + alarm_name = "${var.service_name}_cpu_utilization_low" comparison_operator = "LessThanOrEqualToThreshold" evaluation_periods = "2" metric_name = "CPUUtilization"