pulumi
pulumi copied to clipboard
Resolve discriminated unions when the discriminator is a string pointer
Examples in our docs that use discriminated unions to determine ...Input types are broken, e.g., pulumi/pulumi-azure-native#1960.
Debugging this, I found that the discriminator is expected to be a string, but it is (in this case) a *string wrapped in a __convert call. This patch simply tries both cases.
Submitting this as a speculative draft PR because I'm new to this area and don't know if this is the best approach to fix the issue. Maybe the __convert(*string) should be resolved to a plain string before the lookup?
Apologies for the whitespace changes, gofmt 1.19 will do that.
Please view the results of the Downstream Codegen Tests Here
Changelog
[uncommitted] (2022-09-22)
I see a .NET test case. We're missing a test case for python, nodejs and go. If the test case tests your code, I can take it from there if you want?
bors merge