-
Notifications
You must be signed in to change notification settings - Fork 117
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
tfexec: add InitJSON #478
tfexec: add InitJSON #478
Conversation
refactors `tfexec/init.go` by splitting the init functions into distinct functions to facilitate the support of the new InitJSON function. Signed-off-by: Bruno Schaatsbergen <[email protected]>
The `InitJSON` and `initJSONCmd` functions append the `-json` argument to instruct the init command to write machine-readable JSON to the supplied `io.Writer`. Signed-off-by: Bruno Schaatsbergen <[email protected]>
a873d8a
to
351f2e0
Compare
Signed-off-by: Bruno Schaatsbergen <[email protected]>
351f2e0
to
d7e2db6
Compare
Signed-off-by: Bruno Schaatsbergen <[email protected]>
…de positional arguments. Since the optional positional directory argument must follow all flags, as flags precede positional arguments, we append it to the args list only after all flags have been added. Signed-off-by: Bruno Schaatsbergen <[email protected]>
cb6532b
to
1b71d09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR and sorry that it took us so long to review!
We're fine with the proposed API, but we expect it to change a bit in the future as we come closer to version 1.0*
Co-authored-by: Daniel Banck <[email protected]>
Co-authored-by: Daniel Banck <[email protected]>
Co-authored-by: Daniel Banck <[email protected]>
^ it's likely there will be only one We face the same problem with |
Fixes #442
tfexec/init.go
to facilitate (split some code into distinct functions) the support the newInitJSON
function, similar toApplyJSON
andPlanJSON
.InitJSON
functions.