Closed msglueck closed 9 months ago
This is done by setting the workingDirectory
field on the task.
Ok, thx for pointing that out. That was actually the first thing I tried… but the pipeline had another issue that lead to a misleading error. For now moved the subfolder to another repository. Which is my current use-case even cleaner, but will try your suggestion next time! Thanks for the quick response.
Describe the bug / feature request Terraform supports options and global options. I would like to have a separate runbook in a subfolder and call this from a separate pipeline. Currently the inputs section of a task supports
commandOptions
which are correctly appended to the end of the command. But global options need to be added before the terraform command. From these global options thechdir
would be handy in my use-case. Adding-chdir ./subfolder
to the commandOptions creates an error responseUsage: terraform [global options] init [options]
Global options (use these before the subcommand, if any):
-chdir=DIR Switch to a different working directory before executing the given subcommand.
-help Show this help output, or the help for a specified subcommand.
-version An alias for the "version" subcommand.
To Reproduce Steps to reproduce the behavior:
-chdir ./subfolder
to the /inputs/commandOptions of a taskExpected behavior the
-chdir ./subfolder
is added before the terraform command or an optional additionalcommandOptionsGlobal
is available in inputs templateAgent Configuration
Additional context this might end up in a feature request/PR. just wanted to check upfront if this is the preferred way to do so