Use Terraform for Azure DevOps to collect evidence from your Azure DevOps organization, including repository configurations, pipeline definitions, user access, project settings, and team memberships.
With our Terraform for Azure DevOps integration, you can collect evidence of your development environment controls directly from Azure DevOps. Terraform integrations are a flexible, low-code solution that allow you to customize what evidence is collected from your cloud systems. Read more about our Terraform integrations.
Important note: You do not need to use Terraform in your existing tech stack in order to use Terraform for Azure DevOps to collect evidence.
Types of evidence you might collect with Terraform for Azure DevOps
There are many different types of evidence that you can collect from Azure DevOps. The flexibility of this integration is limited only by what is available from Terraform in terms of data sources supported by the Azure DevOps provider.
Here is a short, non-exhaustive list of some of the possible evidence you may collect from this integration:
Repository configurations and branch policies
Pipeline definitions and authorization settings
User access lists, group memberships, and team configurations
Project settings and environment configurations
Service connection definitions
Follow the instructions on this page to get started collecting evidence from Azure DevOps using Terraform.
Configuring Terraform for Azure DevOps
This integration authenticates using a Microsoft Entra service principal. To configure it, you (or someone in your organization) will need sufficient Azure and Azure DevOps permissions to create an app registration and grant it access to your Azure DevOps organization.
Prerequisites
An Azure DevOps organization
A Microsoft Entra tenant with permissions to create app registrations
Ability to grant admin consent for API permissions
Step 1: Create an App Registration in Microsoft Entra
Navigate to the Azure Portal and go to Microsoft Entra ID, then select App registrations and click New registration:
Provide a meaningful name (e.g., "Strike Graph Terraform Integration")
Select Accounts in this organizational directory only for supported account types
Leave the Redirect URI blank
Click Register
Note the Application (client) ID and Directory (tenant) ID — you'll need both when configuring the integration in Strike Graph.
Step 2: Create a Client Secret
In your newly created app registration:
Go to Certificates & secrets under the Manage section
Click New client secret
Provide a description and set an appropriate expiration period
Copy the client secret Value immediately — you will not be able to see it again
Step 3: Grant Access to Azure DevOps
The app registration needs to be authorized against your Azure DevOps organization. Navigate to your Azure DevOps organization and go to Organization Settings → Users:
Add the service principal as a user with at least Basic access level
Assign it to the projects relevant to the evidence you plan to collect
Note: The service principal needs sufficient read permissions within Azure DevOps for the data sources you intend to use. For most evidence collection, read-only project access is sufficient.
Step 4: Configure the Integration in Strike Graph
Navigate to the Integration Manager in Strike Graph and open the Terraform - Azure DevOps integration.
Note: If you do not see this integration listed, it may not be available for your organization or role yet — reach out to support or your Customer Success Manager to request access.
Click + Connect to begin configuring a new integration
Enter the following information:
Display Name: A meaningful label to identify this integration from others you may configure
Organization URL: Your Azure DevOps organization URL (e.g.,
https://dev.azure.com/your-org)Microsoft Entra Tenant ID: Your Directory (tenant) ID, copied from Microsoft Entra
Application (client) ID: Copied from Microsoft Entra
Client secret: The client secret value you created in Step 2, copied from Microsoft Entra
Click Save
You can create multiple Azure DevOps connections as needed to manage different organizations or permission scopes. Everyone with access to your Strike Graph organization will be able to use any configured connections during evidence collection.
Using Terraform for Azure DevOps to collect evidence
Once you have configured a Terraform for Azure DevOps integration, you can begin using it to collect evidence of your Azure DevOps resources.
Start by navigating in Strike Graph to the item that you want to collect evidence for. You can choose to attach evidence directly for one-time evidence collection, or configure automated collection (recommended).
Click on either Attach Directly or Automated Collection, and then select the desired Terraform for Azure DevOps integration from the list of available integrations. If you have configured multiple connections, make sure you select the one with the right permissions for the evidence you plan to collect.
Define the data to collect
Terraform integrations allow you to use a few lines of code to define what data you would like to collect as evidence. These are called "data blocks" and more information about data blocks and local values can be found on the Terraform overview page.
With Terraform for Azure DevOps, you can collect evidence of development environment controls from supported data sources. A list of supported data sources is at the bottom of this page, as well as on the Terraform Azure DevOps provider page.
Step 1: Define the data block. Data blocks are extensible, but follow a typical pattern:
data_source: Defines which Azure DevOps data source to read from. Terraform for Azure DevOps supports data collection from any resource with a supported data source from Terraform's Azure DevOps provider (see below for a list).
temp_name: A temporary name you define, used to refer to this data block during execution. It only has labeling significance within the scope of this configuration. It is also used in the output's filename, so name it something recognizable. Names can be repeated across configurations, are limited to alphanumeric characters, and do not allow spaces.
query constraints / arguments: Many data sources require specific arguments (like a project ID or repository name), or provide methods for constraining the data based on specific queries. These are written as key/value pairs. Refer to the specific data source requirements in the Terraform Azure DevOps provider documentation.
Step 2: Define the local values used for the execution. This follows a typical pattern derived from the data block: data.data_source.temp_name (sometimes followed by a key if a filter argument is desirable).
Run the data collection
After you have defined the data block and local values, click Attach to execute the data collection. This may take a few minutes as we set up the data pipeline to collect the attachment.
Once the collection is finished, the attachment modal will close and you can see the collected data has been added to the evidence. You can confirm what was collected by clicking on the attachment to view the data.
Using Terraform for Azure DevOps with Automated Collection
It is highly recommended that you configure your evidence collection with automated collection. With Automated Collection, Strike Graph can recollect evidence attachments from Azure DevOps a few days before expiration so that your evidence remains in an effective audit-ready state.
To configure your evidence with Automated Collection, follow the steps above after clicking on the Automated Collection button found on the evidence item detail pages. Additional information about Automated Collection is available here.
Removing your Terraform for Azure DevOps integration
You can remove the integration at any time. Please note that removing an integration does not delete any files that were attached using that integration. Removing an integration will also disrupt automated collection.
To remove:
Go to the Integrations Manager and click on the Terraform for Azure DevOps card to access the integration configurations
Click the Deactivate button next to your configuration
Note: You may have access to remove integrations for other users on your team.
If you are fully removing access between Strike Graph and your Azure DevOps organization, you may also wish to:
Revoke the Personal Access Token from your Azure DevOps user settings
Remove the service principal from your Azure DevOps organization (if applicable)
Review and remove any project-level permissions granted during setup
Before making these changes, verify that you are not using the same credentials for other purposes.
Troubleshooting
For additional Terraform integration troubleshooting tips, click here.
Terraform integrations will return an error if we were unable to execute the collection request. The errors returned will differ depending on which step of the collection failed.
Authentication Errors
"Failed to acquire access token for Azure DevOps"
This error indicates that Strike Graph could not authenticate using the credentials provided. Check the following:
Verify that your tenant ID, client ID, and client secret are all correct
Check that the client secret has not expired — if it has, use the Reconnect button next to your integration to provide an updated secret
Ensure the app registration exists and has not been deleted in Microsoft Entra
"Azure DevOps credential validation failed"
This error means authentication succeeded but the subsequent call to your Azure DevOps organization was rejected. Check the following:
Verify that the organization URL is correct and uses HTTPS (e.g.,
https://dev.azure.com/your-org)Ensure the service principal has been added as a user in your Azure DevOps organization
Check that the service principal has sufficient access to the projects you are trying to collect evidence from
General Configuration Errors
Invalid data source errors:
Check that the resource you defined in
data_sourceis available from the Azure DevOps Terraform providerEnsure that you have included any required query constraints/arguments
Refer to the Azure DevOps provider documentation for specific requirements
Formatting errors:
Check that your
temp_nameis formatted correctly (no spaces, only alphanumeric characters)Verify there are no unexpected characters or formatting issues in the data block or local values
Confirm that the local values reference the correct
data_sourceandtemp_name
Duplicate integration errors:
Each integration must have a unique display name within your organization
If you receive an error about duplicate credentials, an existing integration is already using the same service principal — reuse that integration or create a new app registration with different credentials
