-
Notifications
You must be signed in to change notification settings - Fork 44
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
StateFunc
applied twice for resources under PRC
#2408
Comments
That's unfortunate. Does TF not apply it twice e.g not once in PlanResourceChange and once in ApplyResourceChange? Or is it that Pulumi specifically recomputes the plan and that is the problem? |
This seems to be caused by not setting So right now under PRC the resource CRUD methods retrieve the value that's already been processed by |
We're loosing pulumi-terraform-bridge/pkg/tfshim/sdk-v2/provider2.go Lines 284 to 287 in 69fe479
It's set in the Will investigate if we're loosing |
We're loosing pulumi-terraform-bridge/pkg/tfshim/sdk-v2/provider2.go Lines 257 to 267 in 69fe479
PRC returns it, but we're dropping it because the type |
This issue has been addressed in PR #2407 and shipped in release v3.91.0. |
What happened?
Resources under PRC have the
StateFunc
applied twice to their resources.This leads to mangled data in state and perma diffs.
ApplyResourceChange
applies theStateFunc
, but the precedingDiff
also applies it.Often this is fine because
StateFunc
can be applied multiple times (e.g. normalizing json). But for some operations like calculating a hash it's not.This causes: pulumi/pulumi-aws#4446
Example
userData
causes replaces pulumi-aws#4446PlannedPrivate
from PlanResourceChange to ApplyResourceChange #2407Output of
pulumi about
n/a
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: