Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pulumi config set command is reordering stack file keys #10244

Open
krisdock opened this issue Jul 26, 2022 · 4 comments
Open

pulumi config set command is reordering stack file keys #10244

krisdock opened this issue Jul 26, 2022 · 4 comments
Labels
area/config pulumi config kind/enhancement Improvements or new features resolution/duplicate This issue is a duplicate of another issue

Comments

@krisdock
Copy link

What happened?

when setting new config items using pulumi config set, the stack file it touches has its keys reordered alphabetically. this shouldn't be the default behavior. i like to keep my stack files arranged in certain way and this requires me to fix them every time i set a new config/secret key.

Steps to reproduce

run pulumi config set against any non-alphabetically arranged stack file.

Expected Behavior

no reordering, just add the new config/secret key to the bottom of the relevant section.

Actual Behavior

stack file gets rearranged so that keys are alphabetical

Versions used

CLI
Version 3.36.0
Go Version go1.18.4
Go Compiler gc

Plugins
NAME VERSION
kubernetes 3.20.2
python unknown

Host
OS darwin
Version 12.4
Arch arm64

This project is written in python: executable='/opt/homebrew/bin/python3' version='3.9.13'

Current Stack: dev-publicapi-test

Found no resources associated with dev-publicapi-test

Found no pending operations associated with dev-publicapi-test

Backend
Name pulumi.com
URL https://app.pulumi.com/kris-dockery-dutchie-com
User kris-dockery-dutchie-com
Organizations kris-dockery-dutchie-com, getdutchie

Dependencies:
NAME VERSION
boto3 1.24.37
click 8.1.3
Jinja2 3.1.2
pip 22.2
pulumi-kubernetes 3.20.2
setuptools 63.2.0
wheel 0.37.1

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@krisdock krisdock added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jul 26, 2022
@Frassle Frassle added resolution/duplicate This issue is a duplicate of another issue area/config pulumi config and removed needs-triage Needs attention from the triage team labels Jul 26, 2022
@Frassle
Copy link
Member

Frassle commented Jul 26, 2022

Duplicate of #423

@Frassle Frassle marked this as a duplicate of #423 Jul 26, 2022
@Frassle Frassle closed this as completed Jul 26, 2022
@MitchellGerdisch
Copy link

This is still an issue.
If I have a config file as follows:

config:
  cfg-reorder:foo: goo
  cfg-reorder:boo: foo

and then run pulumi config set moo boo
the config file is reordered to:

config:
  cfg-reorder:boo: foo
  cfg-reorder:foo: goo
  cfg-reorder:moo: boo

@AaronFriel AaronFriel added kind/enhancement Improvements or new features and removed kind/bug Some behavior is incorrect or out of spec labels Apr 1, 2023
@olafurnielsen
Copy link

+1 on this issue

It's really annoying that pulumi config reorders the config file as we group related configurations for readability.

@krisdock krisdock changed the title pulumi v3.36.0 config set command is reordering stack file keys pulumi config set command is reordering stack file keys Aug 22, 2023
@krisdock
Copy link
Author

changed the issue title to not be version-specific. this is still an issue on:

pulumi version
v3.78.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/config pulumi config kind/enhancement Improvements or new features resolution/duplicate This issue is a duplicate of another issue
Projects
None yet
Development

No branches or pull requests

5 participants