Resource

dcloud_git_webhook

A repository webhook: events are POSTed to url, signed with secret when one is set (X-EWS-Signature).

Example Usage

variable "webhook_secret" {
  type      = string
  sensitive = true
}

resource "dcloud_git_webhook" "ci" {
  repository_id = dcloud_git_repository.api.id
  url           = "https://ci.acme.example/hooks/ews"
  events        = ["push", "merge_queue"]
  secret        = var.webhook_secret
}

Schema

Required

  • events (Set of String) push, pull_request, tag, merge_queue.
  • repository_id (String) The id of the parent resource ({repoId} in the path). Changing it replaces the resource.
  • url (String) The public URL each delivery is POSTed to

Optional

  • is_active (Boolean) false pauses deliveries without deleting the hook; true when created without it
  • secret (String, Sensitive) Signs each delivery (HMAC-SHA256). Never returned by the API: not read back, and empty after an import.

Read-Only

  • has_secret (Boolean) Whether deliveries are signed.
  • id (String) The resource's id.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# The secret is never read back: set it in the configuration after an import.
terraform import dcloud_git_webhook.ci <repository-id>/<webhook-id>

Generated from the provider's schema.