DevOps | Scripts | Automation

Azure DevOps

How to install terraform extension in Azure Pipeline?

To add/remove extensions in Azure DevOps or in Azure Pipeline, you need to use the Organization settings page.

For example, in the below pipeline, we need to add terraform-related tasks but it’s not available by default.

Terraform task not available in Pipeline

So, browse the organization setting by clicking on the Organization Name, and at the bottom, you will see the “Organization Settings” tab.

Organization Settings

Click on the extensions under General. On the right side, you will see the Installed extensions and if any member from your organization has requested for the new extension. In the below image, we don’t see the terraform extension under the installed tab.

Extensions page

Click on the Browse marketplace button and it will redirect to the Azure DevOps extension page.

Alternatively, you can directly browse the marketplace from the URL: https://marketplace.visualstudio.com/ and can request an extension from there.

Marketplace extension page

Search for the terraform extension. You see there are multiple terraform extensions from different providers. I always prefer to go with the standard extension available from Microsoft but it’s an individual choice to work with an extension they are comfortable with.

Terraform Extension

Click on the extension and click “Get it free“.

Get Extension

Once you click it, select the organization name that you have your projects and click on Install button.

Click Install

Once the installation is completed, click on the “Proceed to organization” button.

Proceed to Organization

If you are the Organization owner or admin, the extension will be installed directly. Otherwise request will be sent to the Owner(s) and they can approve request from the organization tab.

Check the extension tab again on the Organization settings page.

Installed Terraform Extension

Now check the pipeline and try adding the task again, you will see the terraform modules.

Terraform task in Azure Pipeline