Skip to content

Latest commit

 

History

History
90 lines (73 loc) · 3.33 KB

group_hook.md

File metadata and controls

90 lines (73 loc) · 3.33 KB
page_title subcategory description
gitlab_group_hook Resource - terraform-provider-gitlab
The gitlab_group_hook resource allows to manage the lifecycle of a group hook. Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/groups.html#hooks

gitlab_group_hook (Resource)

The gitlab_group_hook resource allows to manage the lifecycle of a group hook.

Upstream API: GitLab REST API docs

Example Usage

resource "gitlab_group_hook" "example" {
  group                 = "example/hooked"
  url                   = "https://example.com/hook/example"
  merge_requests_events = true
}

# Setting all attributes
resource "gitlab_group_hook" "all_attributes" {
  group                      = 1
  url                        = "http://example.com"
  token                      = "supersecret"
  enable_ssl_verification    = false
  push_events                = true
  push_events_branch_filter  = "devel"
  issues_events              = false
  confidential_issues_events = false
  merge_requests_events      = true
  tag_push_events            = true
  note_events                = true
  confidential_note_events   = true
  job_events                 = true
  pipeline_events            = true
  wiki_page_events           = true
  deployment_events          = true
  releases_events            = true
  subgroup_events            = true
}

Schema

Required

  • group (String) The ID or full path of the group.
  • url (String) The url of the hook to invoke.

Optional

  • confidential_issues_events (Boolean) Invoke the hook for confidential issues events.
  • confidential_note_events (Boolean) Invoke the hook for confidential notes events.
  • deployment_events (Boolean) Invoke the hook for deployment events.
  • enable_ssl_verification (Boolean) Enable ssl verification when invoking the hook.
  • issues_events (Boolean) Invoke the hook for issues events.
  • job_events (Boolean) Invoke the hook for job events.
  • merge_requests_events (Boolean) Invoke the hook for merge requests.
  • note_events (Boolean) Invoke the hook for notes events.
  • pipeline_events (Boolean) Invoke the hook for pipeline events.
  • push_events (Boolean) Invoke the hook for push events.
  • push_events_branch_filter (String) Invoke the hook for push events on matching branches only.
  • releases_events (Boolean) Invoke the hook for releases events.
  • subgroup_events (Boolean) Invoke the hook for subgroup events.
  • tag_push_events (Boolean) Invoke the hook for tag push events.
  • token (String, Sensitive) A token to present when invoking the hook. The token is not available for imported resources.
  • wiki_page_events (Boolean) Invoke the hook for wiki page events.

Read-Only

  • group_id (Number) The id of the group for the hook.
  • hook_id (Number) The id of the group hook.
  • id (String) The ID of this resource.

Import

Import is supported using the following syntax:

# A GitLab Group Hook can be imported using a key composed of `<group-id>:<hook-id>`, e.g.
terraform import gitlab_group_hook.example "12345:1"

# NOTE: the `token` resource attribute is not available for imported resources as this information cannot be read from the GitLab API.