-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enforce .Elem.Fields (instead of .Fields) for object types
This is a reversal of our previous stance that .Fields should be used. This aligns the fields argument with [schema generation](https://github.com/pulumi/pulumi-terraform-bridge/blob/72b0b7d33b6d9f0dce7c09b31951ade3711a025d/pkg/tfgen/generate.go#L395-L398). We *need* to choose `.Elem.Fields` as our 1 representation (instead of `.Fields`) because of an ambiguity in `shim.Schema`. From a comment in the PR: > To prevent confusion, users are barred from specifying > information on ps directly, they must set .Fields on ps.Elem: > ps.Elem.Fields. > > We need to make this choice (instead of having users set > information on .Fields (and forbidding ps.Elem.Fields) because > the [shim.Schema] representation is not capable of > distinguishing between Map[Object] and Object. SDKv{1,2} > providers are not able to express Map[Object], but Plugin > Framework based providers are. While this is technically a breaking change, I don't expect users to be broken. Any user that would break on this change would have been unable to addapt the last several bridge versions (for example: pulumiverse/pulumi-talos#99). Fixes #2185
- Loading branch information
Showing
2 changed files
with
45 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters