fix(iac): import existing EU R2 bucket into state #13
Reference in New Issue
Block a user
Delete Branch "arcodange/r2-state-import"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Adds a one-time config-driven
importblock forcloudflare_r2_bucket.arcodange_tf.Why
Run #28 (on
main, with #11 + #12) applied cleanly except R2 — OVH, the gitea-provider CA, and the cloudflare token-type fix all worked (ovh_cms_token,gitea_admin_tokencreated). The only failure:The
arcodange-tfbucket exists in the EU jurisdiction (confirmed via the CF API). Its prior state entry lacked the jurisdiction, so cloudflare provider ≥5.20 read it as not-found, dropped it from state, and then couldn't recreate it. The provider's import ID format is<account_id>/<bucket_name>/<jurisdiction>, so re-importing with the/eusuffix reconciles the state:On the next apply, tofu adopts the real bucket instead of recreating it. No-op once in state; safe to remove afterward (I'll follow up with a cleanup PR once the run is green).
Validated locally:
tofu validate→ Success. Nothing destroyed (0 to destroy); the bucket itself was never touched.🤖 Generated with Claude Code