Any advice on escaping “.” In the config set comma...
# general
Any advice on escaping “.” In the config set command? We’d like to end up with secure: encryptedval But we end up getting this when we use “.” anywhere in the passed in value foo: bar: bar2: bar3: secure: encryptedval
you’re getting this even when you don’t pass the
—path worked but our new issue is now the engineer that needs to run it will likely use power shell and power shell gets angry when we use bracket notation so for example pulumi config set-all --path --plaintext '[""].[""]'=value doesn’t work for use in power shell
Ah, I was answering the question about escaping the
- it sounds like you’re now asking about the reverse… i.e. setting a nested value within an object - is that right?
You can also pass in the json string of the object you are trying to nest i.e.
Copy code
pulumi config set "{\"\": \"value\"}"
Yeah we want a nested value inside an object Like example configfoo Bar: value1 Bar2: value2 Bar3: value3
What you sent errors out saying it accepts between 1 and 2 arg but received 3
Not sure if it is escaping correctly in powershell
hmm… try
pulumi config set "" "{\"\": \"value\"}"
And you can probably avoid escaping the inner quotes by using single quotes on the outside
pulumi config set '' '{"": "value"}'
The end result for the last one was Configparent name: ‘{ value}’ With the —path flag on
Yeah… don’t use the path flag
Because the way you are using it you don’t want it to be interpreted as a path in an object
Without —path results with ‘{ value}’
Isn’t that what you want?
Is that functionally the same as configfoo Bar: value1 Bar2: value2 Bar3: value3 Maybe I’m misunderstanding. These will be secrets too so ultimately it will be secure values inside too.
We only need this for like 6 or so values and we wanted to make it easier on another engineer to script it out in powershell for them but we may just have them set the values and we go back in and manually manipulate the yaml file.
Thank you for the help you’ve provided 😊
👍🏽 1