-
Notifications
You must be signed in to change notification settings - Fork 43
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
Upstream migrations not run on preview #2676
Comments
Thank you for this issue, this looks like a perfect example of what we have been looking for - some practical examples that demonstrate 2281 is really needed. |
Taking some notes from a quick call. azuread.ServicePrincipal wants to migrate the ID format. In detail, at preview: ServicePrincipal Check returns the old ID |
Curiously, since the program works at Moving planning to Check is still interesting as suggested and likely would solve the problem but involves an engine protocol change and possibly more repercussions. |
We currently run the upstream migrations on the Diff, Apply and Refresh methods within the tfshim provider2.go. On Pulumi's side this results in the migrations being run during Diff, Create and Update. This results in state migrations not being applied to output properties during preview time. This currently breaks users migrating to AzureAD v6 when previewing due to the upstream provider expecting that dependent resources recieve the newly migrated versions of property values (post migration) from other resources.
For the migration (as part of the plan resource change diff) to be applied during preview in Pulumi programs, the Diff needs to be called during the Pulumi
Check
method which is the only opportunity on Pulumi's side to modify state during the preview.Upstream migrations should be idempotent, so it should not matter than migrations are then run in both Check and subseqent methods.
See also:
The text was updated successfully, but these errors were encountered: