From 3a61b6aa1a2e923d31550dd55c088e851e06b897 Mon Sep 17 00:00:00 2001 From: Cody Fletcher Date: Mon, 23 Jan 2023 19:16:25 -0800 Subject: [PATCH 1/2] fix: Give unique alarm_name to avoid collision when default and gunicorn both create the same alarm name. (#61) --- modules/internal/autoscaling/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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" From 9d17e9199c3bc98126bc905dec8b54258621621c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 23 Jan 2023 23:00:52 -0500 Subject: [PATCH 2/2] chore(main): release 0.23.2 (#64) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 422a9a8..9d3745e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # Changelog +## [0.23.2](https://github.com/briancaffey/terraform-aws-django/compare/v0.23.1...v0.23.2) (2023-01-24) + + +### Bug Fixes + +* Give unique alarm_name to avoid collision when default and gunicorn both create the same alarm name. ([#61](https://github.com/briancaffey/terraform-aws-django/issues/61)) ([3a61b6a](https://github.com/briancaffey/terraform-aws-django/commit/3a61b6aa1a2e923d31550dd55c088e851e06b897)) + ## [0.23.1](https://github.com/briancaffey/terraform-aws-django/compare/v0.23.0...v0.23.1) (2023-01-24)