The gitlab_system_hook
resource allows to manage the lifecycle of a system hook.
Upstream API: GitLab REST API docs
resource "gitlab_system_hook" "example" {
url = "https://example.com/hook-%d"
token = "secret-token"
push_events = true
tag_push_events = true
merge_requests_events = true
repository_update_events = true
enable_ssl_verification = true
}
url
(String) The hook URL.enable_ssl_verification
(Boolean) Do SSL verification when triggering the hook.merge_requests_events
(Boolean) Trigger hook on merge requests events.push_events
(Boolean) When true, the hook fires on push events.repository_update_events
(Boolean) Trigger hook on repository update events.tag_push_events
(Boolean) When true, the hook fires on new tags being pushed.token
(String, Sensitive) Secret token to validate received payloads; this isn’t returned in the response. This attribute is not available for imported resources.created_at
(String) The date and time the hook was created in ISO8601 format.id
(String) The ID of this resource.Import is supported using the following syntax:
# You can import a system hook using the hook id `{hook-id}`, e.g.
terraform import gitlab_system_hook.example 42
# NOTE: the `token` attribute won't be available for imported resources.