You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
- add a narrow pre-state upgrade hook for old Pulumi-shaped
`ArgoTieredCaching` state
- mark only `{value, zoneId}` schema-version-0 state as upstream schema
version 500 so the legacy `cloudflare_argo` migration is skipped
- add credential-free regression coverage for v6.12-shaped exported
state plus a schema-version reminder test
Fixes#1575
## Background
`cloudflare_argo_tiered_caching` has an upstream Terraform migration
edge case across these provider versions. State created by the older v5
provider can remain at schema version 0. Newer upstream versions now
interpret schema version 0 for this resource as legacy `cloudflare_argo`
state and run a migration that expects the old `tiered_caching` field.
That is not the shape Pulumi wrote for
`cloudflare:index/argoTieredCaching:ArgoTieredCaching`. Pulumi-created
state from v6.12 already has the current resource shape, using `value`
and `zoneId`, but lacks the newer upstream schema-version marker. On a
direct upgrade to newer provider versions, upstream's legacy migration
sees schema version 0, looks for `tiered_caching`, and fails.
We confirmed the same direct-upgrade issue exists in Terraform: the
upstream acceptance harness succeeds when it steps through an
intermediate provider version, but a direct published-provider upgrade
reproduces the `tiered_caching attribute is required` failure. So this
is not Pulumi failing to run a migration; it is the direct upstream
upgrade path requiring an intermediate schema bump.
## Approach
This PR works around the issue locally for Pulumi-created state. The
hook only applies when all of these are true:
- the prior schema version is 0
- the state is already Pulumi/current-shaped, with `value` and `zoneId`
- the state does not contain legacy `tiered_caching`
For that narrow shape, the hook returns schema version 500 unchanged.
That tells the Terraform Framework provider the state is already at the
current `cloudflare_argo_tiered_caching` schema and avoids running the
wrong legacy `cloudflare_argo` migration. Legacy Terraform-shaped state
is intentionally left alone.
## Risk
The main risk is future upstream drift. The hook hardcodes schema
version 500 because that is the current upstream schema version for this
resource. A reminder test fails if upstream bumps this resource's schema
version so we revisit whether the hook should change or be removed.
## Testing
- `cd provider && mise exec -- go test . -run 'TestArgoTieredCaching'
-count=1`
Co-authored-by: Codex <noreply@openai.com>
0 commit comments