cds-snc / forms-terraform

Infrastructure as Code for the GC Forms environment
MIT License
16 stars 7 forks source link

feat: run Nagware every day #811

Closed patheard closed 2 months ago

patheard commented 2 months ago

Summary

Update the Nagware function schedule so that it run everyday. This is being done so that the Redis cache of overdue responses is kept more up-to-date.

The logic of the Nagware has also been updated so that emails are still only sent Tuesday/Thursday and Slack messages posted on Sunday.

Related

github-actions[bot] commented 2 months ago

⚠ Terrform update available

Terraform: 1.9.5 (using 1.9.2)
Terragrunt: 0.67.3 (using 0.63.2)
github-actions[bot] commented 2 months ago

Staging: lambdas

✅   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_cloudwatch_event_rule.nagware_lambda_trigger` |
Show plan ```terraform Resource actions are indicated with the following symbols: ~ update in-place Terraform will perform the following actions: # aws_cloudwatch_event_rule.nagware_lambda_trigger will be updated in-place ~ resource "aws_cloudwatch_event_rule" "nagware_lambda_trigger" { ~ description = "Fires every Tuesday, Thursday and Sunday at 5am EST" -> "Fires every day at 5am EST" id = "nagware-lambda-trigger" name = "nagware-lambda-trigger" ~ schedule_expression = "cron(0 10 ? * TUE,THU,SUN *)" -> "cron(0 10 * * ? *)" tags = {} # (8 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_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 -... ```