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
dbanck
left a comment
There was a problem hiding this comment.
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.goto facilitate (split some code into distinct functions) the support the newInitJSONfunction, similar toApplyJSONandPlanJSON.InitJSONfunctions.