Terraform-provider-azuredevops: Add support for service hooks

Created on 13 Oct 2020  路  2Comments  路  Source: microsoft/terraform-provider-azuredevops

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


new-resource

Most helpful comment

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).

All 2 comments

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).

Was this page helpful?
0 / 5 - 0 ratings