From 9acaeae7bca46de481f10e4fe1f5250e7a9c1fa5 Mon Sep 17 00:00:00 2001 From: Buckingham Date: Wed, 6 Mar 2024 15:56:47 +0000 Subject: [PATCH 1/2] Update_060324_8 --- terraform/environments/ppud/lambda.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/terraform/environments/ppud/lambda.tf b/terraform/environments/ppud/lambda.tf index b4ce982cf0a..28a6ac4aad1 100644 --- a/terraform/environments/ppud/lambda.tf +++ b/terraform/environments/ppud/lambda.tf @@ -119,7 +119,7 @@ resource "aws_cloudwatch_event_rule" "disable_cpu_alarm" { count = local.is-production == true ? 1 : 0 name = "disable_cpu_alarm" description = "Runs Weekly every Saturday at 00:00am GMT" - schedule_expression = "cron(30 14 ? * WED *)" # Time Zone is in UTC + schedule_expression = "cron(30 16 ? * WED *)" # Time Zone is in UTC } resource "aws_cloudwatch_event_target" "trigger_lambda_disable_cpu_alarm" { @@ -144,7 +144,7 @@ resource "aws_cloudwatch_event_rule" "enable_cpu_alarm" { count = local.is-production == true ? 1 : 0 name = "enable_cpu_alarm" description = "Runs Weekly every Sunday at 08:00pm GMT" - schedule_expression = "cron(0 15 ? * WED *)" # Time Zone is in UTC + schedule_expression = "cron(0 17 ? * WED *)" # Time Zone is in UTC } resource "aws_cloudwatch_event_target" "trigger_lambda_enable_cpu_alarm" { @@ -172,7 +172,7 @@ resource "aws_lambda_permission" "allow_cloudwatch_to_enable_cpu_alarm" { resource "aws_lambda_function" "terraform_lambda_disable_cpu_alarm" { count = local.is-production == true ? 1 : 0 filename = "${path.module}/disable_cpu_alarm/disable_cpu_alarm.zip" - function_name = "disable_cpu_alarm_function" + function_name = "disable_cpu_alarm" role = aws_iam_role.lambda_role[0].arn handler = "disable_cpu_alarm.lambda_handler" runtime = "python3.12" @@ -184,7 +184,7 @@ resource "aws_lambda_function" "terraform_lambda_disable_cpu_alarm" { resource "aws_lambda_function" "terraform_lambda_enable_cpu_alarm" { count = local.is-production == true ? 1 : 0 filename = "${path.module}/enable_cpu_alarm/enable_cpu_alarm.zip" - function_name = "enable_cpu_alarm_function" + function_name = "enable_cpu_alarm" role = aws_iam_role.lambda_role[0].arn handler = "enable_cpu_alarm.lambda_handler" runtime = "python3.12" From f9e432131d884a2bcbaa0d1aa8164adc8f827bcc Mon Sep 17 00:00:00 2001 From: Buckingham Date: Wed, 6 Mar 2024 15:59:29 +0000 Subject: [PATCH 2/2] Update_060324_9 --- terraform/environments/ppud/lambda.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/environments/ppud/lambda.tf b/terraform/environments/ppud/lambda.tf index 28a6ac4aad1..f9af53e36fa 100644 --- a/terraform/environments/ppud/lambda.tf +++ b/terraform/environments/ppud/lambda.tf @@ -144,7 +144,7 @@ resource "aws_cloudwatch_event_rule" "enable_cpu_alarm" { count = local.is-production == true ? 1 : 0 name = "enable_cpu_alarm" description = "Runs Weekly every Sunday at 08:00pm GMT" - schedule_expression = "cron(0 17 ? * WED *)" # Time Zone is in UTC + schedule_expression = "cron(0 19 ? * WED *)" # Time Zone is in UTC } resource "aws_cloudwatch_event_target" "trigger_lambda_enable_cpu_alarm" {