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

Fix rds.Instance v5 to v6 migration #4027

Merged

Conversation

t0yv0
Copy link
Member

@t0yv0 t0yv0 commented Jun 5, 2024

Enabling PlanResourceChange=true on v6 of pulumi-aws provider regresses on replacing rds.Instance. It appears that the problem here is that the code has not been completely removing the deprecated "name" property from the old state. This is now fixed and covered by tests.

Enabling PlanResourceChange=true on v6 of pulumi-aws provider regresses on replacing rds.Instance. It appears that the
problem here is that the code has not been completely removing the deprecated "name" property from the old state. This
is now fixed and covered by tests.
@@ -3094,6 +3094,7 @@ func ProviderFromMeta(metaInfo *tfbridge.MetadataInfo) *tfbridge.ProviderInfo {
},
TransformFromState: func(ctx context.Context, state resource.PropertyMap) (resource.PropertyMap, error) {
if _, ok := state["dbName"]; ok {
delete(state, "name")
Copy link
Member Author

Choose a reason for hiding this comment

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

It seems that under PlanResourceChange, having "name" hanging around confuses the diff to think it's changing from "something" to "" and that should be a replacement.

Copy link
Contributor

@VenelinMartinov VenelinMartinov left a comment

Choose a reason for hiding this comment

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

looks good

Copy link

github-actions bot commented Jun 5, 2024

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Maintainer note: consult the runbook for dealing with any breaking changes.

Copy link
Member

@iwahbe iwahbe left a comment

Choose a reason for hiding this comment

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

LGTM

@t0yv0 t0yv0 enabled auto-merge (squash) June 5, 2024 18:12
@t0yv0 t0yv0 merged commit 101ed05 into master Jun 5, 2024
25 checks passed
@t0yv0 t0yv0 deleted the t0yv0/fix-rds-instance-migration-with-plan-resource-change branch June 5, 2024 18:39
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.

3 participants