terraform-provider-azuredevops icon indicating copy to clipboard operation
terraform-provider-azuredevops copied to clipboard

Add support for service hooks

Open richardgavel opened this issue 4 years ago • 4 comments

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

Add support to maintain service hooks (specifically webhooks)

New or Affected Resource(s)

  • azuredevops_webhook

Potential Terraform Configuration

richardgavel avatar Oct 13 '20 16:10 richardgavel

REST API

xuzhang3 avatar Oct 14 '20 08:10 xuzhang3

I can see why this hasn't been done yet. All the various kinds of triggers each require a potentially different block (buildCompleted vs codePushed vs etc). I'm starting to put it together myself, using serviceendpoint as a model

azuredevops_servicehook_webhook XXX
{
  trigger = "codePushed"

  codePushedTrigger = {
    repository = XXX
    branchName = XXX
    pushedBy = XXX
  }

  action = "HttpPost"

  httpPost ={
    url = ""
    etc..
  }
}

The trigger and the potential trigger block settings would be in the base, the other properties unique to the action would be in the each of the resource_servicehook_XXX resources (webhook vs slack vs etc, though I am only going to try and do webhook).

richardgavel avatar Jan 12 '21 21:01 richardgavel

Did you get anywhere with it, @richardgavel ?

jamiejackson avatar May 13 '24 18:05 jamiejackson

https://github.com/microsoft/azure-devops-go-api/blob/dev/azuredevops/servicehooks/client.go

fernandosalomao avatar Jun 18 '24 23:06 fernandosalomao

Supported resource: azuredevops_servicehook_storage_queue_pipelines

xuzhang3 avatar Jan 02 '25 07:01 xuzhang3