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 managing Status Check policies #352

Closed
ajhall opened this issue Apr 5, 2021 · 1 comment
Closed

Add support for managing Status Check policies #352

ajhall opened this issue Apr 5, 2021 · 1 comment

Comments

@ajhall
Copy link

ajhall commented Apr 5, 2021

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

I'd like to use Terraform to manage branch policies that require a status posted via the PR Status API, as documented here: https://docs.microsoft.com/en-us/azure/devops/repos/git/pr-status-policy?view=azure-devops

New or Affected Resource(s)

  • azuredevops_branch_policy_status (new)

Potential Terraform Configuration

resource "azuredevops_branch_policy_status" "p" {
  project_id = azuredevops_project.p.id

  enabled  = true
  blocking = true

  settings {
    status_name                 = "my-status"
    status_genre                = "my-genre"
    default_display_name        = "My status check policy"
    author_id                   = null
    invalidate_on_source_update = true
    policy_applicability        = null
    author_id                   = null

    scope {
      repository_id  = azuredevops_git_repository.r.id
      repository_ref = azuredevops_git_repository.r.default_branch
      match_type     = "Exact"
    }
  }
}

References

@xuzhang3
Copy link
Collaborator

xuzhang3 commented Jul 20, 2021

Released in v0.1.5, close this issue. Feel free to open another issue if you have questions.

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