Skip to content

feat(cli): add -json flag for state show#38341

Draft
mildwonkey wants to merge 3 commits intomainfrom
mildwonkey/state-show-json
Draft

feat(cli): add -json flag for state show#38341
mildwonkey wants to merge 3 commits intomainfrom
mildwonkey/state-show-json

Conversation

@mildwonkey
Copy link
Copy Markdown
Contributor

This is less of a PR and more of a cry for help - I set out to implement a json output for terraform state show, and ended up with something that works fine but is tacked on in ways I'm not comfortable with (among other complaints, the not-implemented HumanRendered equivalent).

This is - not the worst thing I've ever written (unfortunately), but better probably involves a huge amount of refactoring, so I think our options are:

  1. this, but do it better (I'll take any suggestions that don't involve refactoring everything!)
  2. I can close and forget about this until we decide to take on the a massive ui/streams/views refactoring
  3. this, not much better (because we'll refactor everything to use consistent views eventually, and it's fine)("""eventually""")

Fixes #

Target Release

1.16.x

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

CHANGELOG entry

  • This change is user-facing and I added a changelog entry.
  • This change is not user-facing.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Changelog Warning

Currently this PR would target a v1.16 release. Please add a changelog entry for in the .changes/v1.16 folder, or discuss which release you'd like to target with your reviewer. If you believe this change does not need a changelog entry, please add the 'no-changelog-needed' label.

@mildwonkey mildwonkey force-pushed the mildwonkey/state-show-json branch from a4408d9 to 25a74f4 Compare April 2, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant