SystemHookArgs

data class SystemHookArgs(val enableSslVerification: Output<Boolean>? = null, val mergeRequestsEvents: Output<Boolean>? = null, val pushEvents: Output<Boolean>? = null, val repositoryUpdateEvents: Output<Boolean>? = null, val tagPushEvents: Output<Boolean>? = null, val token: Output<String>? = null, val url: Output<String>? = null) : ConvertibleToJava<SystemHookArgs>

The gitlab.SystemHook resource allows to manage the lifecycle of a system hook.

This resource requires GitLab 14.9 Upstream API: GitLab REST API docs

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const example = new gitlab.SystemHook("example", {
enableSslVerification: true,
mergeRequestsEvents: true,
pushEvents: true,
repositoryUpdateEvents: true,
tagPushEvents: true,
token: "secret-token",
url: "https://example.com/hook-%d",
});
import pulumi
import pulumi_gitlab as gitlab
example = gitlab.SystemHook("example",
enable_ssl_verification=True,
merge_requests_events=True,
push_events=True,
repository_update_events=True,
tag_push_events=True,
token="secret-token",
url="https://example.com/hook-%d")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var example = new GitLab.SystemHook("example", new()
{
EnableSslVerification = true,
MergeRequestsEvents = true,
PushEvents = true,
RepositoryUpdateEvents = true,
TagPushEvents = true,
Token = "secret-token",
Url = "https://example.com/hook-%d",
});
});
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.NewSystemHook(ctx, "example", &gitlab.SystemHookArgs{
EnableSslVerification: pulumi.Bool(true),
MergeRequestsEvents: pulumi.Bool(true),
PushEvents: pulumi.Bool(true),
RepositoryUpdateEvents: pulumi.Bool(true),
TagPushEvents: pulumi.Bool(true),
Token: pulumi.String("secret-token"),
Url: pulumi.String("https://example.com/hook-%d"),
})
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.SystemHook;
import com.pulumi.gitlab.SystemHookArgs;
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 SystemHook("example", SystemHookArgs.builder()
.enableSslVerification(true)
.mergeRequestsEvents(true)
.pushEvents(true)
.repositoryUpdateEvents(true)
.tagPushEvents(true)
.token("secret-token")
.url("https://example.com/hook-%d")
.build());
}
}
resources:
example:
type: gitlab:SystemHook
properties:
enableSslVerification: true
mergeRequestsEvents: true
pushEvents: true
repositoryUpdateEvents: true
tagPushEvents: true
token: secret-token
url: https://example.com/hook-%d

Import

You can import a system hook using the hook id {hook-id}, e.g.

$ pulumi import gitlab:index/systemHook:SystemHook example 42

NOTE: the token attribute won't be available for imported resources.

Constructors

Link copied to clipboard
constructor(enableSslVerification: Output<Boolean>? = null, mergeRequestsEvents: Output<Boolean>? = null, pushEvents: Output<Boolean>? = null, repositoryUpdateEvents: Output<Boolean>? = null, tagPushEvents: Output<Boolean>? = null, token: Output<String>? = null, url: Output<String>? = null)

Properties

Link copied to clipboard
val enableSslVerification: Output<Boolean>? = null

Do SSL verification when triggering the hook.

Link copied to clipboard
val mergeRequestsEvents: Output<Boolean>? = null

Trigger hook on merge requests events.

Link copied to clipboard
val pushEvents: Output<Boolean>? = null

When true, the hook fires on push events.

Link copied to clipboard
val repositoryUpdateEvents: Output<Boolean>? = null

Trigger hook on repository update events.

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

When true, the hook fires on new tags being pushed.

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

Secret token to validate received payloads; this isn’t returned in the response. This attribute is not available for imported resources.

Link copied to clipboard
val url: Output<String>? = null

The hook URL.

Functions

Link copied to clipboard
open override fun toJava(): SystemHookArgs