DEV Community

Cover image for Integrate Azure Devops and Terraform Cloud
Arindam Mitra
Arindam Mitra

Posted on • Updated on

Integrate Azure Devops and Terraform Cloud

Greetings my fellow Technology Advocates and Specialists.

This is Chapter #2 of my Terraform Cloud Series.

In this Session, I will demonstrate, how to Integrate Azure Devops and Terraform Cloud.

ADDITIONAL CONTRIBUTOR(S):-
1. Anand Arbone - @anandarbone

I had the Privilege to talk on this topic in ONE Azure Communities:-

NAME OF THE AZURE COMMUNITY TYPE OF SPEAKER SESSION
Azure Spring Clean - 2024 Virtual
EVENT ANNOUNCEMENTS:-
Image description
REQUIREMENTS:-
1. Terraform Cloud and Organization(s).
2. Azure Devops Organization(s) and Project(s).
CODE REPOSITORY:-

Terraform Cloud Series:-

CONTRIBUTORS:-
1. Arindam Mitra
2. Anand Arbone

Greetings to my fellow Technology Advocates and Specialists.

Below is the list of all the blogs published under Terraform Cloud Series:-




TERRAFORM CLOUD LOGIN URL:-
https://app.terraform.io/session
Image description
STEP BY STEP PROCESS:-
1. Validate if the Policy in your Azure Devops Organization is enabled - "Third-party application access via OAuth".
Image description
2. Browse to Terraform Cloud and select the Organization to configure VCS Providers.
Note: One or More VCS Providers can be configured within the same Terraform Cloud Organization.
Click on "Add a VCS Provider".
Image description
Select "Azure Devops" version control provider and "Azure Devops Services" as version.
Image description
The below highlighted information will be required to Register Authorized OAuth App in Azure Devops - a) Company name; b) Application Name; c) Application Website; d) Callback URL; and e) Authorized Scope
Image description
Screenshot continued...
Once we have successfully registered Authorized OAuth App in Azure Devops, we will then receive "App ID" and "Secret" which will be required for below.
Image description
3. Browse to Azure DevOps Organization to Register Authorized OAuth App.
The below option is located on the top right hand corner of Azure Devops Portal.
Image description
Select "Authorizations" and Click on "Click Here" to Register OAuth App.
Image description
Copy a) Company name; b) Application Name; c) Application Website; and d) Callback URL from Terraform Cloud to fill in the details in order to register OAuth App in Azure Devops.
Image description
Check the options - a) Code (read); and b) Code(status)
Image description
Screenshot continued...
Click on "Create Application".
Image description
Application created successfully!!!
Image description
Copy the "App ID" and "Client Secret". These 2 details will be required in Terraform Cloud in order to finish the Azure Devops (VCS Provider) Integration.
4. Browse back to Terraform Cloud to provide the above details to complete the setup of VCS Provider.
Image description
Click on "Connect and Continue".
It will be redirected to Azure Devops to Accept the above selected permissions.
By clicking Accept, you allow this app to perform the above actions on your behalf and you agree to Hashicorp Terms of Use and Privacy Statement.
Image description
Once Accepted, it again redirects to Terraform Cloud to complete the VCS Provider Setup.
Setup of SSH Keypair is Optional. Click on Skip and Finish.
Image description
5. The VCS Provider Setup for Azure Devops Services in Terraform Cloud is now complete.
Image description
Below is how it looks in Azure Devops:-
Image description

Hope You Enjoyed the Session!!!

Stay Safe | Keep Learning | Spread Knowledge

Top comments (0)