-
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
Bridge converts missing sets wrong when passing to TF provider #1970
Labels
Comments
This was referenced May 14, 2024
VenelinMartinov
changed the title
makeTerraformInputs converts empty sets wrong
makeTerraformInputs converts missing sets wrong
May 14, 2024
Curious if we can fix this. There are some good changes blocked on this now, including #1976 |
Yup, actively working on this in #1971 |
VenelinMartinov
changed the title
makeTerraformInputs converts missing sets wrong
Pulumi converts missing sets wrong when passing to TF provider
May 28, 2024
VenelinMartinov
changed the title
Pulumi converts missing sets wrong when passing to TF provider
Bridge converts missing sets wrong when passing to TF provider
May 28, 2024
VenelinMartinov
added a commit
that referenced
this issue
Jun 5, 2024
part of #1785 This change adds a normalisation step for collections when recovering cty values to pass to terraform. This ensures we represent them similarly to terraform. In practice this means that all block collections need to be passed to TF providers as an empty collection instead of nil. This should get rid of quite a few subtle discrepancies in the data we pass to the TF provider code. These sometimes result in panics since we pass unexpected nils. This gets rid of all known input discrepancies discovered so far through cross-testing. The full rules for what is a block are [here](https://github.com/hashicorp/terraform-plugin-sdk/blob/1f499688ebd9420768f501d4ed622a51b2135ced/helper/schema/core_schema.go#L60). It is essentially properties with schema: typeList or typeSet with a Resource Elem. fixes #1970 fixes #1915 fixes #1964 fixes #1767 fixes #1762 TODO: [DONE] remove the MaxItemsOne default hacks introduced in #1725 (opened #2049) --------- Co-authored-by: Anton Tayanovskyy <[email protected]> Co-authored-by: Ian Wahbe <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
What happened?
Similar to #1916 and #1915, empty sets are also represented wrong in pulumi.
We output a
cty.NullVal
instead of acty.SetValEmpty
Example
TestOptionalSetNotSpecified
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).
The text was updated successfully, but these errors were encountered: