Closed VenelinMartinov closed 2 months ago
Attention: Patch coverage is 33.93939%
with 109 lines
in your changes missing coverage. Please review.
Project coverage is 59.83%. Comparing base (
4ae2ad6
) to head (ddc6c06
). Report is 1 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
These tests were not failing last week, will take a look.
I'm going to separate the tests here as the previous behaviour is quite different and the differences are not obvious here.
These changes likely don't work for the terraform-plugin-sdk v1 - the tests which had to be updated use that.
v2 was released 4 years ago, wondering if we still support it.
I've adapted this to keep the old behaviour for sdkv1 and make unknowns better in sdkv2
This PR has been shipped in release v3.88.0.
This changes the bridge to correctly return unknowns for objects and collections in sdkv2.
fixes https://github.com/pulumi/pulumi-terraform-bridge/issues/1885 fixes https://github.com/pulumi/pulumi-terraform-bridge/issues/2032
stacked on https://github.com/pulumi/pulumi-terraform-bridge/pull/2158
Confirmed that TF sdkv2 supports both unknown blocks and unknown collections of blocks, so we should be fine to pass these into TF providers.
The TF sdkv1 does not support unknowns for blocks and collections so we keep the old behaviour of passing empty/ collection of unknown.
This returns
"lifecycle_rule":cty.UnknownVal(cty.List(cty.Object))
Our handling of collections containing unknowns and unknown collections is significantly better:
Unknown collections: before:
after:
Note that the array being output as an
output<string>
is an engine limitation.Nested unknown collections: before:
after:
The unknown was being put one level lower than it should be.
Quite a few other very wrong outputs in https://github.com/pulumi/pulumi-terraform-bridge/pull/2140, including diff duplications, missing diffs etc.