Skip to content

If all keys are deleted, environment becomes unformatted JSON and stays that way #496

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

Open
pierskarsenbarg opened this issue Mar 24, 2025 · 0 comments
Labels
kind/bug Some behavior is incorrect or out of spec
Milestone

Comments

@pierskarsenbarg
Copy link
Member

What happened?

If I have an environment that only has the values key in it (example is that I'm using the CLI and I've deleted all other keys) then the resulting contents are styled as JSON:

Image

Now, if I add anything else in there, it remains JSON rather than the usual YAML and it's not as easy to read:

Image

Example

Run the following commands:

  1. pulumi env init project/env
  2. pulumi env set project/env mykey value
  3. pulumi env rm project/env mykey

Now go and view the environment, it will have the contents:

values: {}

If I now repeat step 2 from above I get:

values: {mykey: value}

and adding in a secret (pulumi env set project/env mysecretkey value --secret) means getting this:

values: {mykey: value, mysecretkey: {'fn::secret': {ciphertext: ZXNjeAAAAAEAAAEAaaLI6RQ3lN3nwYIJ1daj2rWnzGlIcI8v0BHcOqB8+NYKTatZJA==}}}

Output of pulumi about

CLI
Version      3.157.0
Go Version   go1.24.1
Go Compiler  gc

Host
OS       darwin
Version  15.3.1
Arch     arm64

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).

@pierskarsenbarg pierskarsenbarg added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Mar 24, 2025
@komalali komalali removed the needs-triage Needs attention from the triage team label Mar 24, 2025
@komalali komalali added this to the 0.119 milestone Mar 24, 2025
@cleverguy25 cleverguy25 modified the milestones: 0.119, 0.120 Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

3 participants