billowy-needle-56870
01/21/2020, 7:14 PMtype Custom struct {
s *pulumi.ResourceState
}
type CustomArgs struct {
}
// NewBucket registers a new resource with the given unique name, arguments, and options.
func NewCustom(ctx *pulumi.Context,
name string, args *CustomArgs, opts ...pulumi.ResourceOpt) (*Custom, error) {
inputs := make(map[string]interface{})
s, err := ctx.RegisterResource("vendoring:x:customresource", name, true, inputs, opts...)
if err != nil {
return nil, err
}
return &Custom{s: s}, nil
}
func (b *Custom) URN() pulumi.URNOutput {
return b.s.URN()
}
error: no resource plugin 'vendoring' found in the workspace or on your $PATH
white-balloon-205
01/22/2020, 12:40 AMCustomResource
is designed for leaf node resources implemented in an external resource provider. Is that what you want? If you want to create resources inside your program, you can use ComponentResource
.
When you define a CustomResource
, you must put a binary pulumi-provider-<name>
on your PATH that speaks the Pulumi provider gRPC protocol. It will be loaded to handle CRUD operations against the resource you have defined.
More about this proces abstractly here: https://www.pulumi.com/docs/intro/concepts/how-pulumi-works/
Can you share more about what you are trying to do?
(aside - as noted in https://pulumi-community.slack.com/archives/CCWP5TJ5U/p1573603543035700 - which I also just pinned to the channel - there are some very major overhauls of the Go provider happening right now to get ready for GA, so you may see things in flux over the next few weeks)billowy-needle-56870
01/22/2020, 8:56 AMctx.RegisterResource("vendoring:x:customresource", name, true, inputs, opts)
by this one
ctx.RegisterResource("vendoring:x:customresource", name, false, inputs, opts)