Terraform Tasks for Azure DevOps
The tasks in this extension allow for running terraform cli commands from both the Build and Release pipelines in Azure DevOps. The motivation for this extension was to provide terraform pipeline tasks that could execute on all build agent operating systems and provide contextual/guided task configuration.
The Terraform CLI task supports executing the following commands
Compatible with Linux Build Agents
The tasks can execute on all supported build agent operating systems including Ubuntu and MacOS.
Separate Task for Terraform Installation
Contextual Task Configuration
The task definition will adjust to the selected command to prompt for what is relevant to the command. For example,
Azure Service Connection / Service Principal Integration
Remote & Local Backend State Support
The task currently supports two backend configurations
The backend configuration will be prompted when relevant for the selected command. If azurerm selected, the task will prompt for a service connection and storage account details to use for the backend.
(NEW) Automated Remote Backend Creation
The task supports automatically creating the resource group, storage account, and container for remote azurerm backend. To enable this, select the task for the terraform init command. Check the checkbox labled "Create Backend (If not exists)" underneath the backend type drop down. Once selected, the resource group location and storage account sku can be provided. The defaults are 'eastus' and 'Standard_RAGRS' respectively. The task will utilize AzureCLI to create the resource group, storage account, and container as specified in the backend configuration.
Secure Variable Secrets
There are two methods to provide secrets within the vars provided to terraform commands. First, if providing individual