A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.hashicorp.com/terraform/enterprise/vcs/azure-devops-server below:

Set up the Azure DevOps Server VCS provider | Terraform

These instructions describe how to connect to on-premise installations of Azure DevOps Server so that you can use HCP Terraform's VCS features. For instructions on how to set up Azure DevOps Services using OAuth, refer to Set up the Azure DevOps Services VCS provider using OAuth. For information about other supported VCS providers, refer to Connect to VCS Providers.

You must have permission to manage VCS settings for the organization to configure a new VCS provider. Refer to Permission model for additional information about permissions.

Personal access token maintenance

HCP Terraform uses personal access tokens to connect to Azure DevOps Server. This access method requires some additional configuration and ongoing maintenance:

  1. Sign in to HCP Terraform or Terraform Enterprise and navigate to the organization where you want to add the VCS provider.

  2. Choose Settings from the sidebar, then click Providers.

  3. Click Add VCS Provider. The VCS Providers page appears.

  4. Select Azure DevOps and then select Azure DevOps Server from the menu. The page moves to the next step.

  5. On the "Set up provider" step there are three textboxes. Enter an optional Name for this VCS connection. Enter the instance URL for your Azure DevOps Server in HTTP URL and API URL textboxes. Click the "Continue" button to continue to the next step.

Leave the page open in a browser tab. In the next step you will copy values from this page, and in later steps you will continue configuring HCP Terraform.

  1. In a new browser tab, open your Azure DevOps Server instance and log in as whichever account you want HCP Terraform to act as. For most organizations this should be a dedicated service user, but a personal account will also work.

    Important: The account you use for connecting HCP Terraform must have Project Collection Administrator access to any projects containing repositories of Terraform configurations, since creating webhooks requires these permissions. It is not possible to create custom access roles with lower levels of privilege, as Microsoft does not currently allow delegation of this capability.

  2. Navigate to User settings -> Security -> Personal access tokens.

  3. Click the New Token button to generate a new personal access token with "Code (Read)" and "Code (Status)" scopes. (We recommend also granting access to "All accessible organizations.")

  4. Copy the generated token to your clipboard; you'll paste it in the next step. Leave this page open in a browser tab.

  1. On the "Configure settings" step there is one textbox. Enter your Azure DevOps Server Personal Access Token from Step 2. Click the "Continue" button to continue to the next step.

This step is optional. You can configure which workspaces can use repositories from this VCS provider. By default the All Projects option is selected, meaning this VCS provider is available to be used by all workspaces in the organization.

To limit the scope of this VCS Provider:

  1. 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.

  2. Click the Update VCS Provider button to save your selections.

On a secure workstation, create an SSH keypair that HCP Terraform can use to connect to Azure DevOps Server. The exact command depends on your OS, but is usually something like ssh-keygen -t rsa -m PEM -f "/Users/<NAME>/.ssh/service_terraform" -C "service_terraform_enterprise". This creates a service_terraform file with the private key, and a service_terraform.pub file with the public key.

This SSH key must have an empty passphrase. HCP Terraform cannot use SSH keys that require a passphrase.

Important Notes
  1. Navigate to User settings -> Security -> SSH public keys on your Azure DevOps Server instance.

  2. Click the Add button. Paste the text of the SSH public key you created in step 3 (from the .pub file) into the text field, then click the Add key button to confirm.

  1. Go back to your HCP Terraform browser tab and paste the text of the SSH private key you created in step 3 into the Private SSH Key text field of the "Set up SSH keypair" step. Click the "Add SSH key" button.

At this point, Azure DevOps Server access for HCP Terraform is fully configured, and you can create Terraform workspaces based on your organization's repositories.


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