pulumi/pkg/codegen
Justin Van Patten a9f0aead13
[codegen/go] Fix Go resource registrations (#6641)
We've been emitting calls to `New<Resource>` for resource registrations
in Go, passing `nil` for args. However, some of those `New<Resource>`
functions actually check for `nil` args and return an error if the
resource has required arguments.

At first, I was looking for a way to check inside `New<Resource>` if
the `URN` option was specified and in that case not error on
`nil` args (like we do in other languages), but we don't provide a way
to access the resource option values outside the Go SDK), so I don't
think there is a way to do it this way for Go.

So instead, this change updates the registration code to call
`ctx.RegisterResource` directly instead of `New<Resource>`, where we can
pass a `nil` args.
2021-03-31 16:50:30 -06:00
..
docs Update resource-docs templates to adjust for Hugo upgrade (#6524) 2021-03-14 07:24:55 -07:00
dotnet Add schema & codegen support for plain properties (#6481) 2021-03-10 07:08:08 -08:00
go [codegen/go] Fix Go resource registrations (#6641) 2021-03-31 16:50:30 -06:00
hcl2 Fix a lint error 2021-02-23 11:17:02 +01:00
importer [cli] Add an import command. (#4765) 2020-10-14 12:51:53 +01:00
internal/test [codegen/go] Fix Go resource registrations (#6641) 2021-03-31 16:50:30 -06:00
nodejs Change nodejs codegen to use coalescing operator when when default values are present (#6496) 2021-03-10 21:16:18 +00:00
python Add schema & codegen support for plain properties (#6481) 2021-03-10 07:08:08 -08:00
schema Add schema & codegen support for plain properties (#6481) 2021-03-10 07:08:08 -08:00
docs.go [codegen/*] - Fix enum names that start with an underscore. (#5950) 2020-12-16 09:22:44 -08:00
docs_test.go [codegen/docs] Reimplement example extraction. (#4851) 2020-06-18 12:32:15 -07:00
utilities.go [codegen/nodejs] Emit externally referenced resources/types (#6225) 2021-01-29 16:52:00 -08:00