I just want some arbitrary resource that fits the ...
# general
b
I just want some arbitrary resource that fits the
pulumi.Resource
interface
e
There's some docs about tests and mocks at https://www.pulumi.com/docs/guides/testing/unit/ But it looks like your asking how to write a new simple type that is a
Resource
? I think that would just be setting up the mocks as documented above and calling
ctx.RegisterResource("package:module:type", name, args, &resource, opts...)
with your made up resource type.
b
I found that I needed a struct that embeds pulumi.ResourceState or pulumi.CustomResourceState in order to get a struct that adheres to the Resource interface. In addition to what you mentioned, the registration.