func NewCustomResource(ctx *pulumi.Context,
	name string, args *CustomResourceArgs, opts ...pulumi.ResourceOption) (*CustomResource, error) {
	if args == nil {
		args = &CustomResourceArgs{}
	}
	untyped := kubernetes.UntypedArgs{}
	for k, v := range args.OtherFields {
		untyped[k] = v
	}
	untyped["apiVersion"] = args.ApiVersion
	untyped["kind"] = args.Kind
	untyped["metadata"] = args.Metadata
	var resource CustomResource
	err := ctx.RegisterResource(fmt.Sprintf("kubernetes:%s:%s", args.ApiVersion, args.Kind), name, untyped, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}
NewCustomResource registers a new resource with the given unique name, arguments, and options.
package apiextensions
import (
	"fmt"
	"reflect"
	"github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes"
	metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/meta/v1"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type CustomResource struct {
	pulumi.CustomResourceState
	ApiVersion pulumi.StringOutput `pulumi:"apiVersion"`
	Kind pulumi.StringOutput `pulumi:"kind"`
	Metadata metav1.ObjectMetaPtrOutput `pulumi:"metadata"`
	OtherFields pulumi.MapOutput `pulumi:""`
}