I am trying to tweak the token mentioned <here> (`...
# python
w
I am trying to tweak the token mentioned here (
xyz:index:StaticPage
) , to something like
company_name:module_name:resource_name
. But whenever I name it something apart from
index
I end up getting this stack trace mentioned in the thread. Can someone help me out with this? I might be missing something obvious
Copy code
error: Program failed with an unhandled exception:
    error: Traceback (most recent call last):
      File "/home/sushantk/temporary/pulumi-demo/pulumi-COMPANY_NAME/examples/COMPANY_NAME-example/venv/lib/python3.8/site-packages/pulumi/runtime/resource.py", line 519, in do_rpc_call
        return monitor.RegisterResource(req)
      File "/home/sushantk/temporary/pulumi-demo/pulumi-COMPANY_NAME/examples/COMPANY_NAME-example/venv/lib/python3.8/site-packages/grpc/_channel.py", line 946, in __call__
        return _end_unary_response_blocking(state, call, False, None)
      File "/home/sushantk/temporary/pulumi-demo/pulumi-COMPANY_NAME/examples/COMPANY_NAME-example/venv/lib/python3.8/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking
        raise _InactiveRpcError(state)
    grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
    	status = StatusCode.UNKNOWN
    	details = "Unexpected <class 'Exception'>: Unknown resource type COMPANY_NAME:MODULE_NAME:RESOURCE_NAME"
    	debug_error_string = "{"created":"@1638385658.479468567","description":"Error received from peer ipv4:127.0.0.1:41779","file":"src/core/lib/surface/call.cc","file_line":1063,"grpc_message":"Unexpected <class 'Exception'>: Unknown resource type COMPANY_NAME:MODULE_NAME:RESOURCE_NAME","grpc_status":2}"
For background I havent changed much in the boiler plate code apart from replacing
xyz
to the required provider name.
b
i has to be index
w
I see
Also, is one of the input parameter fixed to
indexContent
?
p
confused me who didn’t use
index
and still got it working
🤨 Nvm, I see it’s something more specific here. I was thinking about component resource naming scheme.
w
I guessing that is a naming convention followed? If you search for this phrase on this page
Copy code
<package>:<module>:<type>
https://www.pulumi.com/docs/intro/concepts/resources/#authoring-a-new-component-resource I had assumed that this would be configurable
p
I need to dig deeper into that then because the funny fact is that I have resources with tokens like:
companyName:gcp:CloudSql
and it works like a charm so I don’t really get the part where you guys say it has to be
index
.
w
Oh k. Fwiw, whenever I use a module name apart from
index
and run
make generate
the python SDK that gets generated has en extra directory created with that module name. And when I use index that does not happen.
Not sure if the hierarchy is understandable from those 2 screenshots but, the picture that has boxes with a blue tint has an additional
aws
folder created. That does not happen with
index
Hi Jakub, just following up on this. Would it be possible for you to share the repo where you have tried create a repo with that token. I am seeing a ton of examples for golang but the boilerplate is the only one for python
Hi Jakub ! Following up on this. I am still trying to figure out what convention is used for tokens.
I have resources with tokens like: 
companyName:gcp:CloudSql
Any existing example will also do