Skip to content

Conversation

@robbailiff2
Copy link
Contributor

Description

Context

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@robbailiff2 robbailiff2 force-pushed the feature/rgjb-kt-eli-398-acm-expiry-alarm branch from f28592e to bd3fb96 Compare October 24, 2025 14:49
@robbailiff2 robbailiff2 reopened this Oct 27, 2025
@robbailiff2 robbailiff2 marked this pull request as ready for review October 27, 2025 14:27
@robbailiff2
Copy link
Contributor Author

Terraform Plan:

Terraform will perform the following actions:

  # aws_cloudwatch_metric_alarm.acm_expiry_alarms["CertificateExpiry30Days"] will be created
  + resource "aws_cloudwatch_metric_alarm" "acm_expiry_alarms" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:eu-west-2:448049830832:cloudwatch-security-alarms",
        ]
      + alarm_description                     = "ACM Certificate expiring within 30 days"
      + alarm_name                            = "ACM-CertificateExpiry30Days"
      + arn                                   = (known after apply)
      + comparison_operator                   = "LessThanThreshold"
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "DaysToExpiry"
      + namespace                             = "AWS/CertificateManager"
      + period                                = 86400
      + statistic                             = "Minimum"
      + tags                                  = {
          + "AlertType"   = "security"
          + "Environment" = "dev"
          + "ManagedBy"   = "terraform"
          + "Service"     = "acm"
          + "Severity"    = "high"
        }
      + tags_all                              = {
          + "AlertType"           = "security"
          + "ApplicationRole"     = "API"
          + "CostCentre"          = "129117"
          + "Customer"            = "NHS England"
          + "DataType"            = "PII"
          + "Environment"         = "dev"
          + "FinOpsTagVersion"    = "1"
          + "ManagedBy"           = "terraform"
          + "OnOffPattern"        = "AlwaysOn"
          + "Owner"               = "edd.almond1@nhs.net"
          + "Product"             = "EligibilitySignpostingAPI"
          + "Programme"           = "Vaccinations"
          + "ProjectType"         = "Production"
          + "PublicFacing"        = "Y"
          + "Service"             = "acm"
          + "ServiceCategory"     = "Silver"
          + "Severity"            = "high"
          + "Stack"               = "api-layer"
          + "Tool"                = "Terraform"
          + "data_classification" = "5"
          + "workspace"           = "default"
        }
      + threshold                             = 30
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.acm_expiry_alarms["CertificateExpiry44Days"] will be created
  + resource "aws_cloudwatch_metric_alarm" "acm_expiry_alarms" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:eu-west-2:448049830832:cloudwatch-security-alarms",
        ]
      + alarm_description                     = "ACM Certificate expiring within 44 days"
      + alarm_name                            = "ACM-CertificateExpiry44Days"
      + arn                                   = (known after apply)
      + comparison_operator                   = "LessThanThreshold"
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "DaysToExpiry"
      + namespace                             = "AWS/CertificateManager"
      + period                                = 86400
      + statistic                             = "Minimum"
      + tags                                  = {
          + "AlertType"   = "security"
          + "Environment" = "dev"
          + "ManagedBy"   = "terraform"
          + "Service"     = "acm"
          + "Severity"    = "warning"
        }
      + tags_all                              = {
          + "AlertType"           = "security"
          + "ApplicationRole"     = "API"
          + "CostCentre"          = "129117"
          + "Customer"            = "NHS England"
          + "DataType"            = "PII"
          + "Environment"         = "dev"
          + "FinOpsTagVersion"    = "1"
          + "ManagedBy"           = "terraform"
          + "OnOffPattern"        = "AlwaysOn"
          + "Owner"               = "edd.almond1@nhs.net"
          + "Product"             = "EligibilitySignpostingAPI"
          + "Programme"           = "Vaccinations"
          + "ProjectType"         = "Production"
          + "PublicFacing"        = "Y"
          + "Service"             = "acm"
          + "ServiceCategory"     = "Silver"
          + "Severity"            = "warning"
          + "Stack"               = "api-layer"
          + "Tool"                = "Terraform"
          + "data_classification" = "5"
          + "workspace"           = "default"
        }
      + threshold                             = 44
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.acm_expiry_alarms["CertificateExpiry7Days"] will be created
  + resource "aws_cloudwatch_metric_alarm" "acm_expiry_alarms" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:eu-west-2:448049830832:cloudwatch-security-alarms",
        ]
      + alarm_description                     = "ACM Certificate expiring within 7 days"
      + alarm_name                            = "ACM-CertificateExpiry7Days"
      + arn                                   = (known after apply)
      + comparison_operator                   = "LessThanThreshold"
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "DaysToExpiry"
      + namespace                             = "AWS/CertificateManager"
      + period                                = 86400
      + statistic                             = "Minimum"
      + tags                                  = {
          + "AlertType"   = "security"
          + "Environment" = "dev"
          + "ManagedBy"   = "terraform"
          + "Service"     = "acm"
          + "Severity"    = "critical"
        }
      + tags_all                              = {
          + "AlertType"           = "security"
          + "ApplicationRole"     = "API"
          + "CostCentre"          = "129117"
          + "Customer"            = "NHS England"
          + "DataType"            = "PII"
          + "Environment"         = "dev"
          + "FinOpsTagVersion"    = "1"
          + "ManagedBy"           = "terraform"
          + "OnOffPattern"        = "AlwaysOn"
          + "Owner"               = "edd.almond1@nhs.net"
          + "Product"             = "EligibilitySignpostingAPI"
          + "Programme"           = "Vaccinations"
          + "ProjectType"         = "Production"
          + "PublicFacing"        = "Y"
          + "Service"             = "acm"
          + "ServiceCategory"     = "Silver"
          + "Severity"            = "critical"
          + "Stack"               = "api-layer"
          + "Tool"                = "Terraform"
          + "data_classification" = "5"
          + "workspace"           = "default"
        }
      + threshold                             = 7
      + treat_missing_data                    = "notBreaching"
    }

  # module.eligibility_signposting_lambda_function.aws_lambda_function.eligibility_signposting_lambda will be updated in-place
  ~ resource "aws_lambda_function" "eligibility_signposting_lambda" {
        id                             = "eligibility_signposting_api"
      ~ last_modified                  = "2025-10-24T11:14:26.000+0000" -> (known after apply)
      ~ qualified_arn                  = "arn:aws:lambda:eu-west-2:448049830832:function:eligibility_signposting_api:187" -> (known after apply)
      ~ qualified_invoke_arn           = "arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:448049830832:function:eligibility_signposting_api:187/invocations" -> (known after apply)
      ~ source_code_hash               = "EFSsKTQCASkmqeZoDCj8l42pGly6bj1cFs4N7KnxrZU=" -> "DdOaJ6moRL0z86tkZW3vx+GyMbZJHrlZcMklbQ1H0fs="
        tags                           = {}
      ~ version                        = "187" -> (known after apply)
        # (24 unchanged attributes hidden)

        # (5 unchanged blocks hidden)
    }

  # module.eligibility_status_table.aws_dynamodb_table.dynamodb_table will be updated in-place
  ~ resource "aws_dynamodb_table" "dynamodb_table" {
        id                          = "eligibility-signposting-api-dev-eligibility_datastore"
        name                        = "eligibility-signposting-api-dev-eligibility_datastore"
        tags                        = {
            "ApplicationRole"     = "API"
            "CostCentre"          = "129117"
            "Customer"            = "NHS England"
            "DataType"            = "PII"
            "Environment"         = "dev"
            "FinOpsTagVersion"    = "1"
            "OnOffPattern"        = "AlwaysOn"
            "Owner"               = "edd.almond1@nhs.net"
            "Product"             = "EligibilitySignpostingAPI"
            "Programme"           = "Vaccinations"
            "ProjectType"         = "Production"
            "PublicFacing"        = "Y"
            "ServiceCategory"     = "Silver"
            "Stack"               = "api-layer"
            "Tool"                = "Terraform"
            "data_classification" = "5"
            "workspace"           = "default"
        }
        # (13 unchanged attributes hidden)

      + server_side_encryption {
          + enabled     = true
          + kms_key_arn = "arn:aws:kms:eu-west-2:448049830832:key/1f42fe69-c28e-4edb-ad03-af06908fb200"
        }

        # (4 unchanged blocks hidden)
    }

Plan: 3 to add, 2 to change, 0 to destroy.

@robbailiff2 robbailiff2 merged commit aa0e9ac into main Oct 27, 2025
22 checks passed
@robbailiff2 robbailiff2 deleted the feature/rgjb-kt-eli-398-acm-expiry-alarm branch November 6, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants