Closed VenelinMartinov closed 2 days ago
Haven't had time to check if still an issue with the latest version that passed AWS tests https://github.com/pulumi/pulumi-aws/pull/4013
Confirmed this is indeed still an issue.
Yeah, I ran the repro with some debug logs and it looks like on the first pulumi up, everything is fine but we don't write version 0 to state.
After that when getting the state and transforming to TF state https://github.com/pulumi/pulumi-terraform-bridge/blob/3c1421d15a61cfa11f350db7b796dcd5795da200/pkg/tfbridge/schema.go#L1308
we assume empty schema version means current version, so we don't run the state upgrade.
We have two ways forward:
2 is what TF does so I'll try that.
This seems to affect non-PRC too
What happened?
While working on https://github.com/pulumi/pulumi-terraform-bridge/issues/2034, it was discovered that TF runs state upgrades for a resource created with version 0 and then upgraded to 1, while we don't seem to.
I believe this is because version 0 is not written to state and we assume current version, while TF assumes 0.
Example
.
Output of
pulumi about
.
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).