|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "gitlab_group_hook Resource - terraform-provider-gitlab" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + The gitlab_group_hook resource allows to manage the lifecycle of a group hook. |
| 7 | + Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/groups.html#hooks |
| 8 | +--- |
| 9 | + |
| 10 | +# gitlab_group_hook (Resource) |
| 11 | + |
| 12 | +The `gitlab_group_hook` resource allows to manage the lifecycle of a group hook. |
| 13 | + |
| 14 | +**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#hooks) |
| 15 | + |
| 16 | +## Example Usage |
| 17 | + |
| 18 | +```terraform |
| 19 | +resource "gitlab_group_hook" "example" { |
| 20 | + group = "example/hooked" |
| 21 | + url = "https://example.com/hook/example" |
| 22 | + merge_requests_events = true |
| 23 | +} |
| 24 | +
|
| 25 | +# Setting all attributes |
| 26 | +resource "gitlab_group_hook" "all_attributes" { |
| 27 | + group = 1 |
| 28 | + url = "http://example.com" |
| 29 | + token = "supersecret" |
| 30 | + enable_ssl_verification = false |
| 31 | + push_events = true |
| 32 | + push_events_branch_filter = "devel" |
| 33 | + issues_events = false |
| 34 | + confidential_issues_events = false |
| 35 | + merge_requests_events = true |
| 36 | + tag_push_events = true |
| 37 | + note_events = true |
| 38 | + confidential_note_events = true |
| 39 | + job_events = true |
| 40 | + pipeline_events = true |
| 41 | + wiki_page_events = true |
| 42 | + deployment_events = true |
| 43 | + releases_events = true |
| 44 | + subgroup_events = true |
| 45 | +} |
| 46 | +``` |
| 47 | + |
| 48 | +<!-- schema generated by tfplugindocs --> |
| 49 | +## Schema |
| 50 | + |
| 51 | +### Required |
| 52 | + |
| 53 | +- `group` (String) The ID or full path of the group. |
| 54 | +- `url` (String) The url of the hook to invoke. |
| 55 | + |
| 56 | +### Optional |
| 57 | + |
| 58 | +- `confidential_issues_events` (Boolean) Invoke the hook for confidential issues events. |
| 59 | +- `confidential_note_events` (Boolean) Invoke the hook for confidential notes events. |
| 60 | +- `deployment_events` (Boolean) Invoke the hook for deployment events. |
| 61 | +- `enable_ssl_verification` (Boolean) Enable ssl verification when invoking the hook. |
| 62 | +- `issues_events` (Boolean) Invoke the hook for issues events. |
| 63 | +- `job_events` (Boolean) Invoke the hook for job events. |
| 64 | +- `merge_requests_events` (Boolean) Invoke the hook for merge requests. |
| 65 | +- `note_events` (Boolean) Invoke the hook for notes events. |
| 66 | +- `pipeline_events` (Boolean) Invoke the hook for pipeline events. |
| 67 | +- `push_events` (Boolean) Invoke the hook for push events. |
| 68 | +- `push_events_branch_filter` (String) Invoke the hook for push events on matching branches only. |
| 69 | +- `releases_events` (Boolean) Invoke the hook for releases events. |
| 70 | +- `subgroup_events` (Boolean) Invoke the hook for subgroup events. |
| 71 | +- `tag_push_events` (Boolean) Invoke the hook for tag push events. |
| 72 | +- `token` (String, Sensitive) A token to present when invoking the hook. The token is not available for imported resources. |
| 73 | +- `wiki_page_events` (Boolean) Invoke the hook for wiki page events. |
| 74 | + |
| 75 | +### Read-Only |
| 76 | + |
| 77 | +- `group_id` (Number) The id of the group for the hook. |
| 78 | +- `hook_id` (Number) The id of the group hook. |
| 79 | +- `id` (String) The ID of this resource. |
| 80 | + |
| 81 | +## Import |
| 82 | + |
| 83 | +Import is supported using the following syntax: |
| 84 | + |
| 85 | +```shell |
| 86 | +# A GitLab Group Hook can be imported using a key composed of `<group-id>:<hook-id>`, e.g. |
| 87 | +terraform import gitlab_group_hook.example "12345:1" |
| 88 | + |
| 89 | +# NOTE: the `token` resource attribute is not available for imported resources as this information cannot be read from the GitLab API. |
| 90 | +``` |
0 commit comments