How Do You Find the Working Directory in an Azure DevOps Release Pipeline?

Problem scenario
A Terraform task is failing in an Azure DevOps release pipeline. You cannot see a variable setting for the working directory. How do you determine the working directory?

Go to Edit your release pipeline. Go to "View YAML" in the upper right hand corner. Search for "working". You should see it (e.g., as workingDirectory).

The working directory key probably has a value that is a variable (e.g., $foobar). Find $foobar in the relevant Task in the Azure DevOps Release pipeline (and remember that Terraform tasks have a Terraform logo near them.). Consider changing the $foobar variable (e.g., use an option to drill down). The variable key may be called (or invoked) in the "Configuration Directory" in the Azure DevOps pipeline task. The $foobar variable value may need to be changed (but these directions are just for identifying its value). You may need to look at the individual Tasks of the release or the Variables tab of the pipeline.

This solution was partially adapted from two independent articles (external blog posting here and another one here) and this article.

Leave a comment

Your email address will not be published. Required fields are marked *