From 86ac282108bc7c7bcccdf278c14ba05cceeddd91 Mon Sep 17 00:00:00 2001 From: Olivia Huang Date: Thu, 2 Mar 2023 14:31:48 -0500 Subject: [PATCH] Add cloudflare record to enable deletion whitelist. (#3260) --- reconcile/utils/terraform_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reconcile/utils/terraform_client.py b/reconcile/utils/terraform_client.py index 2bd413fb98..c951e72a43 100644 --- a/reconcile/utils/terraform_client.py +++ b/reconcile/utils/terraform_client.py @@ -222,7 +222,7 @@ def log_plan_diff( ) -> tuple[bool, list]: disabled_deletion_detected = False account_enable_deletion = self.accounts[name].get("enableDeletion") or False - # deletions are alowed + # deletions are allowed # if enableDeletion is true for an account # or if the integration's enable_deletion is true deletions_allowed = enable_deletion or account_enable_deletion @@ -267,6 +267,7 @@ def log_plan_diff( always_enabled_deletions = { "random_id", "aws_lb_target_group_attachment", + "cloudflare_record", # This is because a zone can contain up to one thousand records and it's not practical to require adding each record to deletionApprovals } # https://www.terraform.io/docs/internals/json-format.html