cds-snc / notification-terraform

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

NR re-enable pulling in staging #1474

Closed ben851 closed 1 month ago

ben851 commented 1 month ago

Summary | Résumé

Troubleshooting why we can't see api-lambda in staging anymore.

Test instructions | Instructions pour tester la modification

TF Apply and verify that api-lambda shows up.

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

Staging: newrelic

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

Plan: 0 to add, 9 to change, 0 to destroy
Show summary | CHANGE | NAME | |--------|--------------------------------------------------------------------------------------------| | update | `newrelic_nrql_alert_condition.external_services_callbacks_over_5_seconds_duration` | | | `newrelic_nrql_alert_condition.internal_services_awsnotify_over_5_seconds_duration` | | | `newrelic_nrql_alert_condition.lambda_api_error_count_anomaly_fuzzy_attack` | | | `newrelic_nrql_alert_condition.lambda_api_error_percentage_api_user_errors` | | | `newrelic_nrql_alert_condition.lambda_api_error_percentage_fuzzy_attack` | | | `newrelic_nrql_alert_condition.lambda_api_error_percentage_fuzzy_attack_anomaly_detection` | | | `newrelic_nrql_alert_condition.lambda_api_error_percentage_unexpected_errors` | | | `newrelic_nrql_alert_condition.lambda_api_errors_count_anomaly_api_user_errors` | | | `newrelic_nrql_alert_condition.lambda_api_errors_count_anomaly_unexpected_errors` |
Show plan ```terraform Resource actions are indicated with the following symbols: ~ update in-place Terraform will perform the following actions: # newrelic_nrql_alert_condition.external_services_callbacks_over_5_seconds_duration will be updated in-place ~ resource "newrelic_nrql_alert_condition" "external_services_callbacks_over_5_seconds_duration" { ~ description = (sensitive value) id = "5457585:43064582" name = "[External Services / Callbacks] Over 5 seconds duration" # (15 unchanged attributes hidden) # (2 unchanged blocks hidden) } # newrelic_nrql_alert_condition.internal_services_awsnotify_over_5_seconds_duration will be updated in-place ~ resource "newrelic_nrql_alert_condition" "internal_services_awsnotify_over_5_seconds_duration" { ~ description = (sensitive value) id = "5457585:43064585" name = "[Internal Services / AWS+Notify] Over 5 seconds duration" # (15 unchanged attributes hidden) # (2 unchanged blocks hidden) } # newrelic_nrql_alert_condition.lambda_api_error_count_anomaly_fuzzy_attack will be updated in-place ~ resource "newrelic_nrql_alert_condition" "lambda_api_error_count_anomaly_fuzzy_attack" { id = "5457585:43064578" name = "[Lambda API] Error count anomaly (Fuzzy attack)" # (16 unchanged attributes hidden) ~ nrql { ~ query = "SELECT count(*) FROM AwsLambdaInvocationError WHERE (`entityGuid`='MjY5MTk3NHxJTkZSQXxOQXwtNDYxNzQ3OTkyMzgzMTgwMTMxNw') AND `error.class` IN ('app.authentication.auth:AuthError', 'app.v2.errors:BadRequestError', 'werkzeug.exceptions:MethodNotAllowed')" -> "SELECT count(*) FROM AwsLambdaInvocationError WHERE (`entityGuid`='MjY5MTk3NHxJTkZSQXxOQXw4OTUyNzY1NzE2MDc3MTExMjI5') AND `error.class` IN ('app.authentication.auth:AuthError', 'app.v2.errors:BadRequestError', 'werkzeug.exceptions:MethodNotAllowed')" # (2 unchanged attributes hidden) } # (2 unchanged blocks hidden) } # newrelic_nrql_alert_condition.lambda_api_error_percentage_api_user_errors will be updated in-place ~ resource "newrelic_nrql_alert_condition" "lambda_api_error_percentage_api_user_errors" { id = "5457585:43064577" name = "[Lambda API] Error percentage (API User Errors)" # (15 unchanged attributes hidden) ~ nrql { ~ query = "SELECT percentage(count(*), WHERE `error.class` IS NOT null)*100 / percentage(count(*), WHERE duration IS NOT null) as 'Error rate (%); filtered' FROM AwsLambdaInvocation, AwsLambdaInvocationError WHERE `entityGuid`='MjY5MTk3NHxJTkZSQXxOQXwtNDYxNzQ3OTkyMzgzMTgwMTMxNw' AND `error.class` IN ('jsonschema.exceptions:ValidationError', 'sqlalchemy.exc:NoResultFound')" -> "SELECT percentage(count(*), WHERE `error.class` IS NOT null)*100 / percentage(count(*), WHERE duration IS NOT null) as 'Error rate (%); filtered' FROM AwsLambdaInvocation, AwsLambdaInvocationError WHERE `entityGuid`='MjY5MTk3NHxJTkZSQXxOQXw4OTUyNzY1NzE2MDc3MTExMjI5' AND `error.class` IN ('jsonschema.exceptions:ValidationError', 'sqlalchemy.exc:NoResultFound')" # (2 unchanged attributes hidden) } # (2 unchanged blocks hidden) } # newrelic_nrql_alert_condition.lambda_api_error_percentage_fuzzy_attack will be updated in-place ~ resource "newrelic_nrql_alert_condition" "lambda_api_error_percentage_fuzzy_attack" { id = "5457585:43064586" name = "[Lambda API] Error percentage (Fuzzy attack)" # (15 unchanged attributes hidden) ~ nrql { ~ query = "SELECT percentage(count(*), WHERE `error.class` IS NOT null)*100 / percentage(count(*), WHERE duration IS NOT null) as 'Error rate (%); filtered' FROM AwsLambdaInvocation, AwsLambdaInvocationError WHERE `entityGuid`='MjY5MTk3NHxJTkZSQXxOQXwtNDYxNzQ3OTkyMzgzMTgwMTMxNw' AND `error.class` IN ('app.authentication.auth:AuthError', 'app.v2.errors:BadRequestError', 'werkzeug.exceptions:MethodNotAllowed')" -> "SELECT percentage(count(*), WHERE `error.class` IS NOT null)*100 / percentage(count(*), WHERE duration IS NOT null) as 'Error rate (%); filtered' FROM AwsLambdaInvocation, AwsLambdaInvocationError WHERE `entityGuid`='MjY5MTk3NHxJTkZSQXxOQXw4OTUyNzY1NzE2MDc3MTExMjI5' AND `error.class` IN ('app.authentication.auth:AuthError', 'app.v2.errors:BadRequestError', 'werkzeug.exceptions:MethodNotAllowed')" # (2 unchanged attributes hidden) } # (1 unchanged block hidden) } # newrelic_nrql_alert_condition.lambda_api_error_percentage_fuzzy_attack_anomaly_detection will be updated in-place ~ resource "newrelic_nrql_alert_condition" "lambda_api_error_percentage_fuzzy_attack_anomaly_detection" { id = "5457585:43064581" name = "[Lambda API] Error percentage (Fuzzy attack) (Anomaly Detection)" # (17 unchanged attributes hidden) ~ nrql { ~ query = "SELECT percentage(count(*), WHERE `error.class` IS NOT null)*100 / percentage(count(*), WHERE duration IS NOT null) as 'Error rate (%); filtered' FROM AwsLambdaInvocation, AwsLambdaInvocationError WHERE `entityGuid`='MjY5MTk3NHxJTkZSQXxOQXwtNDYxNzQ3OTkyMzgzMTgwMTMxNw' AND `error.class` IN ('app.authentication.auth:AuthError', 'app.v2.errors:BadRequestError', 'werkzeug.exceptions:MethodNotAllowed')" -> "SELECT percentage(count(*), WHERE `error.class` IS NOT null)*100 / percentage(count(*), WHERE duration IS NOT null) as 'Error rate (%); filtered' FROM AwsLambdaInvocation, AwsLambdaInvocationError WHERE `entityGuid`='MjY5MTk3NHxJTkZSQXxOQXw4OTUyNzY1NzE2MDc3MTExMjI5' AND `error.class` IN ('app.authentication.auth:AuthError', 'app.v2.errors:BadRequestError', 'werkzeug.exceptions:MethodNotAllowed')" # (2 unchanged attributes hidden) } # (1 unchanged block hidden) } # newrelic_nrql_alert_condition.lambda_api_error_percentage_unexpected_errors will be updated in-place ~ resource "newrelic_nrql_alert_condition" "lambda_api_error_percentage_unexpected_errors" { id = "5457585:43064583" name = "[Lambda API] Error percentage (Unexpected Errors)" # (15 unchanged attributes hidden) ~ nrql { ~ query = "SELECT percentage(count(*), WHERE `error.class` IS NOT null)*100 / percentage(count(*), WHERE duration IS NOT null) as 'Error rate (%); filtered' FROM AwsLambdaInvocation, AwsLambdaInvocationError WHERE `entityGuid`='MjY5MTk3NHxJTkZSQXxOQXwtNDYxNzQ3OTkyMzgzMTgwMTMxNw' AND `error.class` NOT IN ('app.authentication.auth:AuthError', 'app.v2.errors:BadRequestError','jsonschema.exceptions:ValidationError', 'sqlalchemy.exc:NoResultFound', 'werkzeug.exceptions:MethodNotAllowed') and error.message NOT LIKE '{\\'result\\': \\'error\\', \\'message\\': {\\'password\\': [\\'Incorrect password\\']}}'" -> "SELECT percentage(count(*), WHERE `error.class` IS NOT null)*100 / percentage(count(*), WHERE duration IS NOT null) as 'Error rate (%); filtered' FROM AwsLambdaInvocation, AwsLambdaInvocationError WHERE `entityGuid`='MjY5MTk3NHxJTkZSQXxOQXw4OTUyNzY1NzE2MDc3MTExMjI5' AND `error.class` NOT IN ('app.authentication.auth:AuthError', 'app.v2.errors:BadRequestError','jsonschema.exceptions:ValidationError', 'sqlalchemy.exc:NoResultFound', 'werkzeug.exceptions:MethodNotAllowed') and error.message NOT LIKE '{\\'result\\': \\'error\\', \\'message\\': {\\'password\\': [\\'Incorrect password\\']}}'" # (2 unchanged attributes hidden) } # (2 unchanged blocks hidden) } # newrelic_nrql_alert_condition.lambda_api_errors_count_anomaly_api_user_errors will be updated in-place ~ resource "newrelic_nrql_alert_condition" "lambda_api_errors_count_anomaly_api_user_errors" { id = "5457585:43064580" name = "[Lambda API] Errors count anomaly (API User Errors)" # (16 unchanged attributes hidden) ~ nrql { ~ query = "SELECT count(*) FROM AwsLambdaInvocationError WHERE (`entityGuid`='MjY5MTk3NHxJTkZSQXxOQXwtNDYxNzQ3OTkyMzgzMTgwMTMxNw') AND `error.class` IN ('jsonschema.exceptions:ValidationError', 'sqlalchemy.exc:NoResultFound')" -> "SELECT count(*) FROM AwsLambdaInvocationError WHERE (`entityGuid`='MjY5MTk3NHxJTkZSQXxOQXw4OTUyNzY1NzE2MDc3MTExMjI5') AND `error.class` IN ('jsonschema.exceptions:ValidationError', 'sqlalchemy.exc:NoResultFound')" # (2 unchanged attributes hidden) } # (2 unchanged blocks hidden) } # newrelic_nrql_alert_condition.lambda_api_errors_count_anomaly_unexpected_errors will be updated in-place ~ resource "newrelic_nrql_alert_condition" "lambda_api_errors_count_anomaly_unexpected_errors" { id = "5457585:43064579" name = "[Lambda API] Errors count anomaly (Unexpected Errors)" # (16 unchanged attributes hidden) ~ nrql { ~ query = "SELECT count(*) FROM AwsLambdaInvocationError WHERE (`entityGuid`='MjY5MTk3NHxJTkZSQXxOQXwtNDYxNzQ3OTkyMzgzMTgwMTMxNw') 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\\']}}'" -> "SELECT count(*) FROM AwsLambdaInvocationError WHERE (`entityGuid`='MjY5MTk3NHxJTkZSQXxOQXw4OTUyNzY1NzE2MDc3MTExMjI5') 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\\']}}'" # (2 unchanged attributes hidden) } # (2 unchanged blocks hidden) } Plan: 0 to add, 9 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" ```