Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adopt SchemaVersion and StateUpgraders where relevant #19

Open
mdb opened this issue May 19, 2019 · 0 comments
Open

adopt SchemaVersion and StateUpgraders where relevant #19

mdb opened this issue May 19, 2019 · 0 comments

Comments

@mdb
Copy link
Contributor

mdb commented May 19, 2019

It would be useful to consider the use of schema.Resource.SchemaVersion on terraform-provider-vinyldns resources such that schema.Resource.StateUpgraders could be leveraged to upgrade existing users' tfstate when schema semantics change such that users can easily adopt new versions of the provider.

More can be read here:

    // StateUpgraders contains the functions responsible for upgrading an
    // existing state with an old schema version to a newer schema. It is
    // called specifically by Terraform when the stored schema version is less
    // than the current SchemaVersion of the Resource.
    //
    // StateUpgraders map specific schema versions to a StateUpgrader
    // function. The registered versions are expected to be ordered,
    // consecutive values. The initial value may be greater than 0 to account
    // for legacy schemas that weren't recorded and can be handled by
    // MigrateState.
    StateUpgraders []StateUpgrader
@mdb mdb mentioned this issue Jun 12, 2019
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

No branches or pull requests

1 participant