cds-snc / notification-terraform

Terraform for notification.canada.ca
MIT License
13 stars 6 forks source link

release 2.13.6 #1439

Closed ben851 closed 1 month ago

ben851 commented 1 month ago

Summary | Résumé

1438 - Marking NR vars as sensitive @ben851

https://github.com/cds-snc/notification-terraform/pull/1434 - Fixing role for staging TF Plan @ben851 https://github.com/cds-snc/notification-terraform/pull/1435 - Typo Fix @P0NDER0SA https://github.com/cds-snc/notification-terraform/pull/1430 - New Relic Staging @P0NDER0SA

Related Issues | Cartes liées

Incident action/release

Test instructions | Instructions pour tester la modification

TF Apply works

Release Instructions | Instructions pour le déploiement

None.

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

⚠ 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.

github-actions[bot] commented 1 month ago

Production: newrelic

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

Plan: 5 to add, 0 to change, 0 to destroy
Show summary | CHANGE | NAME | |--------|--------------------------------------------------------------------------------------| | add | `newrelic_alert_policy.terraform_notify_policy` | | | `newrelic_notification_channel.terraform_notify_channel` | | | `newrelic_notification_destination.terraform_notify_destination` | | | `newrelic_nrql_alert_condition.tf_lambda_api_errors_count_anomaly_unexpected_errors` | | | `newrelic_workflow.terraform_notify_workflow` |
Show plan ```terraform Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # newrelic_alert_policy.terraform_notify_policy will be created + resource "newrelic_alert_policy" "terraform_notify_policy" { + account_id = (known after apply) + id = (known after apply) + incident_preference = "PER_POLICY" + name = "TF Notify Policy - production" } # newrelic_notification_channel.terraform_notify_channel will be created + resource "newrelic_notification_channel" "terraform_notify_channel" { + account_id = (known after apply) + active = true + destination_id = (known after apply) + id = (known after apply) + name = "Terraform Notify Slack Channel - production" + product = "IINT" + status = (known after apply) + type = "SLACK_LEGACY" + property { + key = "payload" + label = "Payload Template" + value = jsonencode({}) } } # newrelic_notification_destination.terraform_notify_destination will be created + resource "newrelic_notification_destination" "terraform_notify_destination" { + account_id = (sensitive value) + active = true + guid = (known after apply) + id = (known after apply) + last_sent = (known after apply) + name = "Terraform Notify Slack Destination - production" + status = (known after apply) + type = "SLACK_LEGACY" + property { # At least one attribute in this block is (or was) sensitive, # so its contents will not be displayed. } } # newrelic_nrql_alert_condition.tf_lambda_api_errors_count_anomaly_unexpected_errors will be created + resource "newrelic_nrql_alert_condition" "tf_lambda_api_errors_count_anomaly_unexpected_errors" { + account_id = (sensitive value) + aggregation_delay = "300" + aggregation_method = "event_flow" + aggregation_window = 60 + baseline_direction = "upper_and_lower" + enabled = true + entity_guid = (known after apply) + id = (known after apply) + name = "production - Terraform - [Lambda API] Errors count anomaly (Unexpected Errors)" + policy_id = (known after apply) + type = "baseline" + violation_time_limit = (known after apply) + violation_time_limit_seconds = 86400 + critical { + operator = "above" + threshold = 6 + threshold_duration = 300 + threshold_occurrences = "all" } + nrql { + data_account_id = (known after apply) + query = "SELECT count(*) FROM AwsLambdaInvocationError WHERE (`entityGuid`='MjY5MTk3NHxJTkZSQXxOQXwxMDg0NzM0MjU4MTkwNzk3NTQz') and error.class NOT IN ('app.v2.errors:BadRequestError','jsonschema.exceptions:ValidationError', 'sqlalchemy.exc:NoResultFound', 'app.authentication.auth:AuthError', 'werkzeug.exceptions:MethodNotAllowed') and error.message NOT LIKE '{\\'result\\': \\'error\\', \\'message\\': {\\'password\\': [\\'Incorrect password\\']}}'" } + warning { + operator = "above" + threshold = 3 + threshold_duration = 300 + threshold_occurrences = "all" } } # newrelic_workflow.terraform_notify_workflow will be created + resource "newrelic_workflow" "terraform_notify_workflow" { + account_id = (sensitive value) + destinations_enabled = true + enabled = true + enrichments_enabled = true + guid = (known after apply) + id = (known after apply) + last_run = (known after apply) + muting_rules_handling = "DONT_NOTIFY_FULLY_MUTED_ISSUES" + name = "Terraform Notify Workflow - production" + workflow_id = (known after apply) + destination { + channel_id = (known after apply) + name = (known after apply) + notification_triggers = (known after apply) + type = (known after apply) + update_original_message = true } + issues_filter { + filter_id = (known after apply) + name = "workflow-filter" + type = "FILTER" + predicate { + attribute = "labels.policyIds" + operator = "EXACTLY_MATCHES" + values = (known after apply) } + predicate { + attribute = "priority" + operator = "EQUAL" + values = [ + "CRITICAL", ] } } } Plan: 5 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" ```
github-actions[bot] commented 1 month ago

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 ```terraform 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) # (12 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 ```sh 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.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"] 38 tests, 19 passed, 19 warnings, 0 failures, 0 exceptions ```