From f9f07c07ffb78f5057f6bc2a5b5c1e905b816453 Mon Sep 17 00:00:00 2001 From: Robert Sweetman Date: Wed, 8 Jan 2025 15:51:15 +0000 Subject: [PATCH] add standard alarms to pp-onr-bods-1 (#9255) * add standard alarms to pp-onr-bods-1 * fix ami name for t2 onr * add missing alarms --- .../oasys-national-reporting/locals_ec2_instances.tf | 3 +++ .../oasys-national-reporting/locals_preproduction.tf | 1 - terraform/environments/oasys-national-reporting/locals_test.tf | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/terraform/environments/oasys-national-reporting/locals_ec2_instances.tf b/terraform/environments/oasys-national-reporting/locals_ec2_instances.tf index e68f62a5ed8..cd393770985 100644 --- a/terraform/environments/oasys-national-reporting/locals_ec2_instances.tf +++ b/terraform/environments/oasys-national-reporting/locals_ec2_instances.tf @@ -50,6 +50,9 @@ locals { update-ssm-agent = "patchgroup1" } cloudwatch_metric_alarms = merge( + module.baseline_presets.cloudwatch_metric_alarms.ec2, + module.baseline_presets.cloudwatch_metric_alarms.ec2_cwagent_windows, + module.baseline_presets.cloudwatch_metric_alarms.ec2_instance_or_cwagent_stopped_windows, local.cloudwatch_metric_alarms.windows, local.cloudwatch_metric_alarms.bods, ) diff --git a/terraform/environments/oasys-national-reporting/locals_preproduction.tf b/terraform/environments/oasys-national-reporting/locals_preproduction.tf index ac1ec74c4ce..eb601b1299d 100644 --- a/terraform/environments/oasys-national-reporting/locals_preproduction.tf +++ b/terraform/environments/oasys-national-reporting/locals_preproduction.tf @@ -98,7 +98,6 @@ locals { instance_type = "r6i.2xlarge" disable_api_termination = true }) - cloudwatch_metric_alarms = null tags = merge(local.ec2_instances.bods.tags, { oasys-national-reporting-environment = "pp" domain-name = "azure.hmpp.root" diff --git a/terraform/environments/oasys-national-reporting/locals_test.tf b/terraform/environments/oasys-national-reporting/locals_test.tf index b72084b85f7..328e9b5dcb3 100644 --- a/terraform/environments/oasys-national-reporting/locals_test.tf +++ b/terraform/environments/oasys-national-reporting/locals_test.tf @@ -153,6 +153,7 @@ locals { t2-onr-bods-1 = merge(local.ec2_instances.bods, { config = merge(local.ec2_instances.bods.config, { + ami_name = "hmpps_windows_server_2019_release_2024-12-02T00-00-37.662Z" availability_zone = "eu-west-2a" instance_profile_policies = concat(local.ec2_instances.bods.config.instance_profile_policies, [ "Ec2SecretPolicy", @@ -170,6 +171,7 @@ locals { t2-onr-bods-2 = merge(local.ec2_instances.bods, { config = merge(local.ec2_instances.bods.config, { + ami_name = "hmpps_windows_server_2019_release_2024-12-02T00-00-37.662Z" availability_zone = "eu-west-2b" instance_profile_policies = concat(local.ec2_instances.bods.config.instance_profile_policies, [ "Ec2SecretPolicy",