Good morning, Im having trouble parsing an item fr...
# golang
Good morning, Im having trouble parsing an item from the config:
pulumi config set adminRole "foobar"
My code has a string variable defined I will load the value into ..
var adminRole string
conf := config.New(ctx, "")
conf.RequireObject("adminRole", &adminRole)
But, running pulumi up fails with an error I fail to understand:
panic: fatal: A failure has occurred: unable to unmarshall required configuration variable 'my_project:adminRole'; invalid character 'o' in literal false (expecting 'a')
I tried with various versions of "foobar" or foobar without the quotes
Interesting is the code points to the 'o' and not f .. I even tried setting "false" and then the code complains about false being boolean and my target go type is a string
Not so "fun fact", when I change my code from config.RequireObject to foo := config.Require it works ..
That sounds odd. Would you mind opening a bug with a repro.
does return a string.
will read the string value and attempt to unmarshal it into the provided interface (a string in your case). I image that you probably want
in this case
👍 1
Will open a bug report