System Hook Args
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. 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", {
url: "https://example.com/hook-%d",
token: "secret-token",
pushEvents: true,
tagPushEvents: true,
mergeRequestsEvents: true,
repositoryUpdateEvents: true,
enableSslVerification: true,
});
Content copied to clipboard
import pulumi
import pulumi_gitlab as gitlab
example = gitlab.SystemHook("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)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var example = new GitLab.SystemHook("example", new()
{
Url = "https://example.com/hook-%d",
Token = "secret-token",
PushEvents = true,
TagPushEvents = true,
MergeRequestsEvents = true,
RepositoryUpdateEvents = true,
EnableSslVerification = true,
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v8/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{
Url: pulumi.String("https://example.com/hook-%d"),
Token: pulumi.String("secret-token"),
PushEvents: pulumi.Bool(true),
TagPushEvents: pulumi.Bool(true),
MergeRequestsEvents: pulumi.Bool(true),
RepositoryUpdateEvents: pulumi.Bool(true),
EnableSslVerification: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
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()
.url("https://example.com/hook-%d")
.token("secret-token")
.pushEvents(true)
.tagPushEvents(true)
.mergeRequestsEvents(true)
.repositoryUpdateEvents(true)
.enableSslVerification(true)
.build());
}
}
Content copied to clipboard
resources:
example:
type: gitlab:SystemHook
properties:
url: https://example.com/hook-%d
token: secret-token
pushEvents: true
tagPushEvents: true
mergeRequestsEvents: true
repositoryUpdateEvents: true
enableSslVerification: true
Content copied to clipboard
Import
Starting in Terraform v1.5.0 you can use an import block to import gitlab_system_hook
. For example: terraform import { to = gitlab_system_hook.example id = "see CLI command below for ID" } Import using the CLI is supported using the following syntax: You can import a system hook using the hook id {hook-id}
, e.g.
$ pulumi import gitlab:index/systemHook:SystemHook example 42
Content copied to clipboard
NOTE: the token
attribute won't be available for imported resources.
Properties
Link copied to clipboard
Do SSL verification when triggering the hook.
Link copied to clipboard
Trigger hook on merge requests events.
Link copied to clipboard
When true, the hook fires on push events.
Link copied to clipboard
Trigger hook on repository update events.
Link copied to clipboard
When true, the hook fires on new tags being pushed.