cds-snc / notification-terraform

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

Aligning weighted DNS entry for API with what is currently in prod #1443

Closed ben851 closed 1 month ago

ben851 commented 1 month ago

Summary | Résumé

Aligning the API lambda DNS to point to itself instead of directly to the api gateway... this is how it's done in current prod.

Related Issues | Cartes liées

Test instructions | Instructions pour tester la modification

TF Apply works Verify "real" and "fake" DNS zones look the same.

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: lambda-api

✅   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_record.api-weighted-100-notification-A` |
Show plan ```terraform Resource actions are indicated with the following symbols: ~ update in-place Terraform will perform the following actions: # aws_route53_record.api-weighted-100-notification-A will be updated in-place ~ resource "aws_route53_record" "api-weighted-100-notification-A" { id = "Z04028033PLSHVOO9ZJ1Z_api.staging.notification.cdssandbox.xyz_A_lambda" name = "api.staging.notification.cdssandbox.xyz" # (7 unchanged attributes hidden) ~ alias { ~ name = "d-087bebwcdc.execute-api.ca-central-1.amazonaws.com" -> "d-cmqtfgeja3.execute-api.ca-central-1.amazonaws.com" # (2 unchanged attributes hidden) } # (1 unchanged block 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_api_gateway_domain_name.alt_api_lambda"] WARN - plan.json - main - Missing Common Tags: ["aws_api_gateway_domain_name.api"] WARN - plan.json - main - Missing Common Tags: ["aws_api_gateway_domain_name.api_lambda"] WARN - plan.json - main - Missing Common Tags: ["aws_api_gateway_rest_api.api"] WARN - plan.json - main - Missing Common Tags: ["aws_api_gateway_stage.api"] WARN - plan.json - main - Missing Common Tags: ["aws_appautoscaling_target.api"] WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.api_gateway_log_group"] WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.api_lambda_log_group[0]"] WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.failed-login-count-5-minute-warning[0]"] WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.logs-1-error-1-minute-warning-lambda-api[0]"] WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.logs-1-error-1-minute-warning-salesforce-api[0]"] WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.logs-10-error-5-minutes-critical-lambda-api[0]"] WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.api"] WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.ecr"] WARN - plan.json - main - Missing Common Tags: ["aws_iam_role.api"] WARN - plan.json - main - Missing Common Tags: ["aws_iam_role.api_cloudwatch[0]"] WARN - plan.json - main - Missing Common Tags: ["aws_iam_user.ecr-user"] WARN - plan.json - main - Missing Common Tags: ["aws_kinesis_firehose_delivery_stream.firehose-api-lambda-waf-logs"] WARN - plan.json - main - Missing Common Tags: ["aws_lambda_function.api"] WARN - plan.json - main - Missing Common Tags: ["aws_secretsmanager_secret.new-relic-license-key"] WARN - plan.json - main - Missing Common Tags: ["aws_wafv2_web_acl.api_lambda"] WARN - plan.json - main - Missing Common Tags:... ```