Open sam-rooke-ppb opened 1 week ago
I want to add extra commands to the end of my terraform plan script, but I get the Too many command line arguments error due to -detailed-exitcode being added to the end of the command.
Too many command line arguments
-detailed-exitcode
Here's the example I'm working with:
- task: TerraformTaskV4@4 displayName: 'Terraform Plan' inputs: provider: 'aws' command: 'plan' commandOptions: '-out="test.tfplan" > tf_plan.txt' workingDirectory: '$(System.DefaultWorkingDirectory)/terraform' environmentServiceNameAWS: 'aws-service-name'
Change request
Either one of:
commandOptions
Actual behaviour
The command output looks like:
terraform plan -out="test.tfplan" > tf_plan.txt -detailed-exitcode
Expected behaviour
The command output to look like:
terraform plan -detailed-exitcode -out="test.tfplan" > tf_plan.txt
Or to be able to specify an input option so the task will look like:
- task: TerraformTaskV4@4 displayName: 'Terraform Plan' inputs: provider: 'aws' command: 'plan' commandOptions: '-out="test.tfplan" > tf_plan.txt' workingDirectory: '$(System.DefaultWorkingDirectory)/terraform' environmentServiceNameAWS: 'aws-service-name' detailedExitCode: false
I want to add extra commands to the end of my terraform plan script, but I get the
Too many command line arguments
error due to-detailed-exitcode
being added to the end of the command.Here's the example I'm working with:
Change request
Either one of:
-detailed-exitcode
flag to be added automatically as the first flag before attaching the user specifiedcommandOptions
-detailed-exitcode
flagActual behaviour
The command output looks like:
Expected behaviour
The command output to look like:
Or to be able to specify an input option so the task will look like: