Group Hook Args
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",
url: "https://example.com/hook/example",
mergeRequestsEvents: true,
});
// Setting all attributes
const allAttributes = new gitlab.GroupHook("all_attributes", {
group: "1",
url: "http://example.com",
token: "supersecret",
enableSslVerification: false,
pushEvents: true,
pushEventsBranchFilter: "devel",
issuesEvents: false,
confidentialIssuesEvents: false,
mergeRequestsEvents: true,
tagPushEvents: true,
noteEvents: true,
confidentialNoteEvents: true,
jobEvents: true,
pipelineEvents: true,
wikiPageEvents: true,
deploymentEvents: true,
releasesEvents: true,
subgroupEvents: true,
});
import pulumi
import pulumi_gitlab as gitlab
example = gitlab.GroupHook("example",
group="example/hooked",
url="https://example.com/hook/example",
merge_requests_events=True)
# Setting all attributes
all_attributes = gitlab.GroupHook("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)
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",
Url = "https://example.com/hook/example",
MergeRequestsEvents = true,
});
// Setting all attributes
var allAttributes = new GitLab.GroupHook("all_attributes", new()
{
Group = "1",
Url = "http://example.com",
Token = "supersecret",
EnableSslVerification = false,
PushEvents = true,
PushEventsBranchFilter = "devel",
IssuesEvents = false,
ConfidentialIssuesEvents = false,
MergeRequestsEvents = true,
TagPushEvents = true,
NoteEvents = true,
ConfidentialNoteEvents = true,
JobEvents = true,
PipelineEvents = true,
WikiPageEvents = true,
DeploymentEvents = true,
ReleasesEvents = true,
SubgroupEvents = true,
});
});
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v7/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"),
Url: pulumi.String("https://example.com/hook/example"),
MergeRequestsEvents: pulumi.Bool(true),
})
if err != nil {
return err
}
// Setting all attributes
_, err = gitlab.NewGroupHook(ctx, "all_attributes", &gitlab.GroupHookArgs{
Group: pulumi.String("1"),
Url: pulumi.String("http://example.com"),
Token: pulumi.String("supersecret"),
EnableSslVerification: pulumi.Bool(false),
PushEvents: pulumi.Bool(true),
PushEventsBranchFilter: pulumi.String("devel"),
IssuesEvents: pulumi.Bool(false),
ConfidentialIssuesEvents: pulumi.Bool(false),
MergeRequestsEvents: pulumi.Bool(true),
TagPushEvents: pulumi.Bool(true),
NoteEvents: pulumi.Bool(true),
ConfidentialNoteEvents: pulumi.Bool(true),
JobEvents: pulumi.Bool(true),
PipelineEvents: pulumi.Bool(true),
WikiPageEvents: pulumi.Bool(true),
DeploymentEvents: pulumi.Bool(true),
ReleasesEvents: pulumi.Bool(true),
SubgroupEvents: 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")
.url("https://example.com/hook/example")
.mergeRequestsEvents(true)
.build());
// Setting all attributes
var allAttributes = new GroupHook("allAttributes", GroupHookArgs.builder()
.group(1)
.url("http://example.com")
.token("supersecret")
.enableSslVerification(false)
.pushEvents(true)
.pushEventsBranchFilter("devel")
.issuesEvents(false)
.confidentialIssuesEvents(false)
.mergeRequestsEvents(true)
.tagPushEvents(true)
.noteEvents(true)
.confidentialNoteEvents(true)
.jobEvents(true)
.pipelineEvents(true)
.wikiPageEvents(true)
.deploymentEvents(true)
.releasesEvents(true)
.subgroupEvents(true)
.build());
}
}
resources:
example:
type: gitlab:GroupHook
properties:
group: example/hooked
url: https://example.com/hook/example
mergeRequestsEvents: true
# Setting all attributes
allAttributes:
type: gitlab:GroupHook
name: all_attributes
properties:
group: 1
url: http://example.com
token: supersecret
enableSslVerification: false
pushEvents: true
pushEventsBranchFilter: devel
issuesEvents: false
confidentialIssuesEvents: false
mergeRequestsEvents: true
tagPushEvents: true
noteEvents: true
confidentialNoteEvents: true
jobEvents: true
pipelineEvents: true
wikiPageEvents: true
deploymentEvents: true
releasesEvents: true
subgroupEvents: 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.
Constructors
Properties
Invoke the hook for confidential issues events.
Invoke the hook for confidential notes events.
Set a custom webhook template.
Invoke the hook for deployment events.
Enable ssl verification when invoking the hook.
Invoke the hook for issues events.
Invoke the hook for merge requests.
Invoke the hook for notes events.
Invoke the hook for pipeline events.
Invoke the hook for push events.
Invoke the hook for push events on matching branches only.
Invoke the hook for releases events.
Invoke the hook for subgroup events.
Invoke the hook for tag push events.
Invoke the hook for wiki page events.