Open AshOfSpades opened 1 year ago
Another thing which I noticed is if I add change directory command it works -
- task: AWSShellScript@1
displayName: 'display output variables'
name: TerraformOutput
inputs:
workingDirectory: $(Pipeline.Workspace)/terraform
scriptType: 'inline'
inlineScript: |
cd $(Pipeline.Workspace)/terraform
terraform output -json
awsCredentials: ${{ parameters.awsCreds }}
Describe the bug
When I run terraform output command in the AWSShellScript task (after a successfult terraform apply task) it returns {}, However if I group it with terraform apply it provides all the outputs without any problem.
So basically this returns just {} with no outputs whatsoever -
But if instead of having a separate task for terraform apply, if I include terraform apply in the same task, it works perfectly fine.
Expected behavior
Running just terraform output should return the output as result in logs
Your Environment