terraform-provider-azuredevops
terraform-provider-azuredevops copied to clipboard
Add support for build completion trigger in `azuredevops_build_definition`
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
The azuredevops_build_definition
resource has support for CI and Pull Request triggers, but not for Build Completion. This can be defined using pipeline resources in YAML, but that doesn't support templating or in YAML template...
New or Affected Resource(s)
- azuredevops_build_definition
Potential Terraform Configuration
data "azuredevops_project" "example" {
name = "Example Project"
}
data "azuredevops_build_definition" "other" {
project_id = data.azuredevops_project.example.id
name = "other"
}
resource "azuredevops_build_definition" "example" {
project_id = azuredevops_project.example.id
name = "Example Build Definition"
path = "\\ExampleFolder"
build_completion_trigger {
branch_filter {
include = ["main"]
exclude = ["test", "regression"]
}
build_definition_id = data.azuredevops_build_definition.other.id
requires_successful_build = true
}
...
}
References
- v7 Azure DevOps Go API reference: https://github.com/microsoft/azure-devops-go-api/blob/dev/azuredevops/v7/build/models.go#L291