Skip to content

Conversation

mgirouard
Copy link
Contributor

  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

  • updates cmd/migrate to support zone migrations
  • removes all traces of zone transformations from grit
  • adds migration tests to the provider

Additional context & links

Configuration Transformations:

# v4 → v5 Migration Results
zone       = "example.com"     → name = "example.com"
account_id = "abc123"          → account = { id = "abc123" }
jump_start = true              → (removed)
plan       = "enterprise"      → (removed, now computed object)

Implements config and state migrations for `cloudflare_zone`.

- removes all grit patterns
- migrates config and state to its new shape:
    - rename attribute `zone` -> `name`
    - rename and restructure attribute `account_id` -> `account = { id = "..." }`
    - remove jump_start (no v5 equivalent)
    - remove plan (becomes computed-only)
- adds tests for migration tooling
Tests required transformations
- `zone` -> `name` attribute rename
- `account_id` -> account = { id = "..." } nested object
- `jump_start` attribute removal
- `plan` attribute removal (becomes computed)

Handles edge cases
- unicode domain names
- different zone types (full, partial, secondary)
- complex expressions and variables
- multiple zones in same configuration
- vanity name servers
- meta field structure changes
@mgirouard mgirouard merged commit 717787a into next Sep 5, 2025
4 checks passed
@mgirouard mgirouard deleted the mgirouard/migrate-zone branch September 5, 2025 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants