turbot/azuredevops

GitHub
steampipe plugin install azuredevopssteampipe plugin install azuredevops

Azure DevOps + Steampipe

Azure DevOps is a software as a service (SaaS) platform that provides DevOps practices and tools for the end-to-end software life cycle.

Steampipe is an open source CLI to instantly query cloud APIs using SQL.

List your Azure DevOps projects:

select
id,
name,
state,
visibility
from
azuredevops_project;
+--------------------------------------+-----------------+------------+------------+
| id | name | state | visibility |
+--------------------------------------+-----------------+------------+------------+
| bdcdf70b-7757-4253-b36c-33c08ca07dbb | test-1 | wellFormed | private |
| 9a1f26ce-c715-4ef4-b557-503fdb6be55a | private_project | wellFormed | private |
+--------------------------------------+-----------------+------------+------------+

Documentation

Quick start

Install

Download and install the latest Azure DevOps plugin:

steampipe plugin install azuredevops

Credentials

ItemDescription
CredentialsAzure DevOps requires an Organization URL and a Personal Access Token for all requests.
PermissionsPersonal Access Tokens have the same permissions as the user who creates them, and if the user permissions change, the Personal Access Token permissions also change.
RadiusEach connection represents a single Azure DevOps Installation.
Resolution1. Credentials explicitly set in a steampipe config file (~/.steampipe/config/azuredevops.spc)
2. Credentials specified in environment variables, e.g., AZDO_ORG_SERVICE_URL and AZDO_PERSONAL_ACCESS_TOKEN.

Configuration

Installing the latest azuredevops plugin will create a config file (~/.steampipe/config/azuredevops.spc) with a single connection named azuredevops:

Configure your account details in ~/.steampipe/config/azuredevops.spc:

connection "azuredevops" {
plugin = "azuredevops"
# `organization_url`: Azure DevOps Organization URL. (Required)
# For more information on the Organization URL, please see https://learn.microsoft.com/en-us/azure/devops/extend/develop/work-with-urls?view=azure-devops&tabs=http.
# Can also be set with the AZDO_ORG_SERVICE_URL environment variable.
# organization_url = "https://dev.azure.com/test"
# `personal_access_token`: Azure DevOps Personal Access Token. (Required)
# For more information on the Personal Access Token, please see https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows.
# Can also be set with the AZDO_PERSONAL_ACCESS_TOKEN environment variable.
# personal_access_token = "wf3hahidy7i7fkzmeqr3e6fbjwuspabpo766grp7hl4o65v2"
}

Alternatively, you can also use the standard Azure DevOps environment variables to obtain credentials only if other arguments (organization_url and personal_access_token) are not specified in the connection:

export AZDO_ORG_SERVICE_URL=https://dev.azure.com/test
export AZDO_PERSONAL_ACCESS_TOKEN=wf3hahidy7i7fkzmeqr3e6fbjwuspabpo766grp7hl4o65v2

Get involved