Skip to content
This repository was archived by the owner on Jun 27, 2025. It is now read-only.

Update the plan command.#387

Open
angrycub wants to merge 3 commits into
hashicorp:mainfrom
angrycub:cv/fix-plan
Open

Update the plan command.#387
angrycub wants to merge 3 commits into
hashicorp:mainfrom
angrycub:cv/fix-plan

Conversation

@angrycub

@angrycub angrycub commented Dec 1, 2020

Copy link
Copy Markdown
Contributor

This is a pretty big PR, but this fixes the levant plan command to output an entire plan in "pretty" mode. Also added some CLI flags to allow the user to specify the output format and where they would like the output to go. I added a CLI mode in case we wanted to bring colors to the party.

I think the JSON -> Lines conversion could probably be made more elegant 💍, but for now it seems to do the right thing. Would like to add some testing for all this too, but I wanted you to start milling over what I'd done thus far.

@cgbaker cgbaker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. minor bike-shedding on command line args, feel free to ignore me.

also, CI is apparently broken?

Comment thread command/plan.go
Specify the format of plan to be emitted. Valid values include JSON, DIFF,
and NDJSON. The default is DIFF.

-output-to

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

render has a similar config, but it uses the -out:

-out=<file>

Comment thread command/plan.go
is currently set in a running job.
is currently set in a running job.

-output-format

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-output-format is perhaps redundant? maybe just -format?

update: i see that this is drawing a distinction against -log-format... 🤔

Base automatically changed from master to main March 3, 2021 19:50
@hashicorp-cla

hashicorp-cla commented Mar 12, 2022

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants