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

Release 2.16.39 #1588

Merged
merged 4 commits into from
Oct 16, 2024
Merged

Release 2.16.39 #1588

merged 4 commits into from
Oct 16, 2024

Conversation

sastels
Copy link
Contributor

@sastels sastels commented Oct 16, 2024

Summary | Résumé

Reviewer checklist | Liste de vérification du réviseur

  • This PR does not break existing functionality.
  • This PR does not violate GCNotify's privacy policies.
  • This PR does not raise new security concerns. Refer to our GC Notify Risk Register document on our Google drive.
  • This PR does not significantly alter performance.
  • Additional required documentation resulting of these changes is covered (such as the README, setup instructions, a related ADR or the technical documentation).

⚠ If boxes cannot be checked off before merging the PR, they should be moved to the "Release Instructions" section with appropriate steps required to verify before release. For example, changes to celery code may require tests on staging to verify that performance has not been affected.

@sastels sastels changed the title Release 2.16.38 Release 2.16.39 Oct 16, 2024
@sastels sastels marked this pull request as ready for review October 16, 2024 14:55
@sastels sastels requested a review from jimleroyer as a code owner October 16, 2024 14:55
@sastels sastels requested a review from a team October 16, 2024 14:55
Copy link
Contributor

@ben851 ben851 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@P0NDER0SA P0NDER0SA left a comment

Choose a reason for hiding this comment

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

OK, plans look good now

Copy link

production: common

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

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

Plan: 11 to add, 0 to change, 4 to destroy
Show summary
CHANGE NAME
add aws_cloudwatch_query_definition.sms-sns-blocked-as-spam[0]
aws_cloudwatch_query_definition.sms-sns-carrier-dwell-times[0]
aws_cloudwatch_query_definition.sms-sns-get-failures[0]
aws_cloudwatch_query_definition.sms-sns-get-sms-logs-by-phone-number[0]
aws_cloudwatch_query_definition.sms-sns-international-sending-status[0]
aws_cloudwatch_query_definition.sms-sns-success-vs-unreachable[0]
aws_cloudwatch_query_definition.sms-sns-unreachable-phone-numbers[0]
recreate module.notify_slack_critical.module.lambda.null_resource.archive[0]
module.notify_slack_general.module.lambda.null_resource.archive[0]
module.notify_slack_ok.module.lambda.null_resource.archive[0]
module.notify_slack_warning.module.lambda.null_resource.archive[0]
Show plan
Resource actions are indicated with the following symbols:
  + create
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # aws_cloudwatch_query_definition.sms-sns-blocked-as-spam[0] will be created
  + resource "aws_cloudwatch_query_definition" "sms-sns-blocked-as-spam" {
      + id                  = (known after apply)
      + log_group_names     = [
          + (sensitive value),
        ]
      + name                = "SMS (SNS) / Block as spam"
      + query_definition_id = (known after apply)
      + query_string        = <<-EOT
            fields @timestamp as Timestamp, delivery.phoneCarrier as Carrier, delivery.providerResponse as `Provider response`, delivery.destination as `Destination phone number`
            | filter delivery.providerResponse like 'spam'
            | sort Timestamp desc
            | limit 100
            }
        EOT
    }

  # aws_cloudwatch_query_definition.sms-sns-carrier-dwell-times[0] will be created
  + resource "aws_cloudwatch_query_definition" "sms-sns-carrier-dwell-times" {
      + id                  = (known after apply)
      + log_group_names     = [
          + (sensitive value),
          + (sensitive value),
        ]
      + name                = "SMS (SNS) / Carrier dwell times"
      + query_definition_id = (known after apply)
      + query_string        = <<-EOT
            stats avg(delivery.dwellTimeMsUntilDeviceAck / 1000 / 60) as Avg_carrier_time_minutes, 
            | count(*) as Number by delivery.phoneCarrier as Carrier
        EOT
    }

  # aws_cloudwatch_query_definition.sms-sns-get-failures[0] will be created
  + resource "aws_cloudwatch_query_definition" "sms-sns-get-failures" {
      + id                  = (known after apply)
      + log_group_names     = [
          + (sensitive value),
        ]
      + name                = "SMS (SNS) / Get failures"
      + query_definition_id = (known after apply)
      + query_string        = <<-EOT
            fields @timestamp as Timestamp, status, delivery.phoneCarrier as Carrier, delivery.providerResponse as `Provider response`, delivery.destination as `Destination phone number`, notification.messageId as messageId, @message
            | filter status = 'FAILURE'
            | sort Timestamp desc
            | limit 200
        EOT
    }

  # aws_cloudwatch_query_definition.sms-sns-get-sms-logs-by-phone-number[0] will be created
  + resource "aws_cloudwatch_query_definition" "sms-sns-get-sms-logs-by-phone-number" {
      + id                  = (known after apply)
      + log_group_names     = [
          + (sensitive value),
          + (sensitive value),
        ]
      + name                = "SMS (SNS) / Get SMS logs by phone number"
      + query_definition_id = (known after apply)
      + query_string        = <<-EOT
            fields @timestamp as Timestamp, status as Status, notification.messageId as `Message ID`,
                delivery.destination as `Destination phone number`, delivery.providerResponse as `Provider response`,
                delivery.smsType as `Message type`
            | filter delivery.destination like '1416xxxxxxx'
            | sort Timestamp desc
            | limit 100
        EOT
    }

  # aws_cloudwatch_query_definition.sms-sns-international-sending-status[0] will be created
  + resource "aws_cloudwatch_query_definition" "sms-sns-international-sending-status" {
      + id                  = (known after apply)
      + log_group_names     = [
          + (sensitive value),
          + (sensitive value),
        ]
      + name                = "SMS (SNS) / International sending status"
      + query_definition_id = (known after apply)
      + query_string        = <<-EOT
            fields @timestamp, @message, delivery.mcc as CountryCode, status
            | stats count(*) as Event_Count by CountryCode, status
            | display CountryCode, status, Event_Count
            | sort CountryCode asc
            | limit 200
        EOT
    }

  # aws_cloudwatch_query_definition.sms-sns-success-vs-unreachable[0] will be created
  + resource "aws_cloudwatch_query_definition" "sms-sns-success-vs-unreachable" {
      + id                  = (known after apply)
      + log_group_names     = [
          + (sensitive value),
          + (sensitive value),
        ]
      + name                = "SMS (SNS) / Success vs Unreachable"
      + query_definition_id = (known after apply)
      + query_string        = <<-EOT
            fields @timestamp, delivery.providerResponse
            | parse delivery.providerResponse "Phone is currently unreachable/*" as @unavailable
            | parse delivery.providerResponse "Message has been * by phone" as @available
            | sort @timestamp desc
            | stats count(@unavailable), count(@available), count(*) by bin(1h)
        EOT
    }

  # aws_cloudwatch_query_definition.sms-sns-unreachable-phone-numbers[0] will be created
  + resource "aws_cloudwatch_query_definition" "sms-sns-unreachable-phone-numbers" {
      + id                  = (known after apply)
      + log_group_names     = [
          + (sensitive value),
        ]
      + name                = "SMS (SNS) / Unreachable phone numbers"
      + query_definition_id = (known after apply)
      + query_string        = <<-EOT
            fields @timestamp, delivery.providerResponse
            | filter delivery.providerResponse like "Phone is currently unreachable/unavailable"
            | sort @timestamp desc
            | limit 20
        EOT
    }

  # module.notify_slack_critical.module.lambda.null_resource.archive[0] must be replaced
-/+ resource "null_resource" "archive" {
      ~ id       = "6187438114832106356" -> (known after apply)
      ~ triggers = { # forces replacement
          ~ "timestamp" = "1729001815671558000" -> "1729091260144408000"
            # (1 unchanged element hidden)
        }
    }

  # module.notify_slack_general.module.lambda.null_resource.archive[0] must be replaced
-/+ resource "null_resource" "archive" {
      ~ id       = "2508544928154683541" -> (known after apply)
      ~ triggers = { # forces replacement
          ~ "timestamp" = "1729001807444200000" -> "1729091253219266000"
            # (1 unchanged element hidden)
        }
    }

  # module.notify_slack_ok.module.lambda.null_resource.archive[0] must be replaced
-/+ resource "null_resource" "archive" {
      ~ id       = "373117908523642931" -> (known after apply)
      ~ triggers = { # forces replacement
          ~ "timestamp" = "1729001815676122000" -> "1729091260152823000"
            # (1 unchanged element hidden)
        }
    }

  # module.notify_slack_warning.module.lambda.null_resource.archive[0] must be replaced
-/+ resource "null_resource" "archive" {
      ~ id       = "2825053213602660775" -> (known after apply)
      ~ triggers = { # forces replacement
          ~ "timestamp" = "1729001815716216000" -> "1729091260197567000"
            # (1 unchanged element hidden)
        }
    }

Plan: 11 to add, 0 to change, 4 to destroy.

Warning: Argument is deprecated

  with aws_s3_bucket.csv_bucket,
  on s3.tf line 5, in resource "aws_s3_bucket" "csv_bucket":
   5: resource "aws_s3_bucket" "csv_bucket" {

Use the aws_s3_bucket_lifecycle_configuration resource instead

(and 67 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_workgroup.ad_hoc"]
WARN - plan.json - main - Missing Common Tags: ["aws_athena_workgroup.build_tables"]
WARN - plan.json - main - Missing Common Tags: ["aws_athena_workgroup.primary"]
WARN - plan.json - main - Missing Common Tags: ["aws_athena_workgroup.support"]
WARN - plan.json - main - Missing Common Tags: ["aws_budgets_budget.notify_global"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.aws_health[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.route53_resolver_query_log[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.sns_deliveries[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.sns_deliveries_failures[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.sns_deliveries_failures_us_west_2[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.sns_deliveries_us_west_2[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.bulk-bulk-not-being-processed-critical[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.bulk-bulk-not-being-processed-warning[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.bulk-inflights-not-being-processed-critical[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.bulk-inflights-not-being-processed-warning[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.bulk-not-being-processed-critical[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.bulk-not-being-processed-warning[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.contact-3-500-error-15-minutes-critical[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.document-download-bucket-size-warning[0]"]
WARN - plan.json...

Copy link

production: pinpoint_to_sqs_sms_callbacks

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

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

Plan: 19 to add, 0 to change, 1 to destroy
Show summary
CHANGE NAME
add aws_cloudwatch_log_metric_filter.pinpoint-sms-failures-carriers[0]
aws_cloudwatch_metric_alarm.pinpoint-sms-failures-bell-warning[0]
aws_cloudwatch_metric_alarm.pinpoint-sms-failures-bragg-warning[0]
aws_cloudwatch_metric_alarm.pinpoint-sms-failures-freedom-warning[0]
aws_cloudwatch_metric_alarm.pinpoint-sms-failures-iristel-warning[0]
aws_cloudwatch_metric_alarm.pinpoint-sms-failures-maritime-warning[0]
aws_cloudwatch_metric_alarm.pinpoint-sms-failures-mts-warning[0]
aws_cloudwatch_metric_alarm.pinpoint-sms-failures-rogers-warning[0]
aws_cloudwatch_metric_alarm.pinpoint-sms-failures-telus-warning[0]
aws_cloudwatch_metric_alarm.pinpoint-sms-failures-videotron-warning[0]
aws_cloudwatch_query_definition.pinpoint-sms-blocked-as-spam[0]
aws_cloudwatch_query_definition.pinpoint-sms-carrier-dwell-times[0]
aws_cloudwatch_query_definition.pinpoint-sms-failures-by-carrier[0]
aws_cloudwatch_query_definition.pinpoint-sms-get-failures[0]
aws_cloudwatch_query_definition.pinpoint-sms-get-logs[0]
aws_cloudwatch_query_definition.pinpoint-sms-get-sms-logs-by-dest-phone-number[0]
aws_cloudwatch_query_definition.pinpoint-sms-get-sms-logs-by-orig-phone-number[0]
aws_cloudwatch_query_definition.pinpoint-sms-international-sending-status[0]
aws_cloudwatch_query_definition.pinpoint-sms-success-vs-unreachable[0]
delete aws_cloudwatch_query_definition.pinpoint-logs[0]
Show plan
Resource actions are indicated with the following symbols:
  + create
  - destroy

Terraform will perform the following actions:

  # aws_cloudwatch_log_group.pinpoint_deliveries has moved to aws_cloudwatch_log_group.pinpoint_deliveries[0]
    resource "aws_cloudwatch_log_group" "pinpoint_deliveries" {
        id                = "sns/ca-central-1/296255494825/PinpointDirectPublishToPhoneNumber"
        name              = (sensitive value)
        tags              = {
            "CostCenter" = "notification-canada-ca-production"
        }
        # (7 unchanged attributes hidden)
    }

  # aws_cloudwatch_log_group.pinpoint_deliveries_failures has moved to aws_cloudwatch_log_group.pinpoint_deliveries_failures[0]
    resource "aws_cloudwatch_log_group" "pinpoint_deliveries_failures" {
        id                = "sns/ca-central-1/296255494825/PinpointDirectPublishToPhoneNumber/Failure"
        name              = (sensitive value)
        tags              = {
            "CostCenter" = "notification-canada-ca-production"
        }
        # (7 unchanged attributes hidden)
    }

  # aws_cloudwatch_log_metric_filter.pinpoint-sms-failures-carriers[0] will be created
  + resource "aws_cloudwatch_log_metric_filter" "pinpoint-sms-failures-carriers" {
      + id             = (known after apply)
      + log_group_name = (sensitive value)
      + name           = "pinpoint-sms-failures-carriers"
      + pattern        = "{ ($.isFinal IS TRUE) && ($.carrierName != \"\" && ( ($.messageStatus != \"SUCCESSFUL\") && ($.messageStatus != \"DELIVERED\") )) }"

      + metric_transformation {
          + dimensions = {
              + "Carrier" = "$.carrierName"
            }
          + name       = "pinpoint-sms-failures-carriers"
          + namespace  = "LogMetrics"
          + unit       = "None"
          + value      = "1"
        }
    }

  # aws_cloudwatch_metric_alarm.pinpoint-sms-failures-bell-warning[0] will be created
  + resource "aws_cloudwatch_metric_alarm" "pinpoint-sms-failures-bell-warning" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:296255494825:alert-warning",
        ]
      + alarm_description                     = "Pinpoint SMS failures are more than 50 for Bell Cellular Inc. / Aliant Telecom."
      + alarm_name                            = "pinpoint-sms-failures-bell-warning"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "Carrier" = "Bell Cellular Inc. / Aliant Telecom"
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "pinpoint-sms-failures-carriers"
      + namespace                             = "LogMetrics"
      + ok_actions                            = [
          + "arn:aws:sns:ca-central-1:296255494825:alert-warning",
        ]
      + period                                = 300
      + statistic                             = "Sum"
      + tags_all                              = (known after apply)
      + threshold                             = 50
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.pinpoint-sms-failures-bragg-warning[0] will be created
  + resource "aws_cloudwatch_metric_alarm" "pinpoint-sms-failures-bragg-warning" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:296255494825:alert-warning",
        ]
      + alarm_description                     = "Pinpoint SMS failures are more than 50 for BRAGG Communications INC."
      + alarm_name                            = "pinpoint-sms-failures-bragg-warning"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "Carrier" = "BRAGG Communications INC."
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "pinpoint-sms-failures-carriers"
      + namespace                             = "LogMetrics"
      + ok_actions                            = [
          + "arn:aws:sns:ca-central-1:296255494825:alert-warning",
        ]
      + period                                = 300
      + statistic                             = "Sum"
      + tags_all                              = (known after apply)
      + threshold                             = 50
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.pinpoint-sms-failures-freedom-warning[0] will be created
  + resource "aws_cloudwatch_metric_alarm" "pinpoint-sms-failures-freedom-warning" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:296255494825:alert-warning",
        ]
      + alarm_description                     = "Pinpoint SMS failures are more than 50 for Freedom Mobile Inc."
      + alarm_name                            = "pinpoint-sms-failures-freedom-warning"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "Carrier" = "Freedom Mobile Inc."
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "pinpoint-sms-failures-carriers"
      + namespace                             = "LogMetrics"
      + ok_actions                            = [
          + "arn:aws:sns:ca-central-1:296255494825:alert-warning",
        ]
      + period                                = 300
      + statistic                             = "Sum"
      + tags_all                              = (known after apply)
      + threshold                             = 50
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.pinpoint-sms-failures-iristel-warning[0] will be created
  + resource "aws_cloudwatch_metric_alarm" "pinpoint-sms-failures-iristel-warning" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:296255494825:alert-warning",
        ]
      + alarm_description                     = "Pinpoint SMS failures are more than 50 for Iristel Inc."
      + alarm_name                            = "pinpoint-sms-failures-iristel-warning"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "Carrier" = "Iristel Inc."
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "pinpoint-sms-failures-carriers"
      + namespace                             = "LogMetrics"
      + ok_actions                            = [
          + "arn:aws:sns:ca-central-1:296255494825:alert-warning",
        ]
      + period                                = 300
      + statistic                             = "Sum"
      + tags_all                              = (known after apply)
      + threshold                             = 50
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.pinpoint-sms-failures-maritime-warning[0] will be created
  + resource "aws_cloudwatch_metric_alarm" "pinpoint-sms-failures-maritime-warning" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:296255494825:alert-warning",
        ]
      + alarm_description                     = "Pinpoint SMS failures are more than 50 for Maritime Telephone & Telegraph Ltd."
      + alarm_name                            = "pinpoint-sms-failures-maritime-warning"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "Carrier" = "Maritime Telephone & Telegraph Ltd"
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "pinpoint-sms-failures-carriers"
      + namespace                             = "LogMetrics"
      + ok_actions                            = [
          + "arn:aws:sns:ca-central-1:296255494825:alert-warning",
        ]
      + period                                = 300
      + statistic                             = "Sum"
      + tags_all                              = (known after apply)
      + threshold                             = 50
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.pinpoint-sms-failures-mts-warning[0] will be created
  + resource "aws_cloudwatch_metric_alarm" "pinpoint-sms-failures-mts-warning" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:296255494825:alert-warning",
        ]
      + alarm_description                     = "Pinpoint SMS failures are more than 50 for MTS Communications Inc."
      + alarm_name                            = "pinpoint-sms-failures-mts-warning"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "Carrier" = "MTS Communications Inc."
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "pinpoint-sms-failures-carriers"
      + namespace                             = "LogMetrics"
      + ok_actions                            = [
          + "arn:aws:sns:ca-central-1:296255494825:alert-warning",
        ]
      + period                                = 300
      + statistic                             = "Sum"
      + tags_all                              = (known after apply)
      + threshold                             = 50
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.pinpoint-sms-failures-rogers-warning[0] will be created
  + resource "aws_cloudwatch_metric_alarm" "pinpoint-sms-failures-rogers-warning" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:296255494825:alert-warning",
        ]
      + alarm_description                     = "Pinpoint SMS failures are more than 50 for Rogers Communications Canada Inc."
      + alarm_name                            = "pinpoint-sms-failures-rogers-warning"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "Carrier" = "Rogers Communications Canada Inc."
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "pinpoint-sms-failures-carriers"
      + namespace                             = "LogMetrics"
      + ok_actions                            = [
          + "arn:aws:sns:ca-central-1:296255494825:alert-warning",
        ]
      + period                                = 300
      + statistic                             = "Sum"
      + tags_all                              = (known after apply)
      + threshold                             = 50
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.pinpoint-sms-failures-telus-warning[0] will be created
  + resource "aws_cloudwatch_metric_alarm" "pinpoint-sms-failures-telus-warning" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:296255494825:alert-warning",
        ]
      + alarm_description                     = "Pinpoint SMS failures are more than 50 for Telus Communications"
      + alarm_name                            = "pinpoint-sms-failures-telus-warning"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "Carrier" = "Telus Communications"
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "pinpoint-sms-failures-carriers"
      + namespace                             = "LogMetrics"
      + ok_actions                            = [
          + "arn:aws:sns:ca-central-1:296255494825:alert-warning",
        ]
      + period                                = 300
      + statistic                             = "Sum"
      + tags_all                              = (known after apply)
      + threshold                             = 50
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_metric_alarm.pinpoint-sms-failures-videotron-warning[0] will be created
  + resource "aws_cloudwatch_metric_alarm" "pinpoint-sms-failures-videotron-warning" {
      + actions_enabled                       = true
      + alarm_actions                         = [
          + "arn:aws:sns:ca-central-1:296255494825:alert-warning",
        ]
      + alarm_description                     = "Pinpoint SMS failures are more than 50 for Videotron Ltd."
      + alarm_name                            = "pinpoint-sms-failures-videotron-warning"
      + arn                                   = (known after apply)
      + comparison_operator                   = "GreaterThanThreshold"
      + dimensions                            = {
          + "Carrier" = "Videotron Ltd."
        }
      + evaluate_low_sample_count_percentiles = (known after apply)
      + evaluation_periods                    = 1
      + id                                    = (known after apply)
      + metric_name                           = "pinpoint-sms-failures-carriers"
      + namespace                             = "LogMetrics"
      + ok_actions                            = [
          + "arn:aws:sns:ca-central-1:296255494825:alert-warning",
        ]
      + period                                = 300
      + statistic                             = "Sum"
      + tags_all                              = (known after apply)
      + threshold                             = 50
      + treat_missing_data                    = "notBreaching"
    }

  # aws_cloudwatch_query_definition.pinpoint-logs[0] will be destroyed
  # (because aws_cloudwatch_query_definition.pinpoint-logs is not in configuration)
  - resource "aws_cloudwatch_query_definition" "pinpoint-logs" {
      - id                  = "267b3b29-2a72-44e2-af14-95de8773bcfc" -> null
      - log_group_names     = [
          - (sensitive value),
        ] -> null
      - name                = "SMS / Pinpoint logs" -> null
      - query_definition_id = "267b3b29-2a72-44e2-af14-95de8773bcfc" -> null
      - query_string        = <<-EOT
            fields @timestamp, destinationPhoneNumber, messageStatus, messageStatusDescription, @logStream
            | filter isFinal
            | sort @timestamp desc
            | limit 100
        EOT -> null
    }

  # aws_cloudwatch_query_definition.pinpoint-sms-blocked-as-spam[0] will be created
  + resource "aws_cloudwatch_query_definition" "pinpoint-sms-blocked-as-spam" {
      + id                  = (known after apply)
      + log_group_names     = [
          + (sensitive value),
        ]
      + name                = "SMS (Pinpoint) / Block as spam"
      + query_definition_id = (known after apply)
      + query_string        = <<-EOT
            fields @timestamp as Timestamp, carrierName as Carrier, messageStatus as `Provider response`, 
            originationPhoneNumber as `Origination phone number`, destinationPhoneNumber as `Destination phone number`, 
            messageId as `Message ID`, messageStatus as `Message Status`, 
            messageStatusDescription as `Message status description`, @message
            | filter isFinal
            | filter eventType = 'TEXT_SPAM'
            | sort Timestamp desc
            | limit 100
            }
        EOT
    }

  # aws_cloudwatch_query_definition.pinpoint-sms-carrier-dwell-times[0] will be created
  + resource "aws_cloudwatch_query_definition" "pinpoint-sms-carrier-dwell-times" {
      + id                  = (known after apply)
      + log_group_names     = [
          + (sensitive value),
          + (sensitive value),
        ]
      + name                = "SMS (Pinpoint) / Carrier dwell times"
      + query_definition_id = (known after apply)
      + query_string        = <<-EOT
            stats avg((eventTimestamp - messageRequestTimestamp) / 1000 / 60) as Avg_carrier_time_minutes,
            count(*) as Number by carrierName as Carrier
            | filter isFinal
            | sort by Avg_carrier_time_minutes desc
            | limit 100
        EOT
    }

  # aws_cloudwatch_query_definition.pinpoint-sms-failures-by-carrier[0] will be created
  + resource "aws_cloudwatch_query_definition" "pinpoint-sms-failures-by-carrier" {
      + id                  = (known after apply)
      + log_group_names     = [
          + (sensitive value),
          + (sensitive value),
        ]
      + name                = "SMS (Pinpoint) / Failures by carrier"
      + query_definition_id = (known after apply)
      + query_string        = <<-EOT
            filter isFinal
            | filter messageStatus not like /DELIVERED|SUCCESSFUL/
            | stats count(*) as Total by coalesce(carrierName, 'Unknown/VOIP') as Carrier, messageStatus as MessageStatus
            | sort by Total desc
        EOT
    }

  # aws_cloudwatch_query_definition.pinpoint-sms-get-failures[0] will be created
  + resource "aws_cloudwatch_query_definition" "pinpoint-sms-get-failures" {
      + id                  = (known after apply)
      + log_group_names     = [
          + (sensitive value),
        ]
      + name                = "SMS (Pinpoint) / Get failures"
      + query_definition_id = (known after apply)
      + query_string        = <<-EOT
            fields @timestamp as Timestamp, carrierName as Carrier, messageStatus as `Provider response`, 
            originationPhoneNumber as `Origination phone number`, destinationPhoneNumber as `Destination phone number`, 
            messageId as `Message ID`, messageStatus as `Message Status`, 
            messageStatusDescription as `Message status description`, @message
            | filter isFinal
            | sort @timestamp desc
            | limit 100
        EOT
    }

  # aws_cloudwatch_query_definition.pinpoint-sms-get-logs[0] will be created
  + resource "aws_cloudwatch_query_definition" "pinpoint-sms-get-logs" {
      + id                  = (known after apply)
      + log_group_names     = [
          + (sensitive value),
          + (sensitive value),
        ]
      + name                = "SMS (Pinpoint) / Logs"
      + query_definition_id = (known after apply)
      + query_string        = <<-EOT
            fields @timestamp as Timestamp, carrierName as Carrier, messageStatus as `Provider response`, 
            originationPhoneNumber as `Origination phone number`, destinationPhoneNumber as `Destination phone number`, 
            messageId as `Message ID`, messageStatus as `Message Status`, 
            messageStatusDescription as `Message status description`, @message
            | filter isFinal
            | sort @timestamp desc
            | limit 100
        EOT
    }

  # aws_cloudwatch_query_definition.pinpoint-sms-get-sms-logs-by-dest-phone-number[0] will be created
  + resource "aws_cloudwatch_query_definition" "pinpoint-sms-get-sms-logs-by-dest-phone-number" {
      + id                  = (known after apply)
      + log_group_names     = [
          + (sensitive value),
          + (sensitive value),
        ]
      + name                = "SMS (Pinpoint) / Get SMS logs by destination phone number"
      + query_definition_id = (known after apply)
      + query_string        = <<-EOT
            fields @timestamp as Timestamp, carrierName as Carrier, messageStatus as `Provider response`, 
            originationPhoneNumber as `Origination phone number`, destinationPhoneNumber as `Destination phone number`, 
            messageId as `Message ID`, messageStatus as `Message Status`, 
            messageStatusDescription as `Message status description`, @message
            | filter destinationPhoneNumber like '+1416xxxxxxx'
            | sort Timestamp desc
            | limit 100
        EOT
    }

  # aws_cloudwatch_query_definition.pinpoint-sms-get-sms-logs-by-orig-phone-number[0] will be created
  + resource "aws_cloudwatch_query_definition" "pinpoint-sms-get-sms-logs-by-orig-phone-number" {
      + id                  = (known after apply)
      + log_group_names     = [
          + (sensitive value),
          + (sensitive value),
        ]
      + name                = "SMS (Pinpoint) / Get SMS logs by origination phone number"
      + query_definition_id = (known after apply)
      + query_string        = <<-EOT
            fields @timestamp as Timestamp, carrierName as Carrier, messageStatus as `Provider response`, 
            originationPhoneNumber as `Origination phone number`, destinationPhoneNumber as `Destination phone number`, 
            messageId as `Message ID`, messageStatus as `Message Status`, 
            messageStatusDescription as `Message status description`, @message
            | filter originationPhoneNumber like '237762'
            | sort Timestamp desc
            | limit 100
        EOT
    }

  # aws_cloudwatch_query_definition.pinpoint-sms-international-sending-status[0] will be created
  + resource "aws_cloudwatch_query_definition" "pinpoint-sms-international-sending-status" {
      + id                  = (known after apply)
      + log_group_names     = [
          + (sensitive value),
          + (sensitive value),
        ]
      + name                = "SMS (Pinpoint) / International sending status"
      + query_definition_id = (known after apply)
      + query_string        = <<-EOT
            fields @timestamp, @message
            | parse @message /"isoCountryCode":"(?<Country>[^"]+)"/
            | parse @message /"eventType":"(?<Event_Type>[^"]+)"/
            | parse @message /"isFinal":(?<Is_Final>\w+)/
            | filter Is_Final = "true"
            | stats count(*) as Event_Count by Country, Event_Type
            | display Country, Event_Type, Event_Count
            | sort Country asc
            | limit 100
        EOT
    }

  # aws_cloudwatch_query_definition.pinpoint-sms-success-vs-unreachable[0] will be created
  + resource "aws_cloudwatch_query_definition" "pinpoint-sms-success-vs-unreachable" {
      + id                  = (known after apply)
      + log_group_names     = [
          + (sensitive value),
          + (sensitive value),
        ]
      + name                = "SMS (Pinpoint) / Success vs Unreachable"
      + query_definition_id = (known after apply)
      + query_string        = <<-EOT
            fields @timestamp as Timestamp, carrierName as Carrier, messageStatus as `Provider response`, 
            originationPhoneNumber as `Origination phone number`, destinationPhoneNumber as `Destination phone number`, 
            messageId as `Message ID`, messageStatus as `Message Status`, 
            messageStatusDescription as `Message status description`, @message
            | parse messageStatusDescription "Phone is currently unreachable/*" as @unavailable
            | parse messageStatusDescription "Message has been * by phone" as @available
            | stats count(@unavailable) as Unavailable, count(@available) as Available, count(*) as Total by bin(1h)
        EOT
    }

Plan: 19 to add, 0 to change, 1 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_log_group.pinpoint_deliveries[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.pinpoint_deliveries_failures[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.pinpoint_to_sqs_sms_callbacks_log_group[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.lambda-image-pinpoint-delivery-receipts-errors-critical[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.lambda-image-pinpoint-delivery-receipts-errors-warning[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.logs-1-500-error-1-minute-warning-pinpoint_to_sqs_sms_callbacks-api[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.logs-10-500-error-5-minutes-critical-pinpoint_to_sqs_sms_callbacks-api[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.pinpoint-sms-blocked-as-spam-warning[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.pinpoint-sms-failures-bell-warning[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.pinpoint-sms-failures-bragg-warning[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.pinpoint-sms-failures-freedom-warning[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.pinpoint-sms-failures-iristel-warning[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.pinpoint-sms-failures-maritime-warning[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.pinpoint-sms-failures-mts-warning[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.pinpoint-sms-failures-rogers-warning[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.pinpoint-sms-failures-telus-warning[0]"]
WARN - plan.json - main -...

Copy link

production: heartbeat

✅   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.heartbeat.aws_lambda_function.this
Show plan
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # module.heartbeat.aws_lambda_function.this will be updated in-place
  ~ resource "aws_lambda_function" "this" {
        id                             = "heartbeat"
        tags                           = {
            "CostCentre" = "notification-canada-ca-production"
            "Terraform"  = "true"
        }
        # (28 unchanged attributes hidden)

      ~ environment {
          ~ variables = {
              ~ "heartbeat_sms_number" = "16135550123" -> "+16135550123"
                # (2 unchanged elements hidden)
            }
        }

        # (3 unchanged blocks hidden)
    }

Plan: 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_cloudwatch_event_rule.heartbeat_testing[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.heartbeat_log_group[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.logs-1-500-error-1-minute-warning-heartbeat-api[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.logs-10-500-error-5-minutes-critical-heartbeat-api[0]"]

23 tests, 19 passed, 4 warnings, 0 failures, 0 exceptions

Copy link

production: eks

✅   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.sentinel_forwarder.aws_lambda_function.sentinel_forwarder
Show plan
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # module.sentinel_forwarder.aws_lambda_function.sentinel_forwarder will be updated in-place
  ~ resource "aws_lambda_function" "sentinel_forwarder" {
        id                             = "sentinel-cloud-watch-forwarder"
      ~ layers                         = [
          ~ (sensitive value),
        ]
        tags                           = {
            "CostCentre" = "notification-canada-ca-production"
        }
        # (28 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

Plan: 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_acm_certificate.client_vpn"]
WARN - plan.json - main - Missing Common Tags: ["aws_acm_certificate.notification-canada-ca"]
WARN - plan.json - main - Missing Common Tags: ["aws_acm_certificate.notification-canada-ca-alt[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_acmpca_certificate_authority.client_vpn"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb.notification-canada-ca"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb_listener.internal_alb_tls"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb_listener.notification-canada-ca"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb_target_group.internal_nginx_http"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb_target_group.notification-canada-ca-admin"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb_target_group.notification-canada-ca-api"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb_target_group.notification-canada-ca-document"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb_target_group.notification-canada-ca-document-api"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb_target_group.notification-canada-ca-documentation"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.notification-canada-ca-eks-application-logs[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.notification-canada-ca-eks-cluster-logs[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.notification-canada-ca-eks-prometheus-logs[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.admin-evicted-pods[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.admin-pods-high-cpu-warning[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.admin-pods-high-memory-warning[0]"]
WARN - plan.json - main - Missing Common Tags:...

Copy link

production: quicksight

✅   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 aws_s3_object.manifest_file
Show plan
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # aws_s3_object.manifest_file will be updated in-place
  ~ resource "aws_s3_object" "manifest_file" {
      ~ etag                          = "3696c2177cd9e1be28ff597c24b10ae0" -> "221f592f333f2fc284626cfdb8c4bc80"
        id                            = "quicksight/s3-manifest-sms-usage.json"
        tags                          = {}
      + version_id                    = (known after apply)
        # (24 unchanged attributes hidden)
    }

Plan: 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_cloudformation_stack.sms-usage-notifications"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.quicksight-rds"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.quicksight-s3-usage"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.quicksight_vpc_connection_ec2"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.quicksight_vpc_connection_iam"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_role.quicksight"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_role.vpc_connection_role"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_set.jobs"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_set.login_events"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_set.notifications"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_set.organisation"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_set.services"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_set.sms_usage"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_set.template-category-history"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_set.templates"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_set.users"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_source.rds"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_source.s3_sms_usage"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_vpc_connection.rds"]
WARN - plan.json - main - Missing Common Tags: ["aws_s3_object.manifest_file"]

39 tests, 19 passed, 20 warnings, 0 failures, 0 exceptions

@sastels sastels merged commit 6540c96 into main Oct 16, 2024
24 checks passed
@sastels sastels deleted the release-2.16.38 branch October 16, 2024 15:26
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