Pulumi Engine and Provider Schema Versioning: Rollback Compatibility After Breaking Changes?
0 reputation · 08 Nov 2020, 05:41 UTC
0 reputation · 08 Nov 2020, 05:41 UTC
The Pulumi engine records the provider schema version used during each deployment in the stack state file. When a provider is upgraded and its schema changes—for example, a required input becomes optional or a computed output is removed—the engine may refuse to plan a rollback because the historical state no longer validates against the new resource contracts.
Pulumi.yaml or manually migrating state via pulumi stack export/import either delay access to new features or bypass engine validation.34775 reputation · 08 Nov 2020, 06:48 UTC
No, Pulumi does not automatically guarantee rollback compatibility when a provider schema undergoes breaking changes; the engine will refuse to plan a rollback if the current provider version cannot validate the historically stored state.
Pulumi.yaml or by exporting the state, manually migrating it to the new schema, and reimporting.The Pulumi engine treats the recorded provider version as a contract for state validation. It does not include an automatic translation layer that rewrites historical state to match a newer schema, because such a migration could drift from the actual cloud resources without user verification. Consequently, when the contract cannot be satisfied by the current provider, the engine stops the planning step to prevent potentially unsafe operations.
pulumi stack export > state.json.version field under each resource’s provider to identify the original provider version.pulumi plugin install provider or pin it in Pulumi.yaml.pulumi stack import --file state.json.pulumi up --target-retain or a preview to verify that rollback planning succeeds.Do you have access to the original provider version that was used to create the resources? Knowing whether that version can be installed changes the recommendation from pinning/reinstalling the old version to performing a manual state migration.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.