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

Implement State Upgrade in the Terraform Plugin Framework #758

Merged
merged 23 commits into from Feb 7, 2023

Conversation

t0yv0
Copy link
Member

@t0yv0 t0yv0 commented Jan 27, 2023

Fixes #748

This is incomplete by itself since it also needs to make sure the bridge writes out the schema version into Pulumi state. I'll add a few stacked PRs on top to demonstrate that.

Related: pulumi/pulumi-random#258 - if Random is rebuilt against this version 258 no longer reproduces.

@github-actions
Copy link

Diff for pulumi-random with merge commit 7ff6599

@github-actions
Copy link

Diff for pulumi-azuread with merge commit 7ff6599

@github-actions
Copy link

Diff for pulumi-gcp with merge commit 7ff6599

@github-actions
Copy link

Diff for pulumi-azure with merge commit 7ff6599

@t0yv0 t0yv0 requested a review from jazzyfresh January 27, 2023 21:00
@t0yv0 t0yv0 changed the title [WIP] Implement State Upgrade in the Terraform Plugin Framework Implement State Upgrade in the Terraform Plugin Framework Jan 28, 2023
@t0yv0 t0yv0 marked this pull request as ready for review January 28, 2023 00:05
@t0yv0
Copy link
Member Author

t0yv0 commented Feb 3, 2023

Friendly ping @jazzyfresh - would it be possible to review? I am available for QnA if needed.

pf/internal/pfutils/value_to_json.go Show resolved Hide resolved
pf/tfbridge/dynamic_value.go Show resolved Hide resolved
pf/tfbridge/provider_upgrade_resource_state.go Outdated Show resolved Hide resolved
return &upgradedResourceState{st}, nil
}
tfType := rh.schema.Type().TerraformType(ctx).(tftypes.Object)
rawState, err := pfutils.NewRawState(tfType, st.Value)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could surface the error here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I wonder if there's a linter for unhandled errs.

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Diff for pulumi-azuread with merge commit c167330

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Diff for pulumi-random with merge commit c167330

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Diff for pulumi-random with merge commit 734bab2

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Diff for pulumi-azuread with merge commit 734bab2

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Diff for pulumi-gcp with merge commit c167330

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Diff for pulumi-gcp with merge commit 734bab2

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Diff for pulumi-azure with merge commit c167330

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Diff for pulumi-azure with merge commit 734bab2

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Diff for pulumi-random with merge commit 3ab62fc

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Diff for pulumi-azuread with merge commit 3ab62fc

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Diff for pulumi-gcp with merge commit 3ab62fc

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Diff for pulumi-azure with merge commit 3ab62fc

@t0yv0
Copy link
Member Author

t0yv0 commented Feb 7, 2023

Looks like I need to fix #798 first that's not working on master, to pass the tests.

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Diff for pulumi-azuread with merge commit 1ecb728

@t0yv0 t0yv0 merged commit 6dbd650 into master Feb 7, 2023
@t0yv0 t0yv0 deleted the t0yv0/pf-state-upgrades branch February 7, 2023 20:46
@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Diff for pulumi-random with merge commit 1ecb728

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Diff for pulumi-gcp with merge commit 1ecb728

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Diff for pulumi-azure with merge commit 1ecb728

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.

[Plugin Framework] Support State Upgrade
2 participants