ProjectHook

# gitlab_project_hook

This resource allows you to create and manage hooks for your GitLab projects. For further information on hooks, consult the gitlab documentation.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new GitLab.ProjectHook("example", new GitLab.ProjectHookArgs
        {
            MergeRequestsEvents = true,
            Project = "example/hooked",
            Url = "https://example.com/hook/example",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-gitlab/sdk/v4/go/gitlab"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := gitlab.NewProjectHook(ctx, "example", &gitlab.ProjectHookArgs{
			MergeRequestsEvents: pulumi.Bool(true),
			Project:             pulumi.String("example/hooked"),
			Url:                 pulumi.String("https://example.com/hook/example"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_gitlab as gitlab

example = gitlab.ProjectHook("example",
    merge_requests_events=True,
    project="example/hooked",
    url="https://example.com/hook/example")
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const example = new gitlab.ProjectHook("example", {
    mergeRequestsEvents: true,
    project: "example/hooked",
    url: "https://example.com/hook/example",
});

Create a ProjectHook Resource

new ProjectHook(name: string, args: ProjectHookArgs, opts?: CustomResourceOptions);
@overload
def ProjectHook(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                confidential_issues_events: Optional[bool] = None,
                confidential_note_events: Optional[bool] = None,
                deployment_events: Optional[bool] = None,
                enable_ssl_verification: Optional[bool] = None,
                issues_events: Optional[bool] = None,
                job_events: Optional[bool] = None,
                merge_requests_events: Optional[bool] = None,
                note_events: Optional[bool] = None,
                pipeline_events: Optional[bool] = None,
                project: Optional[str] = None,
                push_events: Optional[bool] = None,
                push_events_branch_filter: Optional[str] = None,
                tag_push_events: Optional[bool] = None,
                token: Optional[str] = None,
                url: Optional[str] = None,
                wiki_page_events: Optional[bool] = None)
@overload
def ProjectHook(resource_name: str,
                args: ProjectHookArgs,
                opts: Optional[ResourceOptions] = None)
func NewProjectHook(ctx *Context, name string, args ProjectHookArgs, opts ...ResourceOption) (*ProjectHook, error)
public ProjectHook(string name, ProjectHookArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ProjectHookArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args ProjectHookArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ProjectHookArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ProjectHookArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ProjectHook Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ProjectHook resource accepts the following input properties:

Project string
The name or id of the project to add the hook to.
Url string
The url of the hook to invoke.
ConfidentialIssuesEvents bool
Invoke the hook for confidential issues events.
ConfidentialNoteEvents bool
Invoke the hook for confidential notes events.
DeploymentEvents bool
Invoke the hook for deployment events.
EnableSslVerification bool
Enable ssl verification when invoking the hook.
IssuesEvents bool
Invoke the hook for issues events.
JobEvents bool
Invoke the hook for job events.
MergeRequestsEvents bool
Invoke the hook for merge requests.
NoteEvents bool
Invoke the hook for notes events.
PipelineEvents bool
Invoke the hook for pipeline events.
PushEvents bool
Invoke the hook for push events.
PushEventsBranchFilter string
Invoke the hook for push events on matching branches only.
TagPushEvents bool
Invoke the hook for tag push events.
Token string
A token to present when invoking the hook.
WikiPageEvents bool
Invoke the hook for wiki page events.
Project string
The name or id of the project to add the hook to.
Url string
The url of the hook to invoke.
ConfidentialIssuesEvents bool
Invoke the hook for confidential issues events.
ConfidentialNoteEvents bool
Invoke the hook for confidential notes events.
DeploymentEvents bool
Invoke the hook for deployment events.
EnableSslVerification bool
Enable ssl verification when invoking the hook.
IssuesEvents bool
Invoke the hook for issues events.
JobEvents bool
Invoke the hook for job events.
MergeRequestsEvents bool
Invoke the hook for merge requests.
NoteEvents bool
Invoke the hook for notes events.
PipelineEvents bool
Invoke the hook for pipeline events.
PushEvents bool
Invoke the hook for push events.
PushEventsBranchFilter string
Invoke the hook for push events on matching branches only.
TagPushEvents bool
Invoke the hook for tag push events.
Token string
A token to present when invoking the hook.
WikiPageEvents bool
Invoke the hook for wiki page events.
project string
The name or id of the project to add the hook to.
url string
The url of the hook to invoke.
confidentialIssuesEvents boolean
Invoke the hook for confidential issues events.
confidentialNoteEvents boolean
Invoke the hook for confidential notes events.
deploymentEvents boolean
Invoke the hook for deployment events.
enableSslVerification boolean
Enable ssl verification when invoking the hook.
issuesEvents boolean
Invoke the hook for issues events.
jobEvents boolean
Invoke the hook for job events.
mergeRequestsEvents boolean
Invoke the hook for merge requests.
noteEvents boolean
Invoke the hook for notes events.
pipelineEvents boolean
Invoke the hook for pipeline events.
pushEvents boolean
Invoke the hook for push events.
pushEventsBranchFilter string
Invoke the hook for push events on matching branches only.
tagPushEvents boolean
Invoke the hook for tag push events.
token string
A token to present when invoking the hook.
wikiPageEvents boolean
Invoke the hook for wiki page events.
project str
The name or id of the project to add the hook to.
url str
The url of the hook to invoke.
confidential_issues_events bool
Invoke the hook for confidential issues events.
confidential_note_events bool
Invoke the hook for confidential notes events.
deployment_events bool
Invoke the hook for deployment events.
enable_ssl_verification bool
Enable ssl verification when invoking the hook.
issues_events bool
Invoke the hook for issues events.
job_events bool
Invoke the hook for job events.
merge_requests_events bool
Invoke the hook for merge requests.
note_events bool
Invoke the hook for notes events.
pipeline_events bool
Invoke the hook for pipeline events.
push_events bool
Invoke the hook for push events.
push_events_branch_filter str
Invoke the hook for push events on matching branches only.
tag_push_events bool
Invoke the hook for tag push events.
token str
A token to present when invoking the hook.
wiki_page_events bool
Invoke the hook for wiki page events.

Outputs

All input properties are implicitly available as output properties. Additionally, the ProjectHook resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing ProjectHook Resource

Get an existing ProjectHook resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ProjectHookState, opts?: CustomResourceOptions): ProjectHook
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        confidential_issues_events: Optional[bool] = None,
        confidential_note_events: Optional[bool] = None,
        deployment_events: Optional[bool] = None,
        enable_ssl_verification: Optional[bool] = None,
        issues_events: Optional[bool] = None,
        job_events: Optional[bool] = None,
        merge_requests_events: Optional[bool] = None,
        note_events: Optional[bool] = None,
        pipeline_events: Optional[bool] = None,
        project: Optional[str] = None,
        push_events: Optional[bool] = None,
        push_events_branch_filter: Optional[str] = None,
        tag_push_events: Optional[bool] = None,
        token: Optional[str] = None,
        url: Optional[str] = None,
        wiki_page_events: Optional[bool] = None) -> ProjectHook
func GetProjectHook(ctx *Context, name string, id IDInput, state *ProjectHookState, opts ...ResourceOption) (*ProjectHook, error)
public static ProjectHook Get(string name, Input<string> id, ProjectHookState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

ConfidentialIssuesEvents bool
Invoke the hook for confidential issues events.
ConfidentialNoteEvents bool
Invoke the hook for confidential notes events.
DeploymentEvents bool
Invoke the hook for deployment events.
EnableSslVerification bool
Enable ssl verification when invoking the hook.
IssuesEvents bool
Invoke the hook for issues events.
JobEvents bool
Invoke the hook for job events.
MergeRequestsEvents bool
Invoke the hook for merge requests.
NoteEvents bool
Invoke the hook for notes events.
PipelineEvents bool
Invoke the hook for pipeline events.
Project string
The name or id of the project to add the hook to.
PushEvents bool
Invoke the hook for push events.
PushEventsBranchFilter string
Invoke the hook for push events on matching branches only.
TagPushEvents bool
Invoke the hook for tag push events.
Token string
A token to present when invoking the hook.
Url string
The url of the hook to invoke.
WikiPageEvents bool
Invoke the hook for wiki page events.
ConfidentialIssuesEvents bool
Invoke the hook for confidential issues events.
ConfidentialNoteEvents bool
Invoke the hook for confidential notes events.
DeploymentEvents bool
Invoke the hook for deployment events.
EnableSslVerification bool
Enable ssl verification when invoking the hook.
IssuesEvents bool
Invoke the hook for issues events.
JobEvents bool
Invoke the hook for job events.
MergeRequestsEvents bool
Invoke the hook for merge requests.
NoteEvents bool
Invoke the hook for notes events.
PipelineEvents bool
Invoke the hook for pipeline events.
Project string
The name or id of the project to add the hook to.
PushEvents bool
Invoke the hook for push events.
PushEventsBranchFilter string
Invoke the hook for push events on matching branches only.
TagPushEvents bool
Invoke the hook for tag push events.
Token string
A token to present when invoking the hook.
Url string
The url of the hook to invoke.
WikiPageEvents bool
Invoke the hook for wiki page events.
confidentialIssuesEvents boolean
Invoke the hook for confidential issues events.
confidentialNoteEvents boolean
Invoke the hook for confidential notes events.
deploymentEvents boolean
Invoke the hook for deployment events.
enableSslVerification boolean
Enable ssl verification when invoking the hook.
issuesEvents boolean
Invoke the hook for issues events.
jobEvents boolean
Invoke the hook for job events.
mergeRequestsEvents boolean
Invoke the hook for merge requests.
noteEvents boolean
Invoke the hook for notes events.
pipelineEvents boolean
Invoke the hook for pipeline events.
project string
The name or id of the project to add the hook to.
pushEvents boolean
Invoke the hook for push events.
pushEventsBranchFilter string
Invoke the hook for push events on matching branches only.
tagPushEvents boolean
Invoke the hook for tag push events.
token string
A token to present when invoking the hook.
url string
The url of the hook to invoke.
wikiPageEvents boolean
Invoke the hook for wiki page events.
confidential_issues_events bool
Invoke the hook for confidential issues events.
confidential_note_events bool
Invoke the hook for confidential notes events.
deployment_events bool
Invoke the hook for deployment events.
enable_ssl_verification bool
Enable ssl verification when invoking the hook.
issues_events bool
Invoke the hook for issues events.
job_events bool
Invoke the hook for job events.
merge_requests_events bool
Invoke the hook for merge requests.
note_events bool
Invoke the hook for notes events.
pipeline_events bool
Invoke the hook for pipeline events.
project str
The name or id of the project to add the hook to.
push_events bool
Invoke the hook for push events.
push_events_branch_filter str
Invoke the hook for push events on matching branches only.
tag_push_events bool
Invoke the hook for tag push events.
token str
A token to present when invoking the hook.
url str
The url of the hook to invoke.
wiki_page_events bool
Invoke the hook for wiki page events.

Package Details

Repository
https://github.com/pulumi/pulumi-gitlab
License
Apache-2.0
Notes
This Pulumi package is based on the gitlab Terraform Provider.