Skip to content

Commit

Permalink
Merge pull request #5254 from ministryofjustice/Update_060324_9
Browse files Browse the repository at this point in the history
Update 060324 9
  • Loading branch information
nbuckingham72 authored Mar 6, 2024
2 parents bdb922a + f9e4321 commit 61e63ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions terraform/environments/ppud/lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand All @@ -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 19 ? * WED *)" # Time Zone is in UTC
}

resource "aws_cloudwatch_event_target" "trigger_lambda_enable_cpu_alarm" {
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit 61e63ff

Please sign in to comment.