Terraform v0.11.10
Currently, if you wish to execute multiple commands locally, you have two options.
command variable:command = <<EOT
command_one --flag ;
command_two --flag
EOT
Why is this so different from remote-exec's implementation, when the two provisioners should share a large amount of functionality (this included)?
Remote-exec's version:
inline = [
"command_one --flag",
"command_two --flag"
]
Also... inline? Is that truly the best name for this field?
Change local-exec's command variable to accept an array of commands to execute.
Change remote-exec's inline variable name to make more sense. commands, perhaps?
it would be nice if remote exec allowed at least the same multiline format like you say -
command = <<EOT
command_one --flag ;
command_two --flag
EOT
it would be nice if remote exec allowed at least the same multiline format like you say -
command = <<EOT command_one --flag ; command_two --flag EOT
I think that would definitely be a step in the wrong direction. remote-exec's implementation of accepting an array of commands would be preferred, and the multi-line syntax is despicable.
I agree with @commonbreed. I'd +1 to having local-exec take an array of commands to run as input
Most helpful comment
I agree with @commonbreed. I'd +1 to having local-exec take an array of commands to run as input