-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # 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 <git@bschaatsbergen.com>
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 <git@bschaatsbergen.com>
a873d8a
to
351f2e0
Compare
Signed-off-by: Bruno Schaatsbergen <git@bschaatsbergen.com>
351f2e0
to
d7e2db6
Compare
Signed-off-by: Bruno Schaatsbergen <git@bschaatsbergen.com>
…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 <git@bschaatsbergen.com>
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 <dbanck@users.noreply.github.com>
Co-authored-by: Daniel Banck <dbanck@users.noreply.github.com>
Co-authored-by: Daniel Banck <dbanck@users.noreply.github.com>
^ 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.