cds-snc / notification-terraform

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

apply rds instance changes immediately if not on prod #1469

Closed sastels closed 2 months ago

sastels commented 2 months ago

Summary | Résumé

set apply_immediately to true for non-production rds instances

Related Issues | Cartes liées

Test instructions | Instructions pour tester la modification

See what happens in plan and apply

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 2 months ago

Staging: rds

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

Plan: 0 to add, 3 to change, 0 to destroy
Show summary | CHANGE | NAME | |--------|----------------------------------------------------------------| | update | `aws_rds_cluster_instance.notification-canada-ca-instances[0]` | | | `aws_rds_cluster_instance.notification-canada-ca-instances[1]` | | | `aws_rds_cluster_instance.notification-canada-ca-instances[2]` |
Show plan ```terraform Resource actions are indicated with the following symbols: ~ update in-place Terraform will perform the following actions: # aws_rds_cluster_instance.notification-canada-ca-instances[0] will be updated in-place ~ resource "aws_rds_cluster_instance" "notification-canada-ca-instances" { ~ apply_immediately = false -> true id = "notification-canada-ca-staging-instance-0" ~ instance_class = "db.r6g.large" -> "db.r6g.xlarge" tags = { "CostCenter" = "notification-canada-ca-staging" } # (28 unchanged attributes hidden) } # aws_rds_cluster_instance.notification-canada-ca-instances[1] will be updated in-place ~ resource "aws_rds_cluster_instance" "notification-canada-ca-instances" { ~ apply_immediately = false -> true id = "notification-canada-ca-staging-instance-1" ~ instance_class = "db.r6g.large" -> "db.r6g.xlarge" tags = { "CostCenter" = "notification-canada-ca-staging" } # (28 unchanged attributes hidden) } # aws_rds_cluster_instance.notification-canada-ca-instances[2] will be updated in-place ~ resource "aws_rds_cluster_instance" "notification-canada-ca-instances" { ~ apply_immediately = false -> true id = "notification-canada-ca-staging-instance-2" ~ instance_class = "db.r6g.large" -> "db.r6g.xlarge" tags = { "CostCenter" = "notification-canada-ca-staging" } # (28 unchanged attributes hidden) } Plan: 0 to add, 3 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_log_group.logs_exports"] WARN - plan.json - main - Missing Common Tags: ["aws_db_event_subscription.notification-canada-ca"] WARN - plan.json - main - Missing Common Tags: ["aws_db_event_subscription.notification-canada-ca-cluster"] WARN - plan.json - main - Missing Common Tags: ["aws_db_subnet_group.notification-canada-ca"] WARN - plan.json - main - Missing Common Tags: ["aws_rds_cluster.notification-canada-ca"] WARN - plan.json - main - Missing Common Tags: ["aws_rds_cluster_instance.notification-canada-ca-instances[0]"] WARN - plan.json - main - Missing Common Tags: ["aws_rds_cluster_instance.notification-canada-ca-instances[1]"] WARN - plan.json - main - Missing Common Tags: ["aws_rds_cluster_instance.notification-canada-ca-instances[2]"] WARN - plan.json - main - Missing Common Tags: ["aws_rds_cluster_parameter_group.default"] WARN - plan.json - main - Missing Common Tags: ["aws_rds_cluster_parameter_group.pgaudit"] WARN - plan.json - main - Missing Common Tags: ["aws_secretsmanager_secret.app_db_user"] WARN - plan.json - main - Missing Common Tags: ["aws_secretsmanager_secret.database_user"] WARN - plan.json - main - Missing Common Tags: ["module.rds_proxy.aws_cloudwatch_log_group.this[0]"] WARN - plan.json - main - Missing Common Tags: ["module.rds_proxy.aws_db_proxy.this[0]"] WARN - plan.json - main - Missing Common Tags: ["module.rds_proxy.aws_db_proxy_endpoint.this[\"read_only\"]"] WARN - plan.json - main - Missing Common Tags: ["module.rds_proxy.aws_db_proxy_endpoint.this[\"read_write\"]"] WARN - plan.json - main - Missing Common Tags: ["module.rds_proxy.aws_iam_role.this[0]"] 36 tests, 19 passed, 17 warnings, 0 failures, 0 exceptions ```