I have a Terraform output task which is displaying the data but I want to use the app_name as input variable in the deployment stage, could you help here?
- task: TerraformTaskV4@4
name: terraformOutput
inputs:
provider: 'azurerm'
command: 'custom'
workingDirectory: '$(Pipeline.Workspace)'
environmentServiceNameAzureRM: service_connection
customCommand: 'output'
outputTo: 'file'
fileName: 'output.json'
outputFormat: 'json'
https://marketplace.visualstudio.com/items?itemName=charleszipp.azure-pipelines-tasks-terraform#terraform-output-to-pipeline-variables says it created the output as TF_OUT_, but no, it doesn't work. Where does this output.json gets saved? Then I tried getting it from the bash and it does not return anything.
- bash: |
WEBAPP_NAME=$(cat $(terraformOutput.jsonOutputVariablesPath) | jq '.webapp_name.value' -r)