cds-snc / url-shortener

An API written in Python that shortens URLs
MIT License
4 stars 1 forks source link

feat: add info log statements #331

Closed patheard closed 1 year ago

patheard commented 1 year ago

Summary

Related

github-actions[bot] commented 1 year ago

Staging: hosted_zone

✅   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_route53_health_check.sre_bot_healthcheck` |
Show plan ```terraform Resource actions are indicated with the following symbols: ~ update in-place Terraform will perform the following actions: # aws_route53_health_check.sre_bot_healthcheck will be updated in-place ~ resource "aws_route53_health_check" "sre_bot_healthcheck" { id = "3cc175c2-07cc-4e22-b0d8-1c3e410a41ee" ~ resource_path = "/version" -> "/healthcheck" tags = { "CostCentre" = "url-shortener-staging" } # (14 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_route53_health_check.sre_bot_healthcheck"] 18 tests, 17 passed, 1 warning, 0 failures, 0 exceptions ```
github-actions[bot] commented 1 year ago

Staging: alarms

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

Plan: 0 to add, 2 to change, 0 to destroy
Show summary | CHANGE | NAME | |--------|--------------------------------------------------------------| | update | `aws_cloudwatch_log_metric_filter.url_shortener_api_error` | | | `aws_cloudwatch_log_metric_filter.url_shortener_api_warning` |
Show plan ```terraform Resource actions are indicated with the following symbols: ~ update in-place Terraform will perform the following actions: # aws_cloudwatch_log_metric_filter.url_shortener_api_error will be updated in-place ~ resource "aws_cloudwatch_log_metric_filter" "url_shortener_api_error" { id = "ErrorLoggedAPI" name = "ErrorLoggedAPI" ~ pattern = "?ERROR ?Error ?error ?failed" -> "?ERROR ?Error ?failed" # (1 unchanged attribute hidden) # (1 unchanged block hidden) } # aws_cloudwatch_log_metric_filter.url_shortener_api_warning will be updated in-place ~ resource "aws_cloudwatch_log_metric_filter" "url_shortener_api_warning" { id = "WarningLoggedAPI" name = "WarningLoggedAPI" ~ pattern = "?WARNING ?Warning ?warning" -> "?WARNING ?Warning" # (1 unchanged attribute hidden) # (1 unchanged block hidden) } Plan: 0 to add, 2 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" Releasing state lock. This may take a few moments... ```
Show Conftest results ```sh WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.cloudfront_ddos"] WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.route53_ddos"] WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.url_shoretener_api_suspicious"] WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.url_shoretener_api_warning"] WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.url_shortener_api_error"] WARN - plan.json - main - Missing Common Tags: ["module.cloudwatch_alarms_slack.aws_cloudwatch_log_group.notify_slack_lambda"] WARN - plan.json - main - Missing Common Tags: ["module.cloudwatch_alarms_slack.aws_iam_policy.notify_slack_lambda"] WARN - plan.json - main - Missing Common Tags: ["module.cloudwatch_alarms_slack.aws_iam_role.notify_slack_lambda"] WARN - plan.json - main - Missing Common Tags: ["module.cloudwatch_alarms_slack.aws_lambda_function.notify_slack"] WARN - plan.json - main - Cloudwatch log metric pattern is invalid: ["aws_cloudwatch_log_metric_filter.url_shortener_api_error"] WARN - plan.json - main - Cloudwatch log metric pattern is invalid: ["aws_cloudwatch_log_metric_filter.url_shortener_api_warning"] 27 tests, 16 passed, 11 warnings, 0 failures, 0 exceptions ```