GroupHook

class GroupHook : KotlinCustomResource

The gitlab.GroupHook resource allows to manage the lifecycle of a group hook. Upstream API: GitLab REST API docs

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const example = new gitlab.GroupHook("example", {
group: "example/hooked",
mergeRequestsEvents: true,
url: "https://example.com/hook/example",
});
// Setting all attributes
const allAttributes = new gitlab.GroupHook("allAttributes", {
confidentialIssuesEvents: false,
confidentialNoteEvents: true,
deploymentEvents: true,
enableSslVerification: false,
group: "1",
issuesEvents: false,
jobEvents: true,
mergeRequestsEvents: true,
noteEvents: true,
pipelineEvents: true,
pushEvents: true,
pushEventsBranchFilter: "devel",
releasesEvents: true,
subgroupEvents: true,
tagPushEvents: true,
token: "supersecret",
url: "http://example.com",
wikiPageEvents: true,
});
import pulumi
import pulumi_gitlab as gitlab
example = gitlab.GroupHook("example",
group="example/hooked",
merge_requests_events=True,
url="https://example.com/hook/example")
# Setting all attributes
all_attributes = gitlab.GroupHook("allAttributes",
confidential_issues_events=False,
confidential_note_events=True,
deployment_events=True,
enable_ssl_verification=False,
group="1",
issues_events=False,
job_events=True,
merge_requests_events=True,
note_events=True,
pipeline_events=True,
push_events=True,
push_events_branch_filter="devel",
releases_events=True,
subgroup_events=True,
tag_push_events=True,
token="supersecret",
url="http://example.com",
wiki_page_events=True)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var example = new GitLab.GroupHook("example", new()
{
Group = "example/hooked",
MergeRequestsEvents = true,
Url = "https://example.com/hook/example",
});
// Setting all attributes
var allAttributes = new GitLab.GroupHook("allAttributes", new()
{
ConfidentialIssuesEvents = false,
ConfidentialNoteEvents = true,
DeploymentEvents = true,
EnableSslVerification = false,
Group = "1",
IssuesEvents = false,
JobEvents = true,
MergeRequestsEvents = true,
NoteEvents = true,
PipelineEvents = true,
PushEvents = true,
PushEventsBranchFilter = "devel",
ReleasesEvents = true,
SubgroupEvents = true,
TagPushEvents = true,
Token = "supersecret",
Url = "http://example.com",
WikiPageEvents = true,
});
});
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gitlab.NewGroupHook(ctx, "example", &gitlab.GroupHookArgs{
Group: pulumi.String("example/hooked"),
MergeRequestsEvents: pulumi.Bool(true),
Url: pulumi.String("https://example.com/hook/example"),
})
if err != nil {
return err
}
// Setting all attributes
_, err = gitlab.NewGroupHook(ctx, "allAttributes", &gitlab.GroupHookArgs{
ConfidentialIssuesEvents: pulumi.Bool(false),
ConfidentialNoteEvents: pulumi.Bool(true),
DeploymentEvents: pulumi.Bool(true),
EnableSslVerification: pulumi.Bool(false),
Group: pulumi.String("1"),
IssuesEvents: pulumi.Bool(false),
JobEvents: pulumi.Bool(true),
MergeRequestsEvents: pulumi.Bool(true),
NoteEvents: pulumi.Bool(true),
PipelineEvents: pulumi.Bool(true),
PushEvents: pulumi.Bool(true),
PushEventsBranchFilter: pulumi.String("devel"),
ReleasesEvents: pulumi.Bool(true),
SubgroupEvents: pulumi.Bool(true),
TagPushEvents: pulumi.Bool(true),
Token: pulumi.String("supersecret"),
Url: pulumi.String("http://example.com"),
WikiPageEvents: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.GroupHook;
import com.pulumi.gitlab.GroupHookArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new GroupHook("example", GroupHookArgs.builder()
.group("example/hooked")
.mergeRequestsEvents(true)
.url("https://example.com/hook/example")
.build());
// Setting all attributes
var allAttributes = new GroupHook("allAttributes", GroupHookArgs.builder()
.confidentialIssuesEvents(false)
.confidentialNoteEvents(true)
.deploymentEvents(true)
.enableSslVerification(false)
.group(1)
.issuesEvents(false)
.jobEvents(true)
.mergeRequestsEvents(true)
.noteEvents(true)
.pipelineEvents(true)
.pushEvents(true)
.pushEventsBranchFilter("devel")
.releasesEvents(true)
.subgroupEvents(true)
.tagPushEvents(true)
.token("supersecret")
.url("http://example.com")
.wikiPageEvents(true)
.build());
}
}
resources:
example:
type: gitlab:GroupHook
properties:
group: example/hooked
mergeRequestsEvents: true
url: https://example.com/hook/example
# Setting all attributes
allAttributes:
type: gitlab:GroupHook
properties:
confidentialIssuesEvents: false
confidentialNoteEvents: true
deploymentEvents: true
enableSslVerification: false
group: 1
issuesEvents: false
jobEvents: true
mergeRequestsEvents: true
noteEvents: true
pipelineEvents: true
pushEvents: true
pushEventsBranchFilter: devel
releasesEvents: true
subgroupEvents: true
tagPushEvents: true
token: supersecret
url: http://example.com
wikiPageEvents: true

Import

A GitLab Group Hook can be imported using a key composed of <group-id>:<hook-id>, e.g.

$ pulumi import gitlab:index/groupHook:GroupHook example "12345:1"

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

Properties

Link copied to clipboard

Invoke the hook for confidential issues events.

Link copied to clipboard

Invoke the hook for confidential notes events.

Link copied to clipboard

Set a custom webhook template.

Link copied to clipboard

Invoke the hook for deployment events.

Link copied to clipboard

Enable ssl verification when invoking the hook.

Link copied to clipboard
val group: Output<String>

The ID or full path of the group.

Link copied to clipboard
val groupId: Output<Int>

The id of the group for the hook.

Link copied to clipboard
val hookId: Output<Int>

The id of the group hook.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val issuesEvents: Output<Boolean>?

Invoke the hook for issues events.

Link copied to clipboard
val jobEvents: Output<Boolean>?

Invoke the hook for job events.

Link copied to clipboard

Invoke the hook for merge requests.

Link copied to clipboard
val noteEvents: Output<Boolean>?

Invoke the hook for notes events.

Link copied to clipboard
val pipelineEvents: Output<Boolean>?

Invoke the hook for pipeline events.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val pushEvents: Output<Boolean>?

Invoke the hook for push events.

Link copied to clipboard

Invoke the hook for push events on matching branches only.

Link copied to clipboard
val releasesEvents: Output<Boolean>?

Invoke the hook for releases events.

Link copied to clipboard
val subgroupEvents: Output<Boolean>?

Invoke the hook for subgroup events.

Link copied to clipboard
val tagPushEvents: Output<Boolean>?

Invoke the hook for tag push events.

Link copied to clipboard
val token: Output<String>?

A token to present when invoking the hook. The token is not available for imported resources.

Link copied to clipboard
val url: Output<String>

The url of the hook to invoke.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val wikiPageEvents: Output<Boolean>?

Invoke the hook for wiki page events.