Skip to content

feat(hyperdrive_config): add v4 to v5 migration support#317

Open
ssicard wants to merge 1 commit into
mainfrom
feat/hyperdrive-config-migration
Open

feat(hyperdrive_config): add v4 to v5 migration support#317
ssicard wants to merge 1 commit into
mainfrom
feat/hyperdrive-config-migration

Conversation

@ssicard

@ssicard ssicard commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add tf-migrate support for cloudflare_hyperdrive_config resource (APIX-1257).

The resource name and all user-configurable attributes are identical between v4 and v5, so the config transformation is a pass-through. V5 adds new optional attributes (origin.service_id, origin_connection_limit, mtls) and new computed attributes (created_on, modified_on), but no existing attributes were renamed, removed, or restructured. The provider's StateUpgrader handles state migration automatically.

Test Results

========================================
✓ E2E Test Complete!
========================================

Summary:

  Step 1: v4 terraform apply
    Status: ✓ SUCCESS

  Step 2: Migration (v4 → v5)
    Status: ✓ SUCCESS

  Step 3: v5 plan (before apply)
    Status: ✓ No changes needed

  Step 4: v5 terraform apply
    Status: ✓ SUCCESS

  Step 5: v5 plan (after apply)
    Status: ✓ SUCCESS - Stable state achieved
    Result: No changes detected

Add tf-migrate support for cloudflare_hyperdrive_config resource.

The resource name and all user-configurable attributes are identical
between v4 and v5, so the config transformation is a pass-through.
V5 adds new optional attributes (origin.service_id,
origin_connection_limit, mtls) and new computed attributes (created_on,
modified_on), but no existing attributes were renamed, removed, or
restructured. The provider's StateUpgrader handles state migration.

Changes:
- Add hyperdrive_config migrator (config pass-through, no HCL changes)
- Register in migration registry
- Add unit tests (8 cases: basic, caching, access origin, variables,
  multiple resources, lifecycle, count, for_each)
- Add integration testdata (input + expected)
- Add e2e fixture requiring real Postgres DB
- Wire Hyperdrive DB env vars through e2e runner (env, init, tfvars,
  module passthrough, variable declarations) following Crowdstrike pattern
- Add Hyperdrive secrets to e2e CI workflow
@ssicard ssicard requested a review from a team as a code owner July 9, 2026 18:19
@ssicard ssicard self-assigned this Jul 9, 2026
Comment thread internal/e2e-runner/init.go Dismissed
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.

1 participant