mirror of
https://github.com/ysoftdevs/terraform-provider-bitbucketserver.git
synced 2026-01-16 08:37:19 +01:00
* Fix update repository webhooks and extend webhook tests * Use secret to authenticate the webhook payload and extend the tests with the secret Co-authored-by: Raul Barreto <raul.barreto@redbull.com>
1.4 KiB
1.4 KiB
Resource: bitbucketserver_repository_webhook
Manage a repository level webhook. Extends what Bitbucket does every time a repository changes, for example when code is pushed or a pull request is merged.
Example Usage
resource "bitbucketserver_project" "main" {
key = "MYPROJ"
name = "my-project"
}
resource "bitbucketserver_repository" "main" {
project = bitbucketserver_project.test.key
name = "repo"
}
resource "bitbucketserver_repository_webhook" "main" {
project = bitbucketserver_project.test.key
repository = bitbucketserver_repository.test.slug
name = "google"
webhook_url = "https://www.google.com/"
secret = "abc"
events = ["repo:refs_changed"]
active = true
}
Argument Reference
project- Required. Project Key the repository is contained within.repository- Required. Repository slug to enable hook for.name- Required. Name of the webhook.webhook_url- Required. The URL of the webhook.secret- Optional. Secret used to authenticate the payload.events- Required. A list of events to trigger the webhook url.active- Optional. Enable or disable the webhook. Default: true
Attribute Reference
webhook_id- The webhook id.
Import
Import a user reference using the project key, repository name and webhook name.
terraform import bitbucketserver_repository_webhook.main MYPROJ/repo/google