mirror of https://github.com/pulumi/pulumi.git
![]() 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. |
||
---|---|---|
.. | ||
doc.go | ||
doc_test.go | ||
gen.go | ||
gen_crd2pulumi.go | ||
gen_program.go | ||
gen_program_expression_test.go | ||
gen_program_expressions.go | ||
gen_program_inputs.go | ||
gen_program_json.go | ||
gen_program_optionals.go | ||
gen_program_read_dir.go | ||
gen_program_splat.go | ||
gen_program_ternaries.go | ||
gen_program_test.go | ||
gen_program_utils.go | ||
gen_test.go | ||
importer.go | ||
utilities.go | ||
utilities_test.go |