Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: GCForms release v3.27.0 #895

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

sre-read-write[bot]
Copy link
Contributor

@sre-read-write sre-read-write bot commented Nov 20, 2024

🤖 I have created a release beep boop

3.27.0 (2024-12-09)

Features

  • Update to latest dynamic IP blocking module (#892) (d14ff31)

Bug Fixes

  • Add egress rule from lambda to db (#914) (de7d49d)
  • Add missing api path check on APP WAF rule (#901) (9adb41d)
  • Inverted privatelink rule (#913) (608d401)
  • Nagware should handle form template with empty name (#915) (c841f3a)
  • no healthy hosts alarms should treat missing data as breaching (#918) (190752d)
  • RDS serverless v2 Terraform sync (#911) (d632641)
  • update api cloudwatch filter to catch logMessage style json (#902) (a5d57da)
  • WAF rule logic (#900) (11b40f3)

Miscellaneous Chores

  • Comment out OR statement in WAF for now (#899) (59cc5a9)
  • Enable dynamic ip block on WAF (#917) (7d9bf12)
  • re-enable TF management of rds module (#916) (8111786)
  • remove POST request limit (#909) (0db1847)
  • Replace rds data client in reliability and nagware lambdas (#906) (3c0bcff)
  • Seperate WAF uri checks contexts between API and App (#896) (116af75)
  • temporarily disable rds module plan/apply (#908) (1060361)
  • Update Lambda network and change RDS Lib in Lambdas (#912) (788b0bc)
  • Update terraform, terragrunt,and AWS provider (#898) (287c6d1)

This PR was generated with Release Please. See documentation.

@sre-read-write sre-read-write bot force-pushed the release-please--branches--main branch 6 times, most recently from 1717671 to c88cb78 Compare November 25, 2024 13:36
@sre-read-write sre-read-write bot force-pushed the release-please--branches--main branch 10 times, most recently from 13a56fa to ce01c35 Compare December 9, 2024 13:23
@sre-read-write sre-read-write bot force-pushed the release-please--branches--main branch from ce01c35 to c2ca959 Compare December 9, 2024 15:34
Copy link

github-actions bot commented Dec 9, 2024

Production: network

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

Plan: 7 to add, 0 to change, 0 to destroy
Show summary
CHANGE NAME
add aws_security_group.lambda
aws_vpc_security_group_egress_rule.internet_lambda
aws_vpc_security_group_egress_rule.rds_lambda
aws_vpc_security_group_egress_rule.redis_lambda
aws_vpc_security_group_ingress_rule.privatelink_lambda
aws_vpc_security_group_ingress_rule.rds_lambda
aws_vpc_security_group_ingress_rule.redis_lambda
Show plan
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_security_group.lambda will be created
  + resource "aws_security_group" "lambda" {
      + arn                    = (known after apply)
      + description            = "Lambdas"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "lambda"
      + name_prefix            = (known after apply)
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + tags_all               = {
          + "CostCentre" = "forms-platform-production"
          + "Terraform"  = "true"
        }
      + vpc_id                 = "vpc-0e852a6f3554a8bca"
    }

  # aws_vpc_security_group_egress_rule.internet_lambda will be created
  + resource "aws_vpc_security_group_egress_rule" "internet_lambda" {
      + arn                    = (known after apply)
      + cidr_ipv4              = "0.0.0.0/0"
      + description            = "Egress to the internet from Nagware Lambda function"
      + from_port              = 443
      + id                     = (known after apply)
      + ip_protocol            = "tcp"
      + security_group_id      = (known after apply)
      + security_group_rule_id = (known after apply)
      + tags_all               = {
          + "CostCentre" = "forms-platform-production"
          + "Terraform"  = "true"
        }
      + to_port                = 443
    }

  # aws_vpc_security_group_egress_rule.rds_lambda will be created
  + resource "aws_vpc_security_group_egress_rule" "rds_lambda" {
      + arn                          = (known after apply)
      + description                  = "Egress from lambda to database"
      + from_port                    = 5432
      + id                           = (known after apply)
      + ip_protocol                  = "tcp"
      + referenced_security_group_id = "sg-0603a6edcc9e34d98"
      + security_group_id            = (known after apply)
      + security_group_rule_id       = (known after apply)
      + tags_all                     = {
          + "CostCentre" = "forms-platform-production"
          + "Terraform"  = "true"
        }
      + to_port                      = 5432
    }

  # aws_vpc_security_group_egress_rule.redis_lambda will be created
  + resource "aws_vpc_security_group_egress_rule" "redis_lambda" {
      + arn                          = (known after apply)
      + description                  = "Egress from lambda to Redis"
      + from_port                    = 6379
      + id                           = (known after apply)
      + ip_protocol                  = "tcp"
      + referenced_security_group_id = "sg-0388290614e570375"
      + security_group_id            = (known after apply)
      + security_group_rule_id       = (known after apply)
      + tags_all                     = {
          + "CostCentre" = "forms-platform-production"
          + "Terraform"  = "true"
        }
      + to_port                      = 6379
    }

  # aws_vpc_security_group_ingress_rule.privatelink_lambda will be created
  + resource "aws_vpc_security_group_ingress_rule" "privatelink_lambda" {
      + arn                          = (known after apply)
      + description                  = "Security group rule for Lambda function ingress"
      + from_port                    = 443
      + id                           = (known after apply)
      + ip_protocol                  = "tcp"
      + referenced_security_group_id = (known after apply)
      + security_group_id            = "sg-0799d12ff9d17bded"
      + security_group_rule_id       = (known after apply)
      + tags_all                     = {
          + "CostCentre" = "forms-platform-production"
          + "Terraform"  = "true"
        }
      + to_port                      = 443
    }

  # aws_vpc_security_group_ingress_rule.rds_lambda will be created
  + resource "aws_vpc_security_group_ingress_rule" "rds_lambda" {
      + arn                          = (known after apply)
      + description                  = "Ingress to database from lambda"
      + from_port                    = 5432
      + id                           = (known after apply)
      + ip_protocol                  = "tcp"
      + referenced_security_group_id = (known after apply)
      + security_group_id            = "sg-0603a6edcc9e34d98"
      + security_group_rule_id       = (known after apply)
      + tags_all                     = {
          + "CostCentre" = "forms-platform-production"
          + "Terraform"  = "true"
        }
      + to_port                      = 5432
    }

  # aws_vpc_security_group_ingress_rule.redis_lambda will be created
  + resource "aws_vpc_security_group_ingress_rule" "redis_lambda" {
      + arn                          = (known after apply)
      + description                  = "Ingress to Redis from lambda"
      + from_port                    = 6379
      + id                           = (known after apply)
      + ip_protocol                  = "tcp"
      + referenced_security_group_id = (known after apply)
      + security_group_id            = "sg-0388290614e570375"
      + security_group_rule_id       = (known after apply)
      + tags_all                     = {
          + "CostCentre" = "forms-platform-production"
          + "Terraform"  = "true"
        }
      + to_port                      = 6379
    }

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

Changes to Outputs:
  - lambda_nagware_security_group_id = "sg-05873c4492257f62c" -> null
  + lambda_security_group_id         = (known after apply)

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

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_default_network_acl.forms"]
WARN - plan.json - main - Missing Common Tags: ["aws_default_security_group.default"]
WARN - plan.json - main - Missing Common Tags: ["aws_eip.forms_natgw[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_eip.forms_natgw[1]"]
WARN - plan.json - main - Missing Common Tags: ["aws_eip.forms_natgw[2]"]
WARN - plan.json - main - Missing Common Tags: ["aws_flow_log.vpc_flow_logs[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_internet_gateway.forms"]
WARN - plan.json - main - Missing Common Tags: ["aws_nat_gateway.forms[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_nat_gateway.forms[1]"]
WARN - plan.json - main - Missing Common Tags: ["aws_nat_gateway.forms[2]"]
WARN - plan.json - main - Missing Common Tags: ["aws_route_table.forms_private_subnet[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_route_table.forms_private_subnet[1]"]
WARN - plan.json - main - Missing Common Tags: ["aws_route_table.forms_private_subnet[2]"]
WARN - plan.json - main - Missing Common Tags: ["aws_route_table.forms_public_subnet"]
WARN - plan.json - main - Missing Common Tags: ["aws_security_group.api_ecs"]
WARN - plan.json - main - Missing Common Tags: ["aws_security_group.connector_db"]
WARN - plan.json - main - Missing Common Tags: ["aws_security_group.forms"]
WARN - plan.json - main - Missing Common Tags: ["aws_security_group.forms_database"]
WARN - plan.json - main - Missing Common Tags: ["aws_security_group.forms_egress"]
WARN - plan.json - main - Missing Common Tags: ["aws_security_group.forms_load_balancer"]
WARN - plan.json - main - Missing Common Tags: ["aws_security_group.forms_redis"]
WARN - plan.json - main - Missing Common Tags: ["aws_security_group.idp_db"]
WARN - plan.json - main - Missing Common Tags: ["aws_security_group.idp_ecs"]
WARN - plan.json - main - Missing Common Tags: ["aws_security_group.idp_lb"]
WARN - plan.json - main - Missing Common Tags:...

Copy link

github-actions bot commented Dec 9, 2024

Production: load_balancer

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

Plan: 2 to add, 6 to change, 0 to destroy
Show summary
CHANGE NAME
update aws_wafv2_regex_pattern_set.valid_app_uri_paths
aws_wafv2_rule_group.rate_limiters_group
aws_wafv2_web_acl.forms_acl
module.waf_ip_blocklist.aws_cloudwatch_event_rule.ipv4_blocklist
module.waf_ip_blocklist.aws_iam_policy.ipv4_blocklist
module.waf_ip_blocklist.aws_lambda_function.ipv4_blocklist
add aws_wafv2_regex_pattern_set.valid_api_uri_paths
module.waf_ip_blocklist.aws_cloudwatch_log_metric_filter.ip_added_to_block_list
Show plan
Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # aws_wafv2_regex_pattern_set.valid_api_uri_paths will be created
  + resource "aws_wafv2_regex_pattern_set" "valid_api_uri_paths" {
      + arn         = (known after apply)
      + description = "Regex to match the api valid urls"
      + id          = (known after apply)
      + lock_token  = (known after apply)
      + name        = "valid_api_uri"
      + scope       = "REGIONAL"
      + tags_all    = {
          + "CostCentre" = "forms-platform-production"
          + "Terraform"  = "true"
        }

      + regular_expression {
          + regex_string = "^(?:\\/v1)?\\/forms\\/(?:(\\w{25}))\\/(?:(template|(?:(submission\\/(?:(new|(?:(\\d{2}-\\d{2}-\\w{4})\\/?(?:(confirm\\/\\w{8}-\\w{4}-\\w{4}-\\w{4}-\\w{12}|problem)?))))))))(?:\\/)?$"
        }
    }

  # aws_wafv2_regex_pattern_set.valid_app_uri_paths will be updated in-place
  ~ resource "aws_wafv2_regex_pattern_set" "valid_app_uri_paths" {
      ~ description = "Regex to match the app and api valid urls" -> "Regex to match the app valid urls"
        id          = "f3927a12-2101-47c6-9a47-7353ac95ba92"
        name        = "valid_app_uri_paths"
        tags        = {}
        # (4 unchanged attributes hidden)

      - regular_expression {
          - regex_string = "^\\/(?:en|fr)?\\/?(?:(admin|id|api|auth|signup|profile|forms|unsupported-browser|terms-of-use|contact|support|404)(?:\\/[\\w-]+)?)(?:\\/.*)?$" -> null
        }
      - regular_expression {
          - regex_string = "^\\/(?:en|fr)?\\/?(?:(form-builder|sla|unlock-publishing|terms-and-conditions|javascript-disabled)(?:\\/[\\w-]+)?)(?:\\/.*)?$" -> null
        }
      - regular_expression {
          - regex_string = "^\\/(?:v1)?\\/?(?:(docs|status))(?:\\/)?$" -> null
        }
      + regular_expression {
          + regex_string = "^\\/(?:en|fr)?\\/?(?:(admin|api|form-builder|forms|id|auth|profile|support|contact|unlock-publishing)(?:\\/[\\w-]+)?)(?:\\/.*)?$"
        }
      + regular_expression {
          + regex_string = "^\\/(?:en|fr)?\\/?(?:(sla|terms-and-conditions|terms-of-use|unsupported-browser|javascript-disabled|404)(?:\\/[\\w-]+)?)(?:\\/.*)?$"
        }

        # (3 unchanged blocks hidden)
    }

  # aws_wafv2_rule_group.rate_limiters_group will be updated in-place
  ~ resource "aws_wafv2_rule_group" "rate_limiters_group" {
        id          = "a3ec5ccc-67b7-4fe9-87e5-5ccbe9e555fa"
        name        = "RateLimitersGroup"
        tags        = {}
        # (7 unchanged attributes hidden)

      - rule {
          - name     = "PostRequestLimit" -> null
          - priority = 2 -> null

          - action {
              - block {
                }
            }

          - statement {
              - rate_based_statement {
                  - aggregate_key_type    = "IP" -> null
                  - evaluation_window_sec = 300 -> null
                  - limit                 = 100 -> null

                  - scope_down_statement {
                      - and_statement {
                          - statement {
                              - not_statement {
                                  - statement {
                                      - byte_match_statement {
                                          - positional_constraint = "EXACTLY" -> null
                                          - search_string         = "api.forms-formulaires.alpha.canada.ca" -> null

                                          - field_to_match {
                                              - single_header {
                                                  - name = "host" -> null
                                                }
                                            }

                                          - text_transformation {
                                              - priority = 1 -> null
                                              - type     = "LOWERCASE" -> null
                                            }
                                        }
                                    }
                                }
                            }
                          - statement {
                              - byte_match_statement {
                                  - positional_constraint = "EXACTLY" -> null
                                  - search_string         = "post" -> null

                                  - field_to_match {
                                      - method {}
                                    }

                                  - text_transformation {
                                      - priority = 1 -> null
                                      - type     = "LOWERCASE" -> null
                                    }
                                }
                            }
                        }
                    }
                }
            }

          - visibility_config {
              - cloudwatch_metrics_enabled = true -> null
              - metric_name                = "PostRequestRateLimit" -> null
              - sampled_requests_enabled   = true -> null
            }
        }

        # (2 unchanged blocks hidden)
    }

  # aws_wafv2_web_acl.forms_acl will be updated in-place
  ~ resource "aws_wafv2_web_acl" "forms_acl" {
        id                          = "88f61111-f91e-442b-9a19-c57c4f43ef7a"
        name                        = "GCForms"
        tags                        = {}
        # (9 unchanged attributes hidden)

      - rule {
          - name     = "AllowOnlyAppUrls" -> null
          - priority = 60 -> null

          - action {
              - block {
                }
            }

          - statement {
              - not_statement {
                  - statement {
                      - regex_pattern_set_reference_statement {
                          - arn = "arn:aws:wafv2:ca-central-1:957818836222:regional/regexpatternset/valid_app_uri_paths/f3927a12-2101-47c6-9a47-7353ac95ba92" -> null

                          - field_to_match {
                              - uri_path {}
                            }

                          - text_transformation {
                              - priority = 1 -> null
                              - type     = "COMPRESS_WHITE_SPACE" -> null
                            }
                          - text_transformation {
                              - priority = 2 -> null
                              - type     = "LOWERCASE" -> null
                            }
                        }
                    }
                }
            }

          - visibility_config {
              - cloudwatch_metrics_enabled = true -> null
              - metric_name                = "AllowOnlyAppUrls" -> null
              - sampled_requests_enabled   = false -> null
            }
        }
      - rule {
          - name     = "BlockedIPv4" -> null
          - priority = 80 -> null

          - action {
              - count {
                }
            }

          - statement {
              - ip_set_reference_statement {
                  - arn = "arn:aws:wafv2:ca-central-1:957818836222:regional/ipset/ipv4_blocklist_forms_app/bb31e744-97dd-45e2-995b-78659ac5ec18" -> null
                }
            }

          - visibility_config {
              - cloudwatch_metrics_enabled = true -> null
              - metric_name                = "BlockedIPv4" -> null
              - sampled_requests_enabled   = true -> null
            }
        }
      - rule {
          - name     = "AWSManagedRulesAmazonIpReputationList" -> null
          - priority = 1 -> null

          - override_action {
              - none {}
            }

          - statement {
              - managed_rule_group_statement {
                  - name        = "AWSManagedRulesAmazonIpReputationList" -> null
                  - vendor_name = "AWS" -> null
                    # (1 unchanged attribute hidden)
                }
            }

          - visibility_config {
              - cloudwatch_metrics_enabled = true -> null
              - metric_name                = "AWSManagedRulesAmazonIpReputationList" -> null
              - sampled_requests_enabled   = true -> null
            }
        }
      - rule {
          - name     = "AWSManagedRulesKnownBadInputsRuleSet" -> null
          - priority = 40 -> null

          - override_action {
              - none {}
            }

          - statement {
              - managed_rule_group_statement {
                  - name        = "AWSManagedRulesKnownBadInputsRuleSet" -> null
                  - vendor_name = "AWS" -> null
                    # (1 unchanged attribute hidden)
                }
            }

          - visibility_config {
              - cloudwatch_metrics_enabled = true -> null
              - metric_name                = "AWSManagedRulesKnownBadInputsRuleSet" -> null
              - sampled_requests_enabled   = true -> null
            }
        }
      - rule {
          - name     = "AWSManagedRulesLinuxRuleSet" -> null
          - priority = 50 -> null

          - override_action {
              - none {}
            }

          - statement {
              - managed_rule_group_statement {
                  - name        = "AWSManagedRulesLinuxRuleSet" -> null
                  - vendor_name = "AWS" -> null
                    # (1 unchanged attribute hidden)
                }
            }

          - visibility_config {
              - cloudwatch_metrics_enabled = true -> null
              - metric_name                = "AWSManagedRulesLinuxRuleSet" -> null
              - sampled_requests_enabled   = true -> null
            }
        }
      + rule {
          + name     = "AllowOnlyApiUrls"
          + priority = 65

          + action {
              + block {
                }
            }

          + statement {
              + and_statement {
                  + statement {
                      + byte_match_statement {
                          + positional_constraint = "EXACTLY"
                          + search_string         = "api.forms-formulaires.alpha.canada.ca"

                          + field_to_match {
                              + single_header {
                                  + name = "host"
                                }
                            }

                          + text_transformation {
                              + priority = 1
                              + type     = "LOWERCASE"
                            }
                        }
                    }
                  + statement {
                      + not_statement {
                          + statement {
                              + regex_pattern_set_reference_statement {
                                  + arn = (known after apply)

                                  + field_to_match {
                                      + uri_path {}
                                    }

                                  + text_transformation {
                                      + priority = 1
                                      + type     = "COMPRESS_WHITE_SPACE"
                                    }
                                  + text_transformation {
                                      + priority = 2
                                      + type     = "LOWERCASE"
                                    }
                                }
                            }
                        }
                    }
                }
            }

          + visibility_config {
              + cloudwatch_metrics_enabled = true
              + metric_name                = "AllowOnlyApiUrls"
              + sampled_requests_enabled   = false
            }
        }
      + rule {
          + name     = "AllowOnlyAppUrls"
          + priority = 60

          + action {
              + block {
                }
            }

          + statement {
              + and_statement {
                  + statement {
                      + byte_match_statement {
                          + positional_constraint = "EXACTLY"
                          + search_string         = "forms-formulaires.alpha.canada.ca"

                          + field_to_match {
                              + single_header {
                                  + name = "host"
                                }
                            }

                          + text_transformation {
                              + priority = 1
                              + type     = "LOWERCASE"
                            }
                        }
                    }
                  + statement {
                      + not_statement {
                          + statement {
                              + regex_pattern_set_reference_statement {
                                  + arn = "arn:aws:wafv2:ca-central-1:957818836222:regional/regexpatternset/valid_app_uri_paths/f3927a12-2101-47c6-9a47-7353ac95ba92"

                                  + field_to_match {
                                      + uri_path {}
                                    }

                                  + text_transformation {
                                      + priority = 1
                                      + type     = "COMPRESS_WHITE_SPACE"
                                    }
                                  + text_transformation {
                                      + priority = 2
                                      + type     = "LOWERCASE"
                                    }
                                }
                            }
                        }
                    }
                }
            }

          + visibility_config {
              + cloudwatch_metrics_enabled = true
              + metric_name                = "AllowOnlyAppUrls"
              + sampled_requests_enabled   = false
            }
        }
      + rule {
          + name     = "BlockedIPv4"
          + priority = 80

          + action {
              + block {
                }
            }

          + statement {
              + ip_set_reference_statement {
                  + arn = "arn:aws:wafv2:ca-central-1:957818836222:regional/ipset/ipv4_blocklist_forms_app/bb31e744-97dd-45e2-995b-78659ac5ec18"
                }
            }

          + visibility_config {
              + cloudwatch_metrics_enabled = true
              + metric_name                = "BlockedIPv4"
              + sampled_requests_enabled   = true
            }
        }
      + rule {
          + name     = "AWSManagedRulesAmazonIpReputationList"
          + priority = 1

          + override_action {
              + none {}
            }

          + statement {
              + managed_rule_group_statement {
                  + name        = "AWSManagedRulesAmazonIpReputationList"
                  + vendor_name = "AWS"
                }
            }

          + visibility_config {
              + cloudwatch_metrics_enabled = true
              + metric_name                = "AWSManagedRulesAmazonIpReputationList"
              + sampled_requests_enabled   = true
            }
        }
      + rule {
          + name     = "AWSManagedRulesKnownBadInputsRuleSet"
          + priority = 40

          + override_action {
              + none {}
            }

          + statement {
              + managed_rule_group_statement {
                  + name        = "AWSManagedRulesKnownBadInputsRuleSet"
                  + vendor_name = "AWS"
                }
            }

          + visibility_config {
              + cloudwatch_metrics_enabled = true
              + metric_name                = "AWSManagedRulesKnownBadInputsRuleSet"
              + sampled_requests_enabled   = true
            }
        }
      + rule {
          + name     = "AWSManagedRulesLinuxRuleSet"
          + priority = 50

          + override_action {
              + none {}
            }

          + statement {
              + managed_rule_group_statement {
                  + name        = "AWSManagedRulesLinuxRuleSet"
                  + vendor_name = "AWS"
                }
            }

          + visibility_config {
              + cloudwatch_metrics_enabled = true
              + metric_name                = "AWSManagedRulesLinuxRuleSet"
              + sampled_requests_enabled   = true
            }
        }

        # (6 unchanged blocks hidden)
    }

  # module.waf_ip_blocklist.aws_cloudwatch_event_rule.ipv4_blocklist will be updated in-place
  ~ resource "aws_cloudwatch_event_rule" "ipv4_blocklist" {
        id                  = "ipv4_blocklist_forms_app"
        name                = "ipv4_blocklist_forms_app"
      ~ schedule_expression = "rate(2 hours)" -> "rate(15 minutes)"
        tags                = {
            "CostCentre" = "forms"
            "Terraform"  = "true"
        }
        # (9 unchanged attributes hidden)
    }

  # module.waf_ip_blocklist.aws_cloudwatch_log_metric_filter.ip_added_to_block_list will be created
  + resource "aws_cloudwatch_log_metric_filter" "ip_added_to_block_list" {
      + id             = (known after apply)
      + log_group_name = "/aws/lambda/ipv4_blocklist_forms_app"
      + name           = "IpAddedToBlockList"
      + pattern        = "\"[Metric] - New IP added to WAF IP Set\""

      + metric_transformation {
          + default_value = "0"
          + name          = "IpAddedToBlockList"
          + namespace     = "CDS_Platform"
          + unit          = "None"
          + value         = "1"
        }
    }

  # module.waf_ip_blocklist.aws_iam_policy.ipv4_blocklist will be updated in-place
  ~ resource "aws_iam_policy" "ipv4_blocklist" {
        id               = "arn:aws:iam::957818836222:policy/ipv4_blocklist_forms_app"
        name             = "ipv4_blocklist_forms_app"
      ~ policy           = jsonencode(
          ~ {
              ~ Statement = [
                    {
                        Action   = [
                            "athena:StartQueryExecution",
                            "athena:GetQueryResults",
                            "athena:GetQueryExecution",
                        ]
                        Effect   = "Allow"
                        Resource = "arn:aws:athena:ca-central-1:957818836222:workgroup/primary"
                        Sid      = "AthenaQueryAccess"
                    },
                  ~ {
                      ~ Resource = [
                          ~ "arn:aws:athena:ca-central-1:957818836222:catalog/AwsDataCatalog/database/access_logs/table/waf_logs" -> "arn:aws:athena:ca-central-1:957818836222:catalog/AwsDataCatalog/database/access_logs/table/*",
                            "arn:aws:athena:ca-central-1:957818836222:catalog/AwsDataCatalog/database/access_logs",
                        ]
                        # (3 unchanged attributes hidden)
                    },
                  ~ {
                      ~ Resource = [
                          ~ "arn:aws:glue:ca-central-1:957818836222:table/access_logs/waf_logs" -> "arn:aws:glue:ca-central-1:957818836222:table/access_logs/*",
                            "arn:aws:glue:ca-central-1:957818836222:database/access_logs",
                            # (1 unchanged element hidden)
                        ]
                        # (3 unchanged attributes hidden)
                    },
                    {
                        Action   = [
                            "logs:PutLogEvents",
                            "logs:CreateLogStream",
                        ]
                        Effect   = "Allow"
                        Resource = "arn:aws:logs:ca-central-1:957818836222:log-group:/aws/lambda/ipv4_blocklist_forms_app:*"
                        Sid      = "CloudWatchWriteAccess"
                    },
                    # (3 unchanged elements hidden)
                ]
                # (1 unchanged attribute hidden)
            }
        )
        tags             = {
            "CostCentre" = "forms"
            "Terraform"  = "true"
        }
        # (7 unchanged attributes hidden)
    }

  # 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                  = "2024-09-26T17:01:41.564+0000" -> (known after apply)
      ~ source_code_hash               = "fCJk+rUL/Gi+YyFakKfRGodgqUC5Mq5QYcxBi1huoa0=" -> "x+q+cCA6WdzkkfRRAAH785MD20xSWJM6+iYOPe/0x+U="
        tags                           = {
            "CostCentre" = "forms"
            "Terraform"  = "true"
        }
        # (27 unchanged attributes hidden)

      ~ environment {
          ~ variables = {
              + "ATHENA_LB_TABLE"      = "lb_logs"
              - "ATHENA_TABLE"         = "waf_logs" -> null
              + "ATHENA_WAF_TABLE"     = "waf_logs"
              ~ "BLOCK_THRESHOLD"      = "20" -> "50"
              + "QUERY_LB"             = "true"
              + "QUERY_WAF"            = "false"
                # (7 unchanged elements hidden)
            }
        }

        # (3 unchanged blocks hidden)
    }

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

Changes to Outputs:
  + waf_ipv4_new_blocked_ip_metric_filter_name      = "IpAddedToBlockList"
  + waf_ipv4_new_blocked_ip_metric_filter_namespace = "CDS_Platform"

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

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_cloudfront_distribution.maintenance_mode"]
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_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: ["aws_s3_object.maintenance_static_page_html_files[\"index-fr.html\"]"]
WARN - plan.json - main - Missing Common Tags: ["aws_s3_object.maintenance_static_page_html_files[\"index.html\"]"]
WARN - plan.json - main - Missing Common Tags: ["aws_s3_object.maintenance_static_page_ico_files[\"favicon.ico\"]"]
WARN - plan.json - main - Missing Common Tags: ["aws_s3_object.maintenance_static_page_svg_files[\"site-unavailable.svg\"]"]
WARN - plan.json - main - Missing Common Tags: ["aws_shield_protection.alb"]
WARN - plan.json - main - Missing Common Tags: ["aws_shield_protection.route53_hosted_zone[0]"]
WARN - plan.json - main - Missing...

Copy link

github-actions bot commented Dec 9, 2024

Production: rds

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

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

Terraform will perform the following actions:

  # aws_rds_cluster_instance.forms will be updated in-place
  # (imported from "forms-db-cluster-instance-2")
  ~ resource "aws_rds_cluster_instance" "forms" {
        arn                                   = "arn:aws:rds:ca-central-1:957818836222:db:forms-db-cluster-instance-2"
        auto_minor_version_upgrade            = true
        availability_zone                     = "ca-central-1b"
        ca_cert_identifier                    = "rds-ca-rsa2048-g1"
        cluster_identifier                    = "forms-db-cluster"
        copy_tags_to_snapshot                 = false
        custom_iam_instance_profile           = null
        db_parameter_group_name               = "default.aurora-postgresql13"
        db_subnet_group_name                  = "forms-db"
        dbi_resource_id                       = "db-3ESH7AOUSU35REIYVYUBIHKCDQ"
        endpoint                              = "forms-db-cluster-instance-2.cuzmllmgzt4v.ca-central-1.rds.amazonaws.com"
        engine                                = "aurora-postgresql"
        engine_version                        = "13.12"
        engine_version_actual                 = "13.12"
        id                                    = "forms-db-cluster-instance-2"
        identifier                            = "forms-db-cluster-instance-2"
        identifier_prefix                     = null
        instance_class                        = "db.serverless"
        kms_key_id                            = "arn:aws:kms:ca-central-1:957818836222:key/b5b51877-b3cf-4165-92f8-b3396206c28b"
        monitoring_interval                   = 0
        monitoring_role_arn                   = null
        network_type                          = "IPV4"
        performance_insights_enabled          = false
        performance_insights_kms_key_id       = null
        performance_insights_retention_period = 0
        port                                  = 5432
        preferred_backup_window               = "07:00-09:00"
        preferred_maintenance_window          = "mon:10:08-mon:10:38"
        promotion_tier                        = 1
        publicly_accessible                   = false
        storage_encrypted                     = true
        tags                                  = {}
      ~ tags_all                              = {
          + "CostCentre" = "forms-platform-production"
          + "Terraform"  = "true"
        }
        writer                                = true
    }

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

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

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_rds_cluster.forms"]
WARN - plan.json - main - Missing Common Tags: ["aws_rds_cluster_instance.forms"]
WARN - plan.json - main - Missing Common Tags: ["aws_secretsmanager_secret.database_secret"]
WARN - plan.json - main - Missing Common Tags: ["aws_secretsmanager_secret.database_url"]
WARN - plan.json - main - Missing Common Tags: ["aws_secretsmanager_secret.rds_connector"]

24 tests, 19 passed, 5 warnings, 0 failures, 0 exceptions

Copy link

github-actions bot commented Dec 9, 2024

Production: app

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

Plan: 1 to add, 0 to change, 0 to destroy
Show summary
CHANGE NAME
add aws_ecs_task_definition.form_viewer
Show plan
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_ecs_task_definition.form_viewer will be created
  + resource "aws_ecs_task_definition" "form_viewer" {
      + arn                      = (known after apply)
      + arn_without_revision     = (known after apply)
      + container_definitions    = jsonencode(
            [
              + {
                  + environment      = [
                      + {
                          + name  = "AUDIT_LOG_QUEUE_URL"
                          + value = "https://sqs.ca-central-1.amazonaws.com/957818836222/audit_log_queue"
                        },
                      + {
                          + name  = "COGNITO_CLIENT_ID"
                          + value = "5rkjd3us3ocssieiitdbtjitiv"
                        },
                      + {
                          + name  = "COGNITO_ENDPOINT_URL"
                          + value = "cognito-idp.ca-central-1.amazonaws.com/ca-central-1_eSTGTCw33"
                        },
                      + {
                          + name  = "EMAIL_ADDRESS_CONTACT_US"
                          + value = "assistance+forms-formulaires@cds-snc.ca"
                        },
                      + {
                          + name  = "EMAIL_ADDRESS_SUPPORT"
                          + value = "assistance+forms-formulaires@cds-snc.ca"
                        },
                      + {
                          + name  = "HOST_URL"
                          + value = "https://forms-formulaires.alpha.canada.ca"
                        },
                      + {
                          + name  = "METRIC_PROVIDER"
                          + value = "stdout"
                        },
                      + {
                          + name  = "NEXTAUTH_URL"
                          + value = "https://forms-formulaires.alpha.canada.ca"
                        },
                      + {
                          + name  = "RECAPTCHA_V3_SITE_KEY"
                          + value = "6LfuLrQnAAAAAK9Df3gem4XLMRVY2Laq6t2fhZhZ"
                        },
                      + {
                          + name  = "REDIS_URL"
                          + value = "gcforms-redis-rep-group.iyrckm.ng.0001.cac1.cache.amazonaws.com"
                        },
                      + {
                          + name  = "RELIABILITY_FILE_STORAGE"
                          + value = "forms-production-reliability-file-storage"
                        },
                      + {
                          + name  = "REPROCESS_SUBMISSION_QUEUE_URL"
                          + value = "https://sqs.ca-central-1.amazonaws.com/957818836222/reprocess_submission_queue.fifo"
                        },
                      + {
                          + name  = "TEMPLATE_ID"
                          + value = "92096ac6-1cc5-40ae-9052-fffdb8439a90"
                        },
                      + {
                          + name  = "TEMPORARY_TOKEN_TEMPLATE_ID"
                          + value = "61cec9c4-64ca-4e4d-b4d2-a0e931c44422"
                        },
                      + {
                          + name  = "TRACER_PROVIDER"
                          + value = "stdout"
                        },
                      + {
                          + name  = "VAULT_FILE_STORAGE"
                          + value = "forms-production-vault-file-storage"
                        },
                      + {
                          + name  = "ZITADEL_PROVIDER"
                          + value = "https://auth.forms-formulaires.alpha.canada.ca"
                        },
                    ]
                  + essential        = true
                  + image            = "957818836222.dkr.ecr.ca-central-1.amazonaws.com/form_viewer_production"
                  + linuxParameters  = {
                      + capabilities = {
                          + add  = []
                          + drop = [
                              + "ALL",
                            ]
                        }
                    }
                  + logConfiguration = {
                      + logDriver = "awslogs"
                      + options   = {
                          + awslogs-group         = "Forms"
                          + awslogs-region        = "ca-central-1"
                          + awslogs-stream-prefix = "ecs-form-viewer"
                        }
                    }
                  + mountPoints      = []
                  + name             = "form_viewer"
                  + portMappings     = [
                      + {
                          + containerPort = 3000
                          + hostPort      = 3000
                          + protocol      = "tcp"
                        },
                    ]
                  + secrets          = [
                      + {
                          + name      = "DATABASE_URL"
                          + valueFrom = "arn:aws:secretsmanager:ca-central-1:957818836222:secret:server-database-url-jVtWGE"
                        },
                      + {
                          + name      = "FRESHDESK_API_KEY"
                          + valueFrom = "arn:aws:secretsmanager:ca-central-1:957818836222:secret:freshdesk_api_key-2Q118n"
                        },
                      + {
                          + name      = "GC_NOTIFY_CALLBACK_BEARER_TOKEN"
                          + valueFrom = "arn:aws:secretsmanager:ca-central-1:957818836222:secret:notify_callback_bearer_token-sWF9yQ"
                        },
                      + {
                          + name      = "NOTIFY_API_KEY"
                          + valueFrom = "arn:aws:secretsmanager:ca-central-1:957818836222:secret:notify_api_key-sLtddr"
                        },
                      + {
                          + name      = "RECAPTCHA_V3_SECRET_KEY"
                          + valueFrom = "arn:aws:secretsmanager:ca-central-1:957818836222:secret:recaptcha_secret-LxfCjN"
                        },
                      + {
                          + name      = "SENTRY_API_KEY"
                          + valueFrom = "arn:aws:secretsmanager:ca-central-1:957818836222:secret:sentry_api_key-zulAvy"
                        },
                      + {
                          + name      = "TOKEN_SECRET"
                          + valueFrom = "arn:aws:secretsmanager:ca-central-1:957818836222:secret:token_secret-jw4Dou"
                        },
                      + {
                          + name      = "ZITADEL_ADMINISTRATION_KEY"
                          + valueFrom = "arn:aws:secretsmanager:ca-central-1:957818836222:secret:zitadel_administration_key-7rE09g"
                        },
                    ]
                  + systemControls   = []
                  + volumesFrom      = []
                },
            ]
        )
      + cpu                      = "2048"
      + execution_role_arn       = "arn:aws:iam::957818836222:role/form-viewer"
      + family                   = "form-viewer"
      + id                       = (known after apply)
      + memory                   = "4096"
      + network_mode             = "awsvpc"
      + requires_compatibilities = [
          + "FARGATE",
        ]
      + revision                 = (known after apply)
      + skip_destroy             = false
      + tags_all                 = {
          + "CostCentre" = "forms-platform-production"
          + "Terraform"  = "true"
        }
      + task_role_arn            = "arn:aws:iam::957818836222:role/form-viewer"
      + track_latest             = false
    }

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

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

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_appautoscaling_target.forms[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.forms"]
WARN - plan.json - main - Missing Common Tags: ["aws_codedeploy_app.app"]
WARN - plan.json - main - Missing Common Tags: ["aws_codedeploy_deployment_group.app"]
WARN - plan.json - main - Missing Common Tags: ["aws_ecs_cluster.forms"]
WARN - plan.json - main - Missing Common Tags: ["aws_ecs_service.form_viewer"]
WARN - plan.json - main - Missing Common Tags: ["aws_ecs_task_definition.form_viewer"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.cognito"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.forms_dynamodb"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.forms_kms"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.forms_s3"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.forms_secrets_manager"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.forms_sqs"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_role.codedeploy"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_role.forms"]

34 tests, 19 passed, 15 warnings, 0 failures, 0 exceptions

Copy link

github-actions bot commented Dec 9, 2024

Production: lambdas

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

Plan: 0 to add, 3 to change, 0 to destroy
Show summary
CHANGE NAME
update aws_iam_policy.lambda_secrets
aws_lambda_function.nagware
aws_lambda_function.reliability
Show plan
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # aws_iam_policy.lambda_secrets will be updated in-place
  ~ resource "aws_iam_policy" "lambda_secrets" {
        id               = "arn:aws:iam::957818836222:policy/lambda_secrets"
        name             = "lambda_secrets"
      ~ policy           = jsonencode(
          ~ {
              ~ Statement = [
                  ~ {
                      ~ Resource = [
                          + "arn:aws:secretsmanager:ca-central-1:957818836222:secret:server-database-url-jVtWGE",
                            "arn:aws:secretsmanager:ca-central-1:957818836222:secret:notify_api_key-sLtddr",
                            # (1 unchanged element hidden)
                        ]
                        # (2 unchanged attributes hidden)
                    },
                ]
                # (1 unchanged attribute hidden)
            }
        )
        tags             = {}
        # (7 unchanged attributes hidden)
    }

  # aws_lambda_function.nagware will be updated in-place
  ~ resource "aws_lambda_function" "nagware" {
        id                             = "nagware"
        tags                           = {}
        # (28 unchanged attributes hidden)

      ~ environment {
          ~ variables = {
              - "DB_ARN"                    = "arn:aws:rds:ca-central-1:957818836222:cluster:forms-db-cluster" -> null
              - "DB_NAME"                   = "forms" -> null
              - "DB_SECRET"                 = "arn:aws:secretsmanager:ca-central-1:957818836222:secret:database-secret-RThElE" -> null
              + "DB_URL"                    = "arn:aws:secretsmanager:ca-central-1:957818836222:secret:server-database-url-jVtWGE"
                # (8 unchanged elements hidden)
            }
        }

      ~ vpc_config {
          ~ security_group_ids          = [
              - "sg-05873c4492257f62c",
              + "sg-1234",
            ]
            # (3 unchanged attributes hidden)
        }

        # (3 unchanged blocks hidden)
    }

  # aws_lambda_function.reliability will be updated in-place
  ~ resource "aws_lambda_function" "reliability" {
        id                             = "reliability"
        tags                           = {}
        # (28 unchanged attributes hidden)

      ~ environment {
          ~ variables = {
              - "DB_ARN"         = "arn:aws:rds:ca-central-1:957818836222:cluster:forms-db-cluster" -> null
              - "DB_NAME"        = "forms" -> null
              - "DB_SECRET"      = "arn:aws:secretsmanager:ca-central-1:957818836222:secret:database-secret-RThElE" -> null
              + "DB_URL"         = "arn:aws:secretsmanager:ca-central-1:957818836222:secret:server-database-url-jVtWGE"
                # (5 unchanged elements hidden)
            }
        }

      + vpc_config {
          + ipv6_allowed_for_dual_stack = false
          + security_group_ids          = [
              + "sg-1234",
            ]
          + subnet_ids                  = [
              + "subnet-025adc92b0ee815ba",
              + "subnet-05b9cd59ad60e88af",
              + "subnet-066cf27132a20a02a",
            ]
        }

        # (3 unchanged blocks hidden)
    }

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

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

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.audit_logs_archiver_lambda_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.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.nagware"]
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 Common Tags: ["aws_iam_policy.lambda_dynamodb"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.lambda_kms"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.lambda_logging"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.lambda_rds"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.lambda_s3"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.lambda_secrets"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.lambda_sns"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.lambda_sqs"]
WARN -...

Copy link

github-actions bot commented Dec 9, 2024

Production: alarms

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

Plan: 1 to add, 10 to change, 0 to destroy
Show summary
CHANGE NAME
update aws_cloudwatch_log_subscription_filter.api_error_detection
aws_cloudwatch_metric_alarm.ELB_healthy_hosts
aws_cloudwatch_metric_alarm.UnHealthyHostCount-TargetGroup1
aws_cloudwatch_metric_alarm.UnHealthyHostCount-TargetGroup2
aws_cloudwatch_metric_alarm.api_lb_healthy_host_count
aws_cloudwatch_metric_alarm.api_lb_unhealthy_host_count
aws_cloudwatch_metric_alarm.idb_lb_healthy_host_count["HTTP1"]
aws_cloudwatch_metric_alarm.idb_lb_healthy_host_count["HTTP2"]
aws_cloudwatch_metric_alarm.idb_lb_unhealthy_host_count["HTTP1"]
aws_cloudwatch_metric_alarm.idb_lb_unhealthy_host_count["HTTP2"]
add aws_cloudwatch_metric_alarm.ip_added_to_block_list
Show plan
Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # aws_cloudwatch_log_subscription_filter.api_error_detection will be updated in-place
  ~ resource "aws_cloudwatch_log_subscription_filter" "api_error_detection" {
      ~ filter_pattern  = "level=error" -> "{($.level = \"warn\") || ($.level = \"error\")}"
        id              = "cwlsf-973426895"
        name            = "error_detection_in_api_logs"
        # (4 unchanged attributes hidden)
    }

  # aws_cloudwatch_metric_alarm.ELB_healthy_hosts will be updated in-place
  ~ resource "aws_cloudwatch_metric_alarm" "ELB_healthy_hosts" {
        id                                    = "App-HealthyHostCount-SEV1"
        tags                                  = {}
      ~ treat_missing_data                    = "notBreaching" -> "breaching"
        # (21 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # aws_cloudwatch_metric_alarm.UnHealthyHostCount-TargetGroup1 will be updated in-place
  ~ resource "aws_cloudwatch_metric_alarm" "UnHealthyHostCount-TargetGroup1" {
        id                                    = "App-UnHealthyHostCount-TargetGroup1"
        tags                                  = {}
      ~ treat_missing_data                    = "notBreaching" -> "breaching"
        # (21 unchanged attributes hidden)
    }

  # aws_cloudwatch_metric_alarm.UnHealthyHostCount-TargetGroup2 will be updated in-place
  ~ resource "aws_cloudwatch_metric_alarm" "UnHealthyHostCount-TargetGroup2" {
        id                                    = "App-UnHealthyHostCount-TargetGroup2"
        tags                                  = {}
      ~ treat_missing_data                    = "notBreaching" -> "breaching"
        # (21 unchanged attributes hidden)
    }

  # aws_cloudwatch_metric_alarm.api_lb_healthy_host_count will be updated in-place
  ~ resource "aws_cloudwatch_metric_alarm" "api_lb_healthy_host_count" {
        id                                    = "API-HealthyHostCount"
        tags                                  = {}
      ~ treat_missing_data                    = "notBreaching" -> "breaching"
        # (21 unchanged attributes hidden)
    }

  # aws_cloudwatch_metric_alarm.api_lb_unhealthy_host_count will be updated in-place
  ~ resource "aws_cloudwatch_metric_alarm" "api_lb_unhealthy_host_count" {
        id                                    = "API-UnhealthyHostCount"
        tags                                  = {}
      ~ treat_missing_data                    = "notBreaching" -> "breaching"
        # (21 unchanged attributes hidden)
    }

  # aws_cloudwatch_metric_alarm.idb_lb_healthy_host_count["HTTP1"] will be updated in-place
  ~ resource "aws_cloudwatch_metric_alarm" "idb_lb_healthy_host_count" {
        id                                    = "IdP-HealthyHostCount-HTTP1"
        tags                                  = {}
      ~ treat_missing_data                    = "notBreaching" -> "breaching"
        # (21 unchanged attributes hidden)
    }

  # aws_cloudwatch_metric_alarm.idb_lb_healthy_host_count["HTTP2"] will be updated in-place
  ~ resource "aws_cloudwatch_metric_alarm" "idb_lb_healthy_host_count" {
        id                                    = "IdP-HealthyHostCount-HTTP2"
        tags                                  = {}
      ~ treat_missing_data                    = "notBreaching" -> "breaching"
        # (21 unchanged attributes hidden)
    }

  # aws_cloudwatch_metric_alarm.idb_lb_unhealthy_host_count["HTTP1"] will be updated in-place
  ~ resource "aws_cloudwatch_metric_alarm" "idb_lb_unhealthy_host_count" {
        id                                    = "IdP-UnhealthyHostCount-HTTP1"
        tags                                  = {}
      ~ treat_missing_data                    = "notBreaching" -> "breaching"
        # (21 unchanged attributes hidden)
    }

  # aws_cloudwatch_metric_alarm.idb_lb_unhealthy_host_count["HTTP2"] will be updated in-place
  ~ resource "aws_cloudwatch_metric_alarm" "idb_lb_unhealthy_host_count" {
        id                                    = "IdP-UnhealthyHostCount-HTTP2"
        tags                                  = {}
      ~ treat_missing_data                    = "notBreaching" -> "breaching"
        # (21 unchanged attributes hidden)
    }

  # aws_cloudwatch_metric_alarm.ip_added_to_block_list will be created
  + resource "aws_cloudwatch_metric_alarm" "ip_added_to_block_list" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:957818836222:alert-warning",
        ]
      + alarm_description                     = "WAF - IP(s) Has been added to the dynamic block list."
      + alarm_name                            = "IpAddedToBlockList"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "default"
      + namespace                             = "default"
      + period                                = 900
      + statistic                             = "Sum"
      + tags_all                              = {
          + "CostCentre" = "forms-platform-production"
          + "Terraform"  = "true"
        }
      + threshold                             = 1
      + treat_missing_data                    = "notBreaching"
    }

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

Warning: Argument is deprecated

  with module.athena_bucket.aws_s3_bucket.this,
  on .terraform/modules/athena_bucket/S3/main.tf line 8, in resource "aws_s3_bucket" "this":
   8: resource "aws_s3_bucket" "this" {

Use the aws_s3_bucket_server_side_encryption_configuration resource instead

(and 3 more similar warnings elsewhere)

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

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_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.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.UnHealthyHostCount-TargetGroup1"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.UnHealthyHostCount-TargetGroup2"]
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_audit_log_dead_letter_queue_warn"]
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.audit_log_dead_letter_queue_warn"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.cognito_login_outside_canada_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:...

@bryan-robitaille bryan-robitaille merged commit d293a2e into main Dec 10, 2024
32 checks passed
@bryan-robitaille bryan-robitaille deleted the release-please--branches--main branch December 10, 2024 14:06
@sre-read-write
Copy link
Contributor Author

🤖 Created releases:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant