diff --git a/terraform/environment/region/modules/ecs_autoscaling/main.tf b/terraform/environment/region/modules/ecs_autoscaling/main.tf index b7f92aa086..2333b5e059 100644 --- a/terraform/environment/region/modules/ecs_autoscaling/main.tf +++ b/terraform/environment/region/modules/ecs_autoscaling/main.tf @@ -5,6 +5,8 @@ resource "aws_appautoscaling_target" "ecs_service" { role_arn = var.ecs_autoscaling_service_role_arn max_capacity = var.ecs_task_autoscaling_maximum min_capacity = var.ecs_task_autoscaling_minimum + + provider = aws.region } # Automatically scale capacity up by one @@ -26,6 +28,8 @@ resource "aws_appautoscaling_policy" "up" { } depends_on = [aws_appautoscaling_target.ecs_service] + + provider = aws.region } # Automatically scale capacity down by one @@ -47,6 +51,8 @@ resource "aws_appautoscaling_policy" "down" { } depends_on = [aws_appautoscaling_target.ecs_service] + + provider = aws.region } resource "aws_cloudwatch_metric_alarm" "scale_up" { @@ -113,6 +119,8 @@ resource "aws_cloudwatch_metric_alarm" "scale_up" { } } alarm_actions = [aws_appautoscaling_policy.up.arn] + + provider = aws.region } resource "aws_cloudwatch_metric_alarm" "scale_down" { @@ -179,6 +187,8 @@ resource "aws_cloudwatch_metric_alarm" "scale_down" { } } alarm_actions = [aws_appautoscaling_policy.down.arn] + + provider = aws.region } @@ -198,4 +208,6 @@ resource "aws_cloudwatch_metric_alarm" "max_scaling_reached" { ServiceName = var.aws_ecs_service_name ClusterName = var.aws_ecs_cluster_name } + + provider = aws.region } diff --git a/terraform/environment/region/pagerduty.tf b/terraform/environment/region/pagerduty.tf index b423650029..a308f2872d 100644 --- a/terraform/environment/region/pagerduty.tf +++ b/terraform/environment/region/pagerduty.tf @@ -11,6 +11,8 @@ resource "pagerduty_service_integration" "cloudwatch_integration" { resource "aws_sns_topic" "cloudwatch_to_pagerduty" { name = "CloudWatch-to-PagerDuty-${var.environment_name}" kms_master_key_id = data.aws_kms_alias.pagerduty_sns.target_key_arn + + provider = aws.region } resource "aws_sns_topic_subscription" "cloudwatch_sns_subscription" { @@ -18,4 +20,6 @@ resource "aws_sns_topic_subscription" "cloudwatch_sns_subscription" { protocol = "https" endpoint_auto_confirms = true endpoint = "https://events.pagerduty.com/integration/${pagerduty_service_integration.cloudwatch_integration.integration_key}/enqueue" + + provider = aws.region } diff --git a/terraform/environment/region/ship_to_metrics.tf b/terraform/environment/region/ship_to_metrics.tf index 72c6c0705e..f34861969b 100644 --- a/terraform/environment/region/ship_to_metrics.tf +++ b/terraform/environment/region/ship_to_metrics.tf @@ -20,6 +20,8 @@ resource "aws_cloudwatch_log_subscription_filter" "events" { filter_pattern = "{ $.context.event_code = * }" destination_arn = data.aws_lambda_function.clsf_to_sqs[0].arn depends_on = [aws_lambda_permission.allow_cloudwatch] + + provider = aws.region } resource "aws_lambda_permission" "allow_cloudwatch" { @@ -29,4 +31,6 @@ resource "aws_lambda_permission" "allow_cloudwatch" { function_name = data.aws_lambda_function.clsf_to_sqs[0].function_name principal = "logs.${data.aws_region.current.name}.amazonaws.com" source_arn = "${aws_cloudwatch_log_group.application_logs.arn}:*" + + provider = aws.region }