These instructions describe how to connect to dev.azure.com
for VCS integration. Refer to the VCS overview for information about other systems.
Complete the following steps to connect to Azure DevOps Services VCS:
Only Azure DevOps connections that use the dev.azure.com
domain are supported. If your Azure DevOps project uses the older visualstudio.com
domain, you must migrate using the steps in the Microsoft documentation.
Configuring a new VCS provider requires permission to manage VCS settings for the organization.
Log in to Azure DevOps Services.
Click Organization settings.
Click Policies under Security.
Enable the Third-party application access via OAuth setting.
Complete the following steps in HCP Terraform or Terraform Enterprise:
Sign in to HCP Terraform or Terraform Enterprise and navigate to the organization where you want to add the VCS provider.
Choose Settings from the sidebar, then click Providers.
Click Add VCS Provider. The VCS Providers page appears.
Select Azure DevOps and then select Azure DevOps Services from the menu. The page moves to the next step.
Leave this page open in a browser tab. You will copy values from this page into Azure DevOps in the next step, and in later steps you will continue configuring HCP Terraform.
Complete the following steps in your Microsoft Entra admin center:
In a new browser tab, login to your Microsoft Entra admin center
Open the Applications drop-down menu, then click App registrations. If you have access to multiple Entra tenants, switch to the tenant in which you want to register the application.
Complete the following fields and enable the following options with the corresponding values currently displayed in your HCP Terraform or Terraform Enterprise browser tab:
Field name Value Application Name HCP Terraform (<YOUR ORGANIZATION NAME>
) Redirect URI Choose Web from the drop-down and enter https://app.terraform.io/<YOUR CALLBACK URL>
in the text boxClick Register to create the app.
Once the app is registered, click API permissions under the Manage section from the application overview.
Click Azure DevOps, then add vso.code and vso.code_status permissions.
Click Certificates and secrets, then click the Client secrets tab.
Click New client secret and complete the instructions when prompted to create a client secret.
Click Overview and leave this page open in a browser tab. In the next step, you will copy and paste the unique Application (client) ID, Directory (tenant) ID and Client Secret from this page.
Complete the follwoing actions in HCP Terraform or Terraform Enterprise:
If you receive a 404 error from Azure DevOps Services, verify that your callback URL is configured correctly.
The following HCP Terraform and Terraform Enterprise settings are optional.
If you don't need to configure the advanced settings, click Skip and Finish. HCP Terraform or Terraform Enterprise directs you to the VCS provider page, which now includes your new Azure DevOps Services client.
Limit the scope of the VCS providerComplete the following steps if you need to Limit the scope of this VCS provider:
Select the Selected Projects option and use the text field that appears to search for and select projects to enable. All current and future workspaces for any selected projects can use repositories from this VCS Provider.
Click the Update VCS Provider button to save your selections.
HCP Terraform and Terraform Entperprise only use SSH keypairs to clone Git submodules.All other Git operations use HTTPS.
Do not use your personal SSH key to connect Azure DevOps Services. Generate a new keypair or use an existing key reserved for service access.
The following steps require you to provide HCP Terraform or Terraform Enterpise with a private key. Terraform does not display the text of the key after you enter it, but it retains the text and uses it when authenticating to Azure DevOps Services.
Protect this private key carefully. Someone can use it to push code to the repositories you use to manage your infrastructure. Take note of your organization's policies for protecting important credentials and be sure to follow them.
On a secure workstation, create an SSH keypair that HCP Terraform or Terraform Enterrpise can use to connect to Azure DevOps Services. Refer to your operating system documentation for details. The following example uses the ssh-keygen
command to create a service_terraform
file with the private key, and a service_terraform.pub
file with the public key:
ssh-keygen -t rsa -m PEM -f "/Users/<NAME>/.ssh/service_terraform" -C "service_terraform_enterprise"
This SSH key must have an empty passphrase. HCP Terraform cannot use SSH keys that require a passphrase.
Log into the Azure DevOps Services account you want HCP Terraform to act as.
Navigate to the SSH Keys settings page.
Add a new SSH key and paste the value of the SSH public key you created in step 1.
In HCP Terraform, open the Add VCS Provider page.
Provide the text of the SSH private key you created in step 1, then click Add SSH Key.
Ensure that the Azure DevOps organization you intend to link with HCP Terraform is connected to the correct Microsoft Entra app created in Step 2 by following these instructions.
After configuring Azure DevOps Services access for HCP Terraform, can create Terraform workspaces based on your organization's repositories.
Migrate existing workspaces to connect to ADO Organization with the new MS Entra AppIf you need to migrate existing workspaces to connect to ADO organization, go to the HCP Terraform workspaces associated with the Azure DevOps organization via legacy OAuth application, and update the VCS settings to use the new VCS provider created in Step 3.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4