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

Add convenience method to Plan and return JSON as single func #40

Open
paultyng opened this issue Jul 21, 2020 · 2 comments
Open

Add convenience method to Plan and return JSON as single func #40

paultyng opened this issue Jul 21, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@paultyng
Copy link
Contributor

One option is supporting the exit code:
https://www.terraform.io/docs/commands/plan.html#detailed-exitcode

The Plan signature could be changed to: Plan(...) (changesPresent bool, err error) or something similar to surface the exit code data.

Another option is just returning the actual JSON plan always from the Plan method. In programmatic usage you probably will want it frequently anyway.

We could optionally do both of these in the return values.

@paultyng paultyng added the enhancement New feature or request label Jul 21, 2020
@paultyng
Copy link
Contributor Author

The detailed exit code was handled in #55, but leaving this open as an atomic way to Plan and get plan JSON would be nice, possibly as a convenience method.

@paultyng paultyng changed the title Add to Plan method return values Add convenience method to Plan and return JSON as single func Aug 29, 2020
@paultyng
Copy link
Contributor Author

This is somewhat related to #10, but specific to plan JSON, not state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant