From a0fbe5c655700726946999094581112f49bd5897 Mon Sep 17 00:00:00 2001 From: Gabriel Radureau Date: Wed, 24 Jun 2026 13:19:32 +0200 Subject: [PATCH] fix(iac): import existing EU R2 bucket into state Run #28 applied cleanly except cloudflare_r2_bucket.arcodange_tf: the bucket exists in the EU jurisdiction, but its prior state entry lacked the jurisdiction, so cloudflare provider >=5.20 read it as not-found, removed it from state, and then failed to recreate it ("already exists"). Add a config-driven import block with the jurisdiction-qualified id (//) so the next apply adopts the real bucket. No-op once reconciled; removable after. Co-Authored-By: Claude Opus 4.8 --- iac/cloudflare.tf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/iac/cloudflare.tf b/iac/cloudflare.tf index a879fc4..1b4d75d 100644 --- a/iac/cloudflare.tf +++ b/iac/cloudflare.tf @@ -14,6 +14,16 @@ resource "cloudflare_r2_bucket" "arcodange_tf" { jurisdiction = "eu" } +# One-time state reconcile. The arcodange-tf R2 bucket already exists in the EU jurisdiction, but its +# prior state entry lacked the jurisdiction, so cloudflare provider >= 5.20 read it as "not found" and +# tried to recreate it (which fails: "already exists"). Re-import it with the jurisdiction-qualified id +# (//) so the next apply adopts the real bucket instead. +# This block is a no-op once the bucket is in state and can be removed afterwards. +import { + to = cloudflare_r2_bucket.arcodange_tf + id = "f7fcf28c0823cecb44e53b6e92d5144f/arcodange-tf/eu" +} + module "cf_r2_arcodange_tf_token" { source = "./modules/cloudflare_token" account_id = local.cloudflare_account_id -- 2.49.1