Hi, I found quite big flaw in `pulumi config set` ...
# general
g
Hi, I found quite big flaw in
pulumi config set
command (for v1.14.0) when i tried to set value for structured configuration. When I run:
pulumi config set --path key.prop "1002000"
Result is
Copy code
proj:key:
    prop: 1.002e+06
but for:
pulumi config set --path key.prop "100200"
Copy code
proj:key:
    prop: 100200
Some one encountered this issue? Independently from this bug it would be nice to force save as text because it impacts program flow.
g
It's setting as a number and the value is the same. For a number property there is no problem as neither yaml nor json differentiate integer from floats, it's all just numbers. If the intention was to have a string then I agree there could be a
--string
option to the command. As a possible workaround, could you try piping the value in? Like
echo "1002000" | pulumi config set --path key.prop
g
My intention is to set string there and I can't find a way to do it with command (I have a lot stack files to update with script)
As a possible workaround, could you try piping the value in? LikeĀ 
echo "1002000" | pulumi config set --path key.prop
Yes I tried. It behaves the same
@green-school-95910 yes, you are right when i get the value in program it's
1002000
. Unfortunately I need string there. Only workaround I can see now is to make some ugly code which handles it.
m
In the meantime, to workaround you could wrap the value in the yaml file with quotes.