https://pulumi.com logo
#contribute
Title
# contribute
s

straight-beach-79533

05/05/2023, 4:12 PM
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

melodic-tomato-39005

05/05/2023, 4:19 PM
This is configuration that the provider requires. In this case, looks like only `hcloud:token`/`HCLOUD_TOKEN` - is it set?
s

straight-beach-79533

05/05/2023, 4:24 PM
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

melodic-tomato-39005

05/05/2023, 4:26 PM
Great! Sorry for the unhelpful error message.
s

straight-beach-79533

05/05/2023, 4:26 PM
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

melodic-tomato-39005

05/05/2023, 4:28 PM
That’s a good point. Probably here which already mentions TF_LOG.
s

straight-beach-79533

05/05/2023, 4:30 PM
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.
2 Views