debugging plugins and configuration keys Hello, o...
# contribute
s
debugging plugins and configuration keys Hello, on GitHub I found the PR that adds support to attach the engine to a running plugin via the env var
PULUMI_DEBUG_PROVIDERS
. My problem is that, even before being able to use the debugger, I get an RPC error as follows: Start plugin and get port:
Copy code
~/.pulumi/plugins/resource-hcloud-v1.11.1/pulumi-resource-hcloud
52401
Start the engine:
Copy code
$ PULUMI_DEBUG_PROVIDERS=hcloud:52401 pulumi up
Previewing update (dev):
...
Diagnostics:
  pulumi:providers:hcloud (default):
    error: rpc error: code = InvalidArgument desc = required configuration keys were missing
Where do I get these
required configuration keys
? thanks!
m
This is configuration that the provider requires. In this case, looks like only `hcloud:token`/`HCLOUD_TOKEN` - is it set?
s
Aaaah. I was passing
HCLOUD_TOKEN
as env var to the engine; are you saying that I should instead, for the attach to work, pass it to the plugin?
Yes! It works!
m
Great! Sorry for the unhelpful error message.
s
Thanks for the quick reply!
Since we are talking about plugin debugging/development, any chance to mention these instructions in the hugo repo? To help people to get started?
m
That’s a good point. Probably here which already mentions TF_LOG.
s
Yes exactly. As a dev new to pulumi but with a certain experience, I found that page and when I saw the TF_LOG I hoped there was something less painful and searching around I stumbled upon the PR that PULUMI_DEBUG_PROVIDERS. So yes, that page would be perfect.
Less painful == less painful than adding printf and looking at the logs.