Terraform vars into VSTS varsTo contribute to this extension, please visit this repository. IntroductionA lot of people use Terraform for infrastructure as code, and they save their values in tfvar files, for every environment. In addition, when running builds and releases, sometimes you may need those values to pass them to other build tasks. This task is handy in such situation, where you would like to extract a tfvar value so easily into an Azure Devops variable $(something). It also supports the lookup option where there is a root key. The below examples should explain more. How to use the taskThese are the supported two scenarios on how to use the task.
Scenario 1:When you have a direct key and value declared in a tfvar file like the below example:
In this case, your properties in your task should look like that: (notice that the root key is left blank) Scenario 2:When you have a root key, a key and value declared in a tfvar file like the below example. This is known as a lookup variable:
In this case, your properties in your task should look like that: |