cds-snc / notification-terraform

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

allow overwrite #1448

Closed ben851 closed 1 month ago

ben851 commented 1 month ago

Summary | Résumé

Have to set allow_overwrite to true for ACM validation

Related Issues | Cartes liées

Test instructions | Instructions pour tester la modification

TF Apply works

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: eks

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

Plan: 3 to add, 3 to change, 0 to destroy
Show summary | CHANGE | NAME | |--------|-----------------------------------------------------------------------------------------------| | add | `aws_acm_certificate_validation.notification-canada-ca[0]` | | | `aws_route53_record.notification-canada-ca["*.api.staging.notification.cdssandbox.xyz"]` | | | `aws_route53_record.notification-canada-ca["staging.notification.cdssandbox.xyz"]` | | update | `aws_route53_record.notification-canada-ca["*.document.staging.notification.cdssandbox.xyz"]` | | | `aws_route53_record.notification-canada-ca["*.staging.notification.cdssandbox.xyz"]` | | | `aws_route53_record.notification-canada-ca["api.staging.notification.cdssandbox.xyz"]` |
Show plan ```terraform Resource actions are indicated with the following symbols: + create ~ update in-place Terraform will perform the following actions: # aws_acm_certificate_validation.notification-canada-ca[0] will be created + resource "aws_acm_certificate_validation" "notification-canada-ca" { + certificate_arn = "arn:aws:acm:ca-central-1:239043911459:certificate/db0b2d43-d054-4c2f-b991-a946f665b445" + id = (known after apply) + validation_record_fqdns = (known after apply) } # aws_route53_record.notification-canada-ca["*.api.staging.notification.cdssandbox.xyz"] will be created + resource "aws_route53_record" "notification-canada-ca" { + allow_overwrite = true + fqdn = (known after apply) + id = (known after apply) + name = "_27cafbad13da9d68d8adaa666739eb99.api.staging.notification.cdssandbox.xyz" + records = [ + "_3bc5d092ce090455c7a5a18436fa7d65.mqzgcdqkwq.acm-validations.aws.", ] + ttl = 300 + type = "CNAME" + zone_id = "Z04028033PLSHVOO9ZJ1Z" } # aws_route53_record.notification-canada-ca["*.document.staging.notification.cdssandbox.xyz"] will be updated in-place ~ resource "aws_route53_record" "notification-canada-ca" { ~ allow_overwrite = false -> true id = "Z04028033PLSHVOO9ZJ1Z__b4c1dfe3fa5ef9427b62475bf31154f3.document.staging.notification.cdssandbox.xyz._CNAME" name = "_b4c1dfe3fa5ef9427b62475bf31154f3.document.staging.notification.cdssandbox.xyz" # (6 unchanged attributes hidden) } # aws_route53_record.notification-canada-ca["*.staging.notification.cdssandbox.xyz"] will be updated in-place ~ resource "aws_route53_record" "notification-canada-ca" { ~ allow_overwrite = false -> true id = "Z04028033PLSHVOO9ZJ1Z__5bc41be686a84b97346535d7c4d2fe4e.staging.notification.cdssandbox.xyz._CNAME" name = "_5bc41be686a84b97346535d7c4d2fe4e.staging.notification.cdssandbox.xyz" # (6 unchanged attributes hidden) } # aws_route53_record.notification-canada-ca["api.staging.notification.cdssandbox.xyz"] will be updated in-place ~ resource "aws_route53_record" "notification-canada-ca" { ~ allow_overwrite = false -> true id = "Z04028033PLSHVOO9ZJ1Z__27cafbad13da9d68d8adaa666739eb99.api.staging.notification.cdssandbox.xyz._CNAME" name = "_27cafbad13da9d68d8adaa666739eb99.api.staging.notification.cdssandbox.xyz" # (6 unchanged attributes hidden) } # aws_route53_record.notification-canada-ca["staging.notification.cdssandbox.xyz"] will be created + resource "aws_route53_record" "notification-canada-ca" { + allow_overwrite = true + fqdn = (known after apply) + id = (known after apply) + name = "_5bc41be686a84b97346535d7c4d2fe4e.staging.notification.cdssandbox.xyz" + records = [ + "_a3c8bd5843dfed42acc803da5f589492.wggjkglgrm.acm-validations.aws.", ] + ttl = 300 + type = "CNAME" + zone_id = "Z04028033PLSHVOO9ZJ1Z" } Plan: 3 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_acm_certificate.client_vpn"] WARN - plan.json - main - Missing Common Tags: ["aws_acm_certificate.notification-canada-ca"] WARN - plan.json - main - Missing Common Tags: ["aws_acm_certificate.notification-canada-ca-alt[0]"] WARN - plan.json - main - Missing Common Tags: ["aws_alb.notification-canada-ca"] WARN - plan.json - main - Missing Common Tags: ["aws_alb_listener.internal_alb_tls"] WARN - plan.json - main - Missing Common Tags: ["aws_alb_listener.notification-canada-ca"] WARN - plan.json - main - Missing Common Tags: ["aws_alb_target_group.internal_nginx_http"] WARN - plan.json - main - Missing Common Tags: ["aws_alb_target_group.notification-canada-ca-admin"] WARN - plan.json - main - Missing Common Tags: ["aws_alb_target_group.notification-canada-ca-api"] WARN - plan.json - main - Missing Common Tags: ["aws_alb_target_group.notification-canada-ca-document"] WARN - plan.json - main - Missing Common Tags: ["aws_alb_target_group.notification-canada-ca-document-api"] WARN - plan.json - main - Missing Common Tags: ["aws_alb_target_group.notification-canada-ca-documentation"] WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.notification-canada-ca-eks-application-logs[0]"] WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.notification-canada-ca-eks-cluster-logs[0]"] WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.notification-canada-ca-eks-prometheus-logs[0]"] WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.admin-evicted-pods[0]"] WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.admin-pods-high-cpu-warning[0]"] WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.admin-pods-high-memory-warning[0]"] WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.admin-replicas-unavailable[0]"] WARN - plan.json - main - Missing Common Tags:... ```