salmon-dream-92808
02/27/2024, 5:30 PMexamples/simple
. The package is called platform
and the component class I'm creating is called Platform
Error: unknown resource type platform:index:Platform: Error: unknown resource type platform:index:Platform
at Provider.<anonymous> (/snapshot/pulumi-resource-platform/bin/provider.js:38:27)
at Generator.next (<anonymous>)
at /snapshot/pulumi-resource-platform/bin/provider.js:21:71
at new Promise (<anonymous>)
at __awaiter (/snapshot/pulumi-resource-platform/bin/provider.js:17:12)
at Provider.construct (/snapshot/pulumi-resource-platform/bin/provider.js:33:16)
at Server.<anonymous> (/snapshot/pulumi-resource-platform/node_modules/@pulumi/pulumi/provider/server.js:316:52)
at Generator.next (<anonymous>)
at fulfilled (/snapshot/pulumi-resource-platform/node_modules/@pulumi/pulumi/provider/server.js:18:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
I don't know why this default case in the autogenerated code is being run because the bin/provider.js
file has a switch case 'platform:index:Platform'
which is the same type indicated in the thrown error.little-cartoon-10569
02/27/2024, 7:33 PMsuper()
. It doesn't go anywhere else in your code.salmon-dream-92808
02/28/2024, 2:32 PMsalmon-dream-92808
02/28/2024, 2:36 PMfailed to register new resource
… at Object.registerResource
…little-cartoon-10569
02/28/2024, 6:51 PMsalmon-dream-92808
02/29/2024, 12:38 PMlittle-cartoon-10569
02/29/2024, 7:08 PMI need a provider because I’m trying to package an existing ComponentResource.Can you explain this? I have component resource classes in packages that are used in multiple projects. Putting a ComponentResource in a jar or NPM package or pip package or whatever doesn't require a provider. A provider is required when you need to make non-Pulumi SDK calls to manage your resources. This should not apply to ComponentResources: if you need to do this, you need a CustomResource, not a ComponentResource.
little-cartoon-10569
02/29/2024, 7:10 PMsalmon-dream-92808
03/01/2024, 10:40 AMlittle-cartoon-10569
03/03/2024, 7:08 PMsalmon-dream-92808
03/04/2024, 10:27 AMpulumi plugin install resource xyz v0.0.1 -f bin/pulumi-resource-xyz