Skip to content

chore: upgrade WAF IP blocklist module#1269

Merged
craigzour merged 4 commits intomainfrom
chore/waf-ip-blocklist-upgrade
Mar 31, 2026
Merged

chore: upgrade WAF IP blocklist module#1269
craigzour merged 4 commits intomainfrom
chore/waf-ip-blocklist-upgrade

Conversation

@craigzour
Copy link
Copy Markdown
Contributor

@craigzour craigzour commented Mar 30, 2026

Summary | Résumé

  • Upgrades WAF IP blocklist module to latest v10.11.1
  • Adds alarm to monitor WAF IP Blocklist lambda function in order to detect errors and timeouts
  • Reworks GC Forms lambda alarms in order to detect errors and timeouts

@craigzour craigzour self-assigned this Mar 30, 2026
@craigzour craigzour changed the title wip chore: WAF IP blocklist module upgrade Mar 30, 2026
@craigzour craigzour force-pushed the chore/waf-ip-blocklist-upgrade branch from 2d8262b to 91fd444 Compare March 30, 2026 19:56
@craigzour craigzour changed the title chore: WAF IP blocklist module upgrade chore: upgrade WAF IP blocklist module Mar 30, 2026
@craigzour craigzour force-pushed the chore/waf-ip-blocklist-upgrade branch from 91fd444 to 368d556 Compare March 31, 2026 13:11
@craigzour craigzour force-pushed the chore/waf-ip-blocklist-upgrade branch from 368d556 to 586caf8 Compare March 31, 2026 14:25
@craigzour craigzour marked this pull request as ready for review March 31, 2026 14:27
for_each = local.map_of_lambda_log_group
name = "timeout_detection_in_${each.key}_lambda_logs"
log_group_name = each.value
filter_pattern = "Task timed out"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to my research and tests, AWS changed the default error message when a timeout happens (https://repost.aws/knowledge-center/lambda-verify-invocation-timeouts).

To make sure we don't rely on a log message I implemented alarms based on AWS CloudWatch Metrics

@craigzour craigzour force-pushed the chore/waf-ip-blocklist-upgrade branch from 586caf8 to 047665f Compare March 31, 2026 15:02
@craigzour craigzour requested a review from patheard March 31, 2026 15:03
@craigzour craigzour enabled auto-merge (squash) March 31, 2026 15:06
@github-actions
Copy link
Copy Markdown

⚠ Terrform update available

Terraform: 1.14.8 (using 1.12.2)
Terragrunt: 1.0.0 (using 0.83.0)

@github-actions
Copy link
Copy Markdown

Staging: load_balancer

✅   Terraform Init: success
✅   Terraform Validate: success
✅   Terraform Format: success
✅   Terraform Plan: success
✅   Conftest: success

Plan: 0 to add, 1 to change, 0 to destroy
Show summary
CHANGE NAME
update module.waf_ip_blocklist.aws_lambda_function.ipv4_blocklist
Show plan
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # module.waf_ip_blocklist.aws_lambda_function.ipv4_blocklist will be updated in-place
  ~ resource "aws_lambda_function" "ipv4_blocklist" {
        id                             = "ipv4_blocklist_forms_app"
      ~ last_modified                  = "2025-09-02T13:10:07.000+0000" -> (known after apply)
      ~ source_code_hash               = "icF5uuS2UgVmNkVayma4gwALnoV/hyaKQVc1emaEHBA=" -> "UzWRtfhpOFSwUCFv0AOiVQmcgY7VO/jJw5axUL0K76w="
        tags                           = {
            "CostCentre" = "forms"
            "Terraform"  = "true"
        }
        # (28 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Changes to Outputs:
  + waf_ipv4_blocklist_lambda_function_name           = "ipv4_blocklist_forms_app"
  + waf_ipv4_blocklist_lambda_log_group_name          = "/aws/lambda/ipv4_blocklist_forms_app"

Warning: Deprecated attribute

  on .terraform/modules/waf_ip_blocklist/waf_ip_blocklist/data.tf line 6, in locals:
   6:   athena_region = var.athena_region != "" ? var.athena_region : data.aws_region.current.name

The attribute "name" is deprecated. Refer to the provider documentation for
details.

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: plan.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "plan.tfplan"
Show Conftest results
WARN - plan.json - main - Missing Common Tags: ["aws_acm_certificate.form_viewer"]
WARN - plan.json - main - Missing Common Tags: ["aws_acm_certificate.form_viewer_maintenance_mode"]
WARN - plan.json - main - Missing Common Tags: ["aws_acm_certificate.forms_api"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb_listener_rule.forms_api"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb_listener_rule.security_txt"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudfront_distribution.maintenance_mode"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.UnHealthyHostCount-TargetGroup1"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.UnHealthyHostCount-TargetGroup2"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_role.firehose_waf_logs"]
WARN - plan.json - main - Missing Common Tags: ["aws_kinesis_firehose_delivery_stream.firehose_waf_logs"]
WARN - plan.json - main - Missing Common Tags: ["aws_lb.form_viewer"]
WARN - plan.json - main - Missing Common Tags: ["aws_lb_listener.form_viewer_http"]
WARN - plan.json - main - Missing Common Tags: ["aws_lb_listener.form_viewer_https"]
WARN - plan.json - main - Missing Common Tags: ["aws_lb_target_group.form_viewer_1"]
WARN - plan.json - main - Missing Common Tags: ["aws_lb_target_group.form_viewer_2"]
WARN - plan.json - main - Missing Common Tags: ["aws_lb_target_group.forms_api"]
WARN - plan.json - main - Missing Common Tags: ["aws_route53_health_check.lb_web_app_global_target_group"]
WARN - plan.json - main - Missing Common Tags: ["aws_route53_health_check.lb_web_app_target_group_1"]
WARN - plan.json - main - Missing Common Tags: ["aws_route53_health_check.lb_web_app_target_group_2"]
WARN - plan.json - main - Missing Common Tags: ["aws_s3_bucket.maintenance_mode"]
WARN - plan.json - main - Missing Common Tags: ["aws_s3_object.maintenance_static_page_css_files[\"style.css\"]"]
WARN - plan.json - main - Missing Common Tags:...

@github-actions
Copy link
Copy Markdown

Staging: lambdas

✅   Terraform Init: success
✅   Terraform Validate: success
✅   Terraform Format: success
✅   Terraform Plan: success
✅   Conftest: success

Plan: 0 to add, 0 to change, 0 to destroy
Show summary
CHANGE NAME
Show plan
Changes to Outputs:
  + lambda_api_end_to_end_test_function_name       = "api-end-to-end-test"
  + lambda_audit_logs_archiver_function_name       = "audit-logs-archiver"
  + lambda_audit_logs_function_name                = "audit-logs"
  + lambda_file_upload_cleanup_function_name       = "file-upload-cleanup"
  + lambda_file_upload_processor_function_name     = "file-upload-processor"
  + lambda_reliability_dlq_consumer_function_name  = "reliability-dlq-consumer"
  + lambda_reliability_function_name               = "reliability"

You can apply this plan to save these new output values to the Terraform
state, without changing any real infrastructure.

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: plan.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "plan.tfplan"
Show Conftest results
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.api_end_to_end_test_lambda_trigger"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.audit_logs_archiver_lambda_trigger"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.file_upload_cleanup_trigger"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.form_archiver_lambda_trigger"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.nagware_lambda_trigger"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.reliability_dlq_lambda_trigger"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.response_archiver_lambda_trigger"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.api_end_to_end_test"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.archive_form_templates"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.audit_logs"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.audit_logs_archiver"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.dead_letter_queue_consumer"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.file_upload"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.file_upload_cleanup"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.nagware"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.prisma_migration_handler"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.reliability"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.response_archiver"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.submission"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.vault_integrity"]
WARN - plan.json - main - Missing...

@github-actions
Copy link
Copy Markdown

Staging: alarms

✅   Terraform Init: success
✅   Terraform Validate: success
✅   Terraform Format: success
✅   Terraform Plan: success
✅   Conftest: success

⚠️   Warning: resources will be destroyed by this change!

Plan: 14 to add, 0 to change, 12 to destroy
Show summary
CHANGE NAME
add aws_cloudwatch_log_subscription_filter.waf_ipv4_blocklist_lambda_error_detection
aws_cloudwatch_metric_alarm.lambda_error_detection["api_end_to_end_test"]
aws_cloudwatch_metric_alarm.lambda_error_detection["audit_logs"]
aws_cloudwatch_metric_alarm.lambda_error_detection["audit_logs_archiver"]
aws_cloudwatch_metric_alarm.lambda_error_detection["file_upload_cleanup"]
aws_cloudwatch_metric_alarm.lambda_error_detection["file_upload_processor"]
aws_cloudwatch_metric_alarm.lambda_error_detection["form_archiver"]
aws_cloudwatch_metric_alarm.lambda_error_detection["nagware"]
aws_cloudwatch_metric_alarm.lambda_error_detection["reliability"]
aws_cloudwatch_metric_alarm.lambda_error_detection["reliability_dlq_consumer"]
aws_cloudwatch_metric_alarm.lambda_error_detection["response_archiver"]
aws_cloudwatch_metric_alarm.lambda_error_detection["submission"]
aws_cloudwatch_metric_alarm.lambda_error_detection["vault_integrity"]
aws_cloudwatch_metric_alarm.waf_ipv4_blocklist_lambda_error_detection
delete aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["api_end_to_end_test"]
aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["audit_logs"]
aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["audit_logs_archiver"]
aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["file_upload_cleanup"]
aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["file_upload_processor"]
aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["form_archiver"]
aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["nagware"]
aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["reliability"]
aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["reliability_dlq_consumer"]
aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["response_archiver"]
aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["submission"]
aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["vault_integrity"]

✂   Warning: plan has been truncated! See the full plan in the logs.

Show plan
Resource actions are indicated with the following symbols:
  + create
  - destroy

Terraform will perform the following actions:

  # aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["api_end_to_end_test"] will be destroyed
  # (because aws_cloudwatch_log_subscription_filter.lambda_timeout_detection is not in configuration)
  - resource "aws_cloudwatch_log_subscription_filter" "lambda_timeout_detection" {
      - destination_arn = "arn:aws:lambda:ca-central-1:687401027353:function:notify-slack" -> null
      - distribution    = "ByLogStream" -> null
      - filter_pattern  = "Task timed out" -> null
      - id              = "cwlsf-1621259464" -> null
      - log_group_name  = "/aws/lambda/API_End_To_End_Test" -> null
      - name            = "timeout_detection_in_api_end_to_end_test_lambda_logs" -> null
      - region          = "ca-central-1" -> null
        # (1 unchanged attribute hidden)
    }

  # aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["audit_logs"] will be destroyed
  # (because aws_cloudwatch_log_subscription_filter.lambda_timeout_detection is not in configuration)
  - resource "aws_cloudwatch_log_subscription_filter" "lambda_timeout_detection" {
      - destination_arn = "arn:aws:lambda:ca-central-1:687401027353:function:notify-slack" -> null
      - distribution    = "ByLogStream" -> null
      - filter_pattern  = "Task timed out" -> null
      - id              = "cwlsf-821307863" -> null
      - log_group_name  = "/aws/lambda/Audit_Logs" -> null
      - name            = "timeout_detection_in_audit_logs_lambda_logs" -> null
      - region          = "ca-central-1" -> null
        # (1 unchanged attribute hidden)
    }

  # aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["audit_logs_archiver"] will be destroyed
  # (because aws_cloudwatch_log_subscription_filter.lambda_timeout_detection is not in configuration)
  - resource "aws_cloudwatch_log_subscription_filter" "lambda_timeout_detection" {
      - destination_arn = "arn:aws:lambda:ca-central-1:687401027353:function:notify-slack" -> null
      - distribution    = "ByLogStream" -> null
      - filter_pattern  = "Task timed out" -> null
      - id              = "cwlsf-2742612913" -> null
      - log_group_name  = "/aws/lambda/Audit_Logs_Archiver" -> null
      - name            = "timeout_detection_in_audit_logs_archiver_lambda_logs" -> null
      - region          = "ca-central-1" -> null
        # (1 unchanged attribute hidden)
    }

  # aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["file_upload_cleanup"] will be destroyed
  # (because aws_cloudwatch_log_subscription_filter.lambda_timeout_detection is not in configuration)
  - resource "aws_cloudwatch_log_subscription_filter" "lambda_timeout_detection" {
      - destination_arn = "arn:aws:lambda:ca-central-1:687401027353:function:notify-slack" -> null
      - distribution    = "ByLogStream" -> null
      - filter_pattern  = "Task timed out" -> null
      - id              = "cwlsf-1155232566" -> null
      - log_group_name  = "/aws/lambda/file-upload-cleanup" -> null
      - name            = "timeout_detection_in_file_upload_cleanup_lambda_logs" -> null
      - region          = "ca-central-1" -> null
        # (1 unchanged attribute hidden)
    }

  # aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["file_upload_processor"] will be destroyed
  # (because aws_cloudwatch_log_subscription_filter.lambda_timeout_detection is not in configuration)
  - resource "aws_cloudwatch_log_subscription_filter" "lambda_timeout_detection" {
      - destination_arn = "arn:aws:lambda:ca-central-1:687401027353:function:notify-slack" -> null
      - distribution    = "ByLogStream" -> null
      - filter_pattern  = "Task timed out" -> null
      - id              = "cwlsf-1945632028" -> null
      - log_group_name  = "/aws/lambda/file-upload-processor" -> null
      - name            = "timeout_detection_in_file_upload_processor_lambda_logs" -> null
      - region          = "ca-central-1" -> null
        # (1 unchanged attribute hidden)
    }

  # aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["form_archiver"] will be destroyed
  # (because aws_cloudwatch_log_subscription_filter.lambda_timeout_detection is not in configuration)
  - resource "aws_cloudwatch_log_subscription_filter" "lambda_timeout_detection" {
      - destination_arn = "arn:aws:lambda:ca-central-1:687401027353:function:notify-slack" -> null
      - distribution    = "ByLogStream" -> null
      - filter_pattern  = "Task timed out" -> null
      - id              = "cwlsf-4036201582" -> null
      - log_group_name  = "/aws/lambda/Archive_Form_Templates" -> null
      - name            = "timeout_detection_in_form_archiver_lambda_logs" -> null
      - region          = "ca-central-1" -> null
        # (1 unchanged attribute hidden)
    }

  # aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["nagware"] will be destroyed
  # (because aws_cloudwatch_log_subscription_filter.lambda_timeout_detection is not in configuration)
  - resource "aws_cloudwatch_log_subscription_filter" "lambda_timeout_detection" {
      - destination_arn = "arn:aws:lambda:ca-central-1:687401027353:function:notify-slack" -> null
      - distribution    = "ByLogStream" -> null
      - filter_pattern  = "Task timed out" -> null
      - id              = "cwlsf-2378547274" -> null
      - log_group_name  = "/aws/lambda/Nagware" -> null
      - name            = "timeout_detection_in_nagware_lambda_logs" -> null
      - region          = "ca-central-1" -> null
        # (1 unchanged attribute hidden)
    }

  # aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["reliability"] will be destroyed
  # (because aws_cloudwatch_log_subscription_filter.lambda_timeout_detection is not in configuration)
  - resource "aws_cloudwatch_log_subscription_filter" "lambda_timeout_detection" {
      - destination_arn = "arn:aws:lambda:ca-central-1:687401027353:function:notify-slack" -> null
      - distribution    = "ByLogStream" -> null
      - filter_pattern  = "Task timed out" -> null
      - id              = "cwlsf-2677299195" -> null
      - log_group_name  = "/aws/lambda/Reliability" -> null
      - name            = "timeout_detection_in_reliability_lambda_logs" -> null
      - region          = "ca-central-1" -> null
        # (1 unchanged attribute hidden)
    }

  # aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["reliability_dlq_consumer"] will be destroyed
  # (because aws_cloudwatch_log_subscription_filter.lambda_timeout_detection is not in configuration)
  - resource "aws_cloudwatch_log_subscription_filter" "lambda_timeout_detection" {
      - destination_arn = "arn:aws:lambda:ca-central-1:687401027353:function:notify-slack" -> null
      - distribution    = "ByLogStream" -> null
      - filter_pattern  = "Task timed out" -> null
      - id              = "cwlsf-125968559" -> null
      - log_group_name  = "/aws/lambda/Reliability_DLQ_Consumer" -> null
      - name            = "timeout_detection_in_reliability_dlq_consumer_lambda_logs" -> null
      - region          = "ca-central-1" -> null
        # (1 unchanged attribute hidden)
    }

  # aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["response_archiver"] will be destroyed
  # (because aws_cloudwatch_log_subscription_filter.lambda_timeout_detection is not in configuration)
  - resource "aws_cloudwatch_log_subscription_filter" "lambda_timeout_detection" {
      - destination_arn = "arn:aws:lambda:ca-central-1:687401027353:function:notify-slack" -> null
      - distribution    = "ByLogStream" -> null
      - filter_pattern  = "Task timed out" -> null
      - id              = "cwlsf-1985583210" -> null
      - log_group_name  = "/aws/lambda/Response_Archiver" -> null
      - name            = "timeout_detection_in_response_archiver_lambda_logs" -> null
      - region          = "ca-central-1" -> null
        # (1 unchanged attribute hidden)
    }

  # aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["submission"] will be destroyed
  # (because aws_cloudwatch_log_subscription_filter.lambda_timeout_detection is not in configuration)
  - resource "aws_cloudwatch_log_subscription_filter" "lambda_timeout_detection" {
      - destination_arn = "arn:aws:lambda:ca-central-1:687401027353:function:notify-slack" -> null
      - distribution    = "ByLogStream" -> null
      - filter_pattern  = "Task timed out" -> null
      - id              = "cwlsf-2956744385" -> null
      - log_group_name  = "/aws/lambda/Submission" -> null
      - name            = "timeout_detection_in_submission_lambda_logs" -> null
      - region          = "ca-central-1" -> null
        # (1 unchanged attribute hidden)
    }

  # aws_cloudwatch_log_subscription_filter.lambda_timeout_detection["vault_integrity"] will be destroyed
  # (because aws_cloudwatch_log_subscription_filter.lambda_timeout_detection is not in configuration)
  - resource "aws_cloudwatch_log_subscription_filter" "lambda_timeout_detection" {
      - destination_arn = "arn:aws:lambda:ca-central-1:687401027353:function:notify-slack" -> null
      - distribution    = "ByLogStream" -> null
      - filter_pattern  = "Task timed out" -> null
      - id              = "cwlsf-125604783" -> null
      - log_group_name  = "/aws/lambda/Vault_Data_Integrity_Check" -> null
      - name            = "timeout_detection_in_vault_integrity_lambda_logs" -> null
      - region          = "ca-central-1" -> null
        # (1 unchanged attribute hidden)
    }

  # aws_cloudwatch_log_subscription_filter.waf_ipv4_blocklist_lambda_error_detection will be created
  + resource "aws_cloudwatch_log_subscription_filter" "waf_ipv4_blocklist_lambda_error_detection" {
      + destination_arn = "arn:aws:lambda:ca-central-1:687401027353:function:notify-slack"
      + distribution    = "ByLogStream"
      + filter_pattern  = "ERROR"
      + id              = (known after apply)
      + log_group_name  = "ipv4_blocklist_forms_app_log_group"
      + name            = "ipv4_blocklist_forms_app_lambda_error_detection"
      + region          = "ca-central-1"
      + role_arn        = (known after apply)
    }

  # aws_cloudwatch_metric_alarm.lambda_error_detection["api_end_to_end_test"] will be created
  + resource "aws_cloudwatch_metric_alarm" "lambda_error_detection" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:687401027353:alert-critical",
        ]
      + alarm_description                     = "Detected error or timeout in api_end_to_end_test lambda function (SEV2)"
      + alarm_name                            = "api_end_to_end_test-lambda-error-detection"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "FunctionName" = "api-end-to-end-test"
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "Errors"
      + namespace                             = "AWS/Lambda"
      + period                                = 60
      + region                                = "ca-central-1"
      + statistic                             = "Sum"
      + tags_all                              = {
          + "CostCentre" = "forms-platform-staging"
          + "Terraform"  = "true"
        }
      + threshold                             = 0
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.lambda_error_detection["audit_logs"] will be created
  + resource "aws_cloudwatch_metric_alarm" "lambda_error_detection" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:687401027353:alert-critical",
        ]
      + alarm_description                     = "Detected error or timeout in audit_logs lambda function (SEV2)"
      + alarm_name                            = "audit_logs-lambda-error-detection"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "FunctionName" = "audit-logs"
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "Errors"
      + namespace                             = "AWS/Lambda"
      + period                                = 60
      + region                                = "ca-central-1"
      + statistic                             = "Sum"
      + tags_all                              = {
          + "CostCentre" = "forms-platform-staging"
          + "Terraform"  = "true"
        }
      + threshold                             = 0
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.lambda_error_detection["audit_logs_archiver"] will be created
  + resource "aws_cloudwatch_metric_alarm" "lambda_error_detection" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:687401027353:alert-critical",
        ]
      + alarm_description                     = "Detected error or timeout in audit_logs_archiver lambda function (SEV2)"
      + alarm_name                            = "audit_logs_archiver-lambda-error-detection"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "FunctionName" = "audit-logs-archiver"
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "Errors"
      + namespace                             = "AWS/Lambda"
      + period                                = 60
      + region                                = "ca-central-1"
      + statistic                             = "Sum"
      + tags_all                              = {
          + "CostCentre" = "forms-platform-staging"
          + "Terraform"  = "true"
        }
      + threshold                             = 0
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.lambda_error_detection["file_upload_cleanup"] will be created
  + resource "aws_cloudwatch_metric_alarm" "lambda_error_detection" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:687401027353:alert-critical",
        ]
      + alarm_description                     = "Detected error or timeout in file_upload_cleanup lambda function (SEV2)"
      + alarm_name                            = "file_upload_cleanup-lambda-error-detection"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "FunctionName" = "file-upload-cleanup"
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "Errors"
      + namespace                             = "AWS/Lambda"
      + period                                = 60
      + region                                = "ca-central-1"
      + statistic                             = "Sum"
      + tags_all                              = {
          + "CostCentre" = "forms-platform-staging"
          + "Terraform"  = "true"
        }
      + threshold                             = 0
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.lambda_error_detection["file_upload_processor"] will be created
  + resource "aws_cloudwatch_metric_alarm" "lambda_error_detection" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:687401027353:alert-critical",
        ]
      + alarm_description                     = "Detected error or timeout in file_upload_processor lambda function (SEV2)"
      + alarm_name                            = "file_upload_processor-lambda-error-detection"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "FunctionName" = "file-upload-processor"
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "Errors"
      + namespace                             = "AWS/Lambda"
      + period                                = 60
      + region                                = "ca-central-1"
      + statistic                             = "Sum"
      + tags_all                              = {
          + "CostCentre" = "forms-platform-staging"
          + "Terraform"  = "true"
        }
      + threshold                             = 0
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.lambda_error_detection["form_archiver"] will be created
  + resource "aws_cloudwatch_metric_alarm" "lambda_error_detection" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:687401027353:alert-critical",
        ]
      + alarm_description                     = "Detected error or timeout in form_archiver lambda function (SEV2)"
      + alarm_name                            = "form_archiver-lambda-error-detection"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "FunctionName" = "form-archiver"
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "Errors"
      + namespace                             = "AWS/Lambda"
      + period                                = 60
      + region                                = "ca-central-1"
      + statistic                             = "Sum"
      + tags_all                              = {
          + "CostCentre" = "forms-platform-staging"
          + "Terraform"  = "true"
        }
      + threshold                             = 0
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.lambda_error_detection["nagware"] will be created
  + resource "aws_cloudwatch_metric_alarm" "lambda_error_detection" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:687401027353:alert-critical",
        ]
      + alarm_description                     = "Detected error or timeout in nagware lambda function (SEV2)"
      + alarm_name                            = "nagware-lambda-error-detection"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "FunctionName" = "nagware"
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "Errors"
      + namespace                             = "AWS/Lambda"
      + period                                = 60
      + region                                = "ca-central-1"
      + statistic                             = "Sum"
      + tags_all                              = {
          + "CostCentre" = "forms-platform-staging"
          + "Terraform"  = "true"
        }
      + threshold                             = 0
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.lambda_error_detection["reliability"] will be created
  + resource "aws_cloudwatch_metric_alarm" "lambda_error_detection" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:687401027353:alert-critical",
        ]
      + alarm_description                     = "Detected error or timeout in reliability lambda function (SEV2)"
      + alarm_name                            = "reliability-lambda-error-detection"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "FunctionName" = "reliability"
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "Errors"
      + namespace                             = "AWS/Lambda"
      + period                                = 60
      + region                                = "ca-central-1"
      + statistic                             = "Sum"
      + tags_all                              = {
          + "CostCentre" = "forms-platform-staging"
          + "Terraform"  = "true"
        }
      + threshold                             = 0
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.lambda_error_detection["reliability_dlq_consumer"] will be created
  + resource "aws_cloudwatch_metric_alarm" "lambda_error_detection" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:687401027353:alert-critical",
        ]
      + alarm_description                     = "Detected error or timeout in reliability_dlq_consumer lambda function (SEV2)"
      + alarm_name                            = "reliability_dlq_consumer-lambda-error-detection"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "FunctionName" = "reliability-dlq-consumer"
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "Errors"
      + namespace                             = "AWS/Lambda"
      + period                                = 60
      + region                                = "ca-central-1"
      + statistic                             = "Sum"
      + tags_all                              = {
          + "CostCentre" = "forms-platform-staging"
          + "Terraform"  = "true"
        }
      + threshold                             = 0
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.lambda_error_detection["response_archiver"] will be created
  + resource "aws_cloudwatch_metric_alarm" "lambda_error_detection" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:687401027353:alert-critical",
        ]
      + alarm_description                     = "Detected error or timeout in response_archiver lambda function (SEV2)"
      + alarm_name                            = "response_archiver-lambda-error-detection"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "FunctionName" = "response-archiver"
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "Errors"
      + namespace                             = "AWS/Lambda"
      + period                                = 60
      + region                                = "ca-central-1"
      + statistic                             = "Sum"
      + tags_all                              = {
          + "CostCentre" = "forms-platform-staging"
          + "Terraform"  = "true"
        }
      + threshold                             = 0
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.lambda_error_detection["submission"] will be created
  + resource "aws_cloudwatch_metric_alarm" "lambda_error_detection" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:687401027353:alert-critical",
        ]
      + alarm_description                     = "Detected error or timeout in submission lambda function (SEV2)"
      + alarm_name                            = "submission-lambda-error-detection"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "FunctionName" = "Submission"
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "Errors"
      + namespace                             = "AWS/Lambda"
      + period                                = 60
      + region                                = "ca-central-1"
      + statistic                             = "Sum"
      + tags_all                              = {
          + "CostCentre" = "forms-platform-staging"
          + "Terraform"  = "true"
        }
      + threshold                             = 0
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.lambda_error_detection["vault_integrity"] will be created
  + resource "aws_cloudwatch_metric_alarm" "lambda_error_detection" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:687401027353:alert-critical",
        ]
      + alarm_description                     = "Detected error or timeout in vault_integrity lambda function (SEV2)"
      + alarm_name                            = "vault_integrity-lambda-error-detection"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "FunctionName" = "vault-integrity"
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "Errors"
      + namespace                             = "AWS/Lambda"
      + period                                = 60
      + region                                = "ca-central-1"
      + statistic                             = "Sum"
      + tags_all                              = {
          + "CostCentre" = "forms-platform-staging"
          + "Terraform"  = "true"
        }
      + threshold                             = 0
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.waf_ipv4_blocklist_lambda_error_detection will be created
  + resource "aws_cloudwatch_metric_alarm" "waf_ipv4_blocklist_lambda_error_detection" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:687401027353:alert-critical",
        ]
      + alarm_description                     = "Detected error or timeout in ipv4_blocklist_forms_app lambda function (SEV2)"
      + alarm_name                            = "ipv4_blocklist_forms_app-lambda-error-detection"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "FunctionName" = "ipv4_blocklist_forms_app"
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "Errors"
      + namespace                             = "AWS/Lambda"
      + period                                = 60
      + region                                = "ca-central-1"
      + statistic                             = "Sum"
      + tags_all                 ...
Show Conftest results
WARN - plan.json - main - Missing Common Tags: ["aws_athena_data_catalog.dynamodb"]
WARN - plan.json - main - Missing Common Tags: ["aws_athena_data_catalog.rds_data_catalog"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.code_pipeline_state_change"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.codedeploy_sns"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.notify_slack"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.ELB_5xx_error_warn"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.ELB_healthy_hosts"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.alb_ddos"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.api_cpu_utilization_high_warn"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.api_lb_healthy_host_count"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.api_lb_unhealthy_host_count"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.api_memory_utilization_high_warn"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.api_response_time_warn"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.cognito_signin_exceeded"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.ddos_detected_forms_warn"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.ddos_detected_route53_warn[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.dlq_message_detector[\"api_audit_log\"]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.dlq_message_detector[\"app_audit_log\"]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.dlq_message_detector[\"file_upload\"]"]
WARN - plan.json - main - Missing Common Tags:...

@craigzour craigzour merged commit 2e0ddf3 into main Mar 31, 2026
12 checks passed
@craigzour craigzour deleted the chore/waf-ip-blocklist-upgrade branch March 31, 2026 15:19
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.

3 participants