Hey, I'm having an issue where pulumi overwrites t...
# general
n
Hey, I'm having an issue where pulumi overwrites the stack config file on each run (
Pulumi.production.yaml
) it sorts all the keys and removes all comments and whitespace. Is there some way to prevent it from doing this? I have a bunch of comments and logical grouping/ordering that I don't want to get lost
m
I've never had Pulumi remove my comments. Are you using the automation API by chance?
As far as I know, Pulumi stack configuration is tightly-coupled with these YAML files. To the point that the CLI and Automation API which wraps the CLI require them. https://github.com/pulumi/pulumi/blob/master/sdk/nodejs/automation/localWorkspace.ts#L31-L43
👍 1
n
I'm not using the automation api directly, but the file is overwritten/reserialised on each pulumi preview or pulumi up - so I guess something could be going on with that automation api
m
We'd need to see more code to make a determination. The stripping on the comments in the Pulumi stack configurations is not something I've ever had happen.
n
It seems I'm running into specifically this: https://github.com/pulumi/pulumi/issues/6848 Which would be addressed by this age old issue: https://github.com/pulumi/pulumi/issues/423