Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for build completion trigger in azuredevops_build_definition #1192

Open
mouellet opened this issue Oct 15, 2024 · 0 comments
Open

Comments

@mouellet
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants