Problem
After setting up the Azure DevOps Services VCS integration, workspace creation and private registry module publication fails to complete. This will manifest in the following symptoms:
- New workspace's remain stuck in "Checking for configuration" status.
- Newly published private registry modules display "The module "<MODULE_NAME>" for provider "<PROVIDER>" failed to setup. Please verify that the module follows the correct structure."
- Changes to the VCS repositories in Azure DevOps Server do not reflect in existing workspaces or private registry modules.
In Terraform Enterprise, Sidekiq will log a Clone url can't be blank
error when attempting to retrieve the clone URL from the Azure DevOps Server API.
- Workspace creation:
2023-08-17T16:53:50.504352000Z 2023-08-17T16:53:50.503Z pid=1 tid=2kvx WARN: ActiveRecord::RecordInvalid: Validation failed: Clone url can't be blank
- Private registry module publication:
2023-08-17T16:26:30.548098000Z 2023-08-17 16:26:30 [ERROR] msg=Failed performing initial module version ingress registry_module=3 exception=Validation failed: Clone url can't be blank
Cause
The Azure DevOps integration requires SSH be enabled. As part of the ingress process, TFC/E will make make an API request to the Repositories - Get API and extract the sshUrl
to utilize as the clone URL for the ingress job. If the SSH server is not enabled, this attribute will not be present in the API response and will result in the validation error above.
Solution
The Azure DevOps SSH server will need to be enabled. To do this, navigate to the Azure DevOps Server Administration Console and enable SSH under Application Tier.
Once complete, complete steps 4-5 of the setup documentation to create an SSH key pair, add the private SSH key to the VCS connection in TFC/E, and add its corresponding public key to Azure DevOps Server.
Additional information
If you continue to experience issues, please contact HashiCorp Support.