{"id":13505744,"url":"https://github.com/microsoft/terraform-provider-azuredevops","last_synced_at":"2025-04-13T11:38:44.768Z","repository":{"id":37470635,"uuid":"273244625","full_name":"microsoft/terraform-provider-azuredevops","owner":"microsoft","description":"Terraform Azure DevOps provider","archived":false,"fork":false,"pushed_at":"2025-04-08T08:22:07.000Z","size":44049,"stargazers_count":403,"open_issues_count":176,"forks_count":288,"subscribers_count":27,"default_branch":"main","last_synced_at":"2025-04-08T10:12:22.504Z","etag":null,"topics":["azuredevops","terraform","terraform-provider"],"latest_commit_sha":null,"homepage":"https://www.terraform.io/docs/providers/azuredevops/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":"docs/roadmap.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-18T13:22:32.000Z","updated_at":"2025-04-08T08:22:11.000Z","dependencies_parsed_at":"2024-01-15T08:44:11.686Z","dependency_job_id":"fe588433-8a25-493b-9cdf-afd02a1aa5d5","html_url":"https://github.com/microsoft/terraform-provider-azuredevops","commit_stats":{"total_commits":1969,"total_committers":154,"mean_commits":"12.785714285714286","dds":0.8151345860843068,"last_synced_commit":"ea87c3e5fb4b475a322365840b16c5220835bf5b"},"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fterraform-provider-azuredevops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fterraform-provider-azuredevops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fterraform-provider-azuredevops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fterraform-provider-azuredevops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/terraform-provider-azuredevops/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248708731,"owners_count":21149052,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azuredevops","terraform","terraform-provider"],"created_at":"2024-08-01T00:01:12.730Z","updated_at":"2025-04-13T11:38:44.716Z","avatar_url":"https://github.com/microsoft.png","language":"Go","funding_links":[],"categories":["Providers","Go"],"sub_categories":["Vendor supported providers"],"readme":"# Terraform Provider for Azure DevOps (Devops Resource Manager)\n\n[![Gitter](https://badges.gitter.im/terraform-provider-azuredevops/community.svg)](https://gitter.im/terraform-provider-azuredevops/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n[![Go Report Card](https://goreportcard.com/badge/github.com/microsoft/terraform-provider-azuredevops)](https://goreportcard.com/report/github.com/microsoft/terraform-provider-azuredevops)\n\nThe AzureRM Provider supports Terraform 0.12.x and later.\n\n* [Terraform Website](https://www.terraform.io)\n* [Azure DevOps Website](https://azure.microsoft.com/en-us/services/devops/)\n* [Provider Documentation](./website/docs/index.html.markdown)\n* [Resources Documentation](./website/docs/r/)\n* [Data Sources Documentation](./website/docs/d/)\n* [Usage Examples](./examples/)\n* [Gitter Channel](https://gitter.im/terraform-provider-azuredevops/community)\n\n## Usage Example\n\n```hcl\n# Make sure to set the following environment variables:\n#   AZDO_PERSONAL_ACCESS_TOKEN\n#   AZDO_ORG_SERVICE_URL\nterraform {\n  required_providers {\n    azuredevops = {\n      source = \"microsoft/azuredevops\"\n      version = \"\u003e=0.1.0\"\n    }\n  }\n}\n\nresource \"azuredevops_project\" \"project\" {\n  name = \"My Awesome Project\"\n  description  = \"All of my awesomee things\"\n}\n\nresource \"azuredevops_git_repository\" \"repository\" {\n  project_id = azuredevops_project.project.id\n  name       = \"My Awesome Repo\"\n  initialization {\n    init_type = \"Clean\"\n  }\n}\n\nresource \"azuredevops_build_definition\" \"build_definition\" {\n  project_id = azuredevops_project.project.id\n  name       = \"My Awesome Build Pipeline\"\n  path       = \"\\\\\"\n\n  repository {\n    repo_type   = \"TfsGit\"\n    repo_id     = azuredevops_git_repository.repository.id\n    branch_name = azuredevops_git_repository.repository.default_branch\n    yml_path    = \"azure-pipelines.yml\"\n  }\n}\n```\n\n## Developer Requirements\n\n* [Terraform](https://www.terraform.io/downloads.html) version 0.13.x +\n* [Go](https://golang.org/doc/install) version 1.16.x (to build the provider plugin)\n\nIf you're on Windows you'll also need:\n\n* [Git for Windows](https://git-scm.com/download/win)\n\nIf you what to use the `makefile` build strategy on Windows it's required to install\n\n* [Make for Windows](http://gnuwin32.sourceforge.net/packages/make.htm)\n\nFor *GNU32 Make*, make sure its bin path is added to PATH environment variable.*\n\nFor *Git Bash for Windows*, at the step of \"Adjusting your PATH environment\", please choose \"Use Git and optional Unix tools from Windows Command Prompt\".*\n\nAs [described below](#build-using-powerShell-scripts) we provide some PowerShell scripts to build the provider on Windows, without the requiremet to install any Unix based tools aside Go.\n\n## Developing the Provider\n\nIf you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.16+ is **required**). You'll also need to correctly setup a [GOPATH](http://golang.org/doc/code.html#GOPATH), as well as adding `$GOPATH/bin` to your `$PATH`.\n\n### Using the GOPATH model\n\nFirst clone the repository to: `$GOPATH/src/github.com/microsoft/terraform-provider-azuredevops`\n\n```sh\n$ mkdir -p $GOPATH/src/github.com/terraform-providers \u0026\u0026 cd \"$_\"\n$ git clone git@github.com:microsoft/terraform-provider-azuredevops.git\n$ cd terraform-provider-azuredevops\n```\n\nOnce you've cloned, run the `./scripts/build.sh` and `./scripts/local-install.sh`, as recommended [here](https://github.com/microsoft/terraform-provider-azuredevops/blob/main/docs/contributing.md#3-build--install-provider).\nThese commands will sideload the plugin for Terraform.\n\n### Using a directory separate from GOPATH\n\nThe infrastructure supports building and testing the provider outside `GOPATH` in an arbitrary directory.\nIn this scenario all required packages of the provider during build will be managed via the `pkg` in `$GOPATH`. As with the [GOPATH Model](#using-the-gopath-model), you can redefine the `GOPATH` environment variable to prevent existing packages in the current `GOPATH` directory from being changed.\n\n### Build using make\n\nOnce inside the provider directory, you can run `make tools` to install the dependent tooling required to compile the provider.\n\nAt this point you can compile the provider by running `make build`, which will build the provider and put the provider binary in the `$GOPATH/bin` directory.\n\n```sh\n$ make build\n...\n$ $GOPATH/bin/terraform-provider-azuredevops\n...\n```\n\nYou can also cross-compile if necessary:\n\n```sh\nGOOS=windows GOARCH=amd64 make build\n```\n\n#### Unit tests\n\nIn order to run the Unit Tests for the provider, you can run:\n\n```sh\n$ make test\n```\n\nWith VSCode Golang extension you can also run and debug the tests using `run test`, `debug test` `run package tests`, `run file tests` buttons.\n\n#### Acceptance tests\n\nThe majority of tests in the provider are acceptance tests - which provisions real resources in Azure Devops and Azure. To run any acceptance tests you need to set `AZDO_ORG_SERVICE_URL`, `AZDO_PERSONAL_ACCESS_TOKEN` environment variables, some test have additional environment variables required to run. You can find out the required environment variables by running the test. Most of these variables can be set to dummy values.\n\nThe several options to run the tests are:\n\n* Run the entire acceptance test suite\n\n  ```sh\n  make testacc\n  ```\n\n* Run a subset using a prefix\n\n  ```sh\n  make testacc TESTARGS='-run=TestAccBuildDefinitionBitbucket_Create' TESTTAGS='resource_build_definition'\n  ```\n\n* With VSCode Golang extension you can also run the tests using `run test`, `run package tests`, `run file tests` buttons above the test\n\n### Scaffolding the Website Documentation\n\nYou can scaffold the documentation for a Data Source by running:\n\n```sh\n$ make scaffold-website BRAND_NAME=\"Agent Pool\" RESOURCE_NAME=\"azuredevops_agent_pool\" RESOURCE_TYPE=\"data\"\n```\n\nYou can scaffold the documentation for a Resource by running:\n\n```sh\n$ make scaffold-website BRAND_NAME=\"Agent Pool\" RESOURCE_NAME=\"azuredevops_agent_pool\" RESOURCE_TYPE=\"resource\" RESOURCE_ID=\"00000000-0000-0000-0000-000000000000\"\n```\n\n\u003e\n\u003e `BRAND_NAME` is the human readable name of the object that is handled by a\n\u003e Terraform resource or datasource, like `Agent Pool`, `User Entitlement` or `Kubernetes Service Endpoint`\n\u003e\n\n### Build using PowerShell scripts\n\nIf you like to develop on Windows, we provide a set of PowerShell scripts to build and test the provider.\nThey don't offer the luxury of a Makefile environment but are quite sufficient to develop on Windows.\n\n#### `scripts\\build.ps1`\n\nThe `build.ps1`is used to build the provider. Aside this the script runs (if not skipped) the defined unit tests and is able to install the compiled provider locally.\n\n| Parameter   | Description                                                                               |\n| ----------- | ----------------------------------------------------------------------------------------- |\n| -SkipTests  | Skip running unit tests during build                                                      |\n| -Install    | Install the provider locally, after a successful build                                    |\n| -DebugBuild | Build the provider with extra debugging information                                       |\n| -GoMod      | Control the `-mod` build parameter: Valid values: '' (Empty string), 'vendor', 'readonly' |\n\n#### `scripts\\unittest.ps1`\n\nThe script is used to execute unit tests. The script is also executed by `build.ps1` if the `-SkipTest` are not specified.\n\n| Parameter   | Description                                                                                                                       |\n| ----------- | --------------------------------------------------------------------------------------------------------------------------------- |\n| -TestFilter | A GO regular expression which filters the test functions to be executed                                                           |\n| -Tag        | Tests in the provider project are organized with GO build tags. The parameter accepts a list of tag names which should be tested. |\n| -GoMod      | Control the `-mod` build parameter: Valid values: '' (Empty string), 'vendor', 'readonly'                                         |\n\n#### `scripts\\acctest.ps1`\n\nThe script is used to execute unit tests.\n\n| Parameter   | Description                                                                                                                       |\n| ----------- | --------------------------------------------------------------------------------------------------------------------------------- |\n| -TestFilter | A GO regular expression which filters the test functions to be executed                                                           |\n| -Tag        | Tests in the provider project are organized with GO build tags. The parameter accepts a list of tag names which should be tested. |\n| -GoMod      | Control the `-mod` build parameter: Valid values: '' (Empty string), 'vendor', 'readonly'                                         |\n\n#### `scripts\\gofmtcheck.ps1`\n\nTo validate if all `.go` files adhere to the required formatting rules, execute `gofmtcheck.ps1`\n\n| Parameter | Description                                                                                                    |\n| --------- | -------------------------------------------------------------------------------------------------------------- |\n| -Fix      | Fix any formatting rule deviations automatically. If the parameter is not set, the script runs in report mode. |\n\n#### `scripts\\lint-check-go.ps1`\n\nLike with `gofmtcheck.ps1` the script validate if all `.go` files adhere to the required formatting rules and if any style mistakes exist. In difference to `gofmtcheck.ps1` the script uses Golint instead of Gofmt.\n\n## Environment variables for acceptance tests\n\nThe following Environment Variables must be set in your shell prior to running acceptance tests:\n\n- `AZDO_ORG_SERVICE_URL`\n- `AZDO_PERSONAL_ACCESS_TOKEN`\n- `AZDO_DOCKERREGISTRY_SERVICE_CONNECTION_EMAIL`\n- `AZDO_DOCKERREGISTRY_SERVICE_CONNECTION_PASSWORD`\n- `AZDO_DOCKERREGISTRY_SERVICE_CONNECTION_USERNAME`\n- `AZDO_GITHUB_SERVICE_CONNECTION_PAT`\n- `AZDO_TEST_AAD_USER_EMAIL`\n- `AZDO_TEST_AAD_GROUP_ID`\n- `AZDO_TEST_AAD_SERVICE_PRINCIPAL_OBJECT_ID`\n\n**Note:** Acceptance tests create real resources in Azure DevOps which often cost money to run.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fterraform-provider-azuredevops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2Fterraform-provider-azuredevops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fterraform-provider-azuredevops/lists"}