diff --git a/terraform/alarm.tf b/terraform/alarm.tf index 7aba5a97..6c99dcc9 100644 --- a/terraform/alarm.tf +++ b/terraform/alarm.tf @@ -343,6 +343,8 @@ resource "aws_cloudwatch_metric_alarm" "splunk_uploader_sns_topic_error_log_alar } resource "aws_cloudwatch_metric_alarm" "scale_up" { + count = contains(["dev", "test"], var.environment) ? 1 : 0 + alarm_name = "${var.environment}-${var.component_name}-scale-up" comparison_operator = "GreaterThanOrEqualToThreshold" evaluation_periods = "1" @@ -376,6 +378,8 @@ resource "aws_cloudwatch_metric_alarm" "scale_up" { } resource "aws_cloudwatch_metric_alarm" "scale_down" { + count = contains(["dev", "test"], var.environment) ? 1 : 0 + alarm_name = "${var.environment}-${var.component_name}-scale-down" comparison_operator = "GreaterThanOrEqualToThreshold" evaluation_periods = "1" diff --git a/terraform/pre-prod.tfvars b/terraform/pre-prod.tfvars index 404a641f..79e8d379 100644 --- a/terraform/pre-prod.tfvars +++ b/terraform/pre-prod.tfvars @@ -3,6 +3,6 @@ environment = "pre-prod" task_cpu = 512 task_memory = 1024 -service_desired_count = "0" +service_desired_count = "1" log_level = "info" \ No newline at end of file diff --git a/terraform/prod.tfvars b/terraform/prod.tfvars index fe20d3fb..82d1c7d8 100644 --- a/terraform/prod.tfvars +++ b/terraform/prod.tfvars @@ -3,6 +3,6 @@ environment = "prod" task_cpu = 512 task_memory = 1024 -service_desired_count = "0" +service_desired_count = "1" log_level = "info" \ No newline at end of file