published on Friday, Jun 26, 2026 by Pulumi
published on Friday, Jun 26, 2026 by Pulumi
The gitlab.ProjectHook resource manages the lifecycle of a project hook.
Note that
pushEventsdefaults totrue.
Upstream API: GitLab REST API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const example = new gitlab.ProjectHook("example", {
project: "example/hooked",
url: "https://example.com/hook/example",
name: "example",
description: "Example hook",
mergeRequestsEvents: true,
pushEvents: false,
});
// Using Custom Headers
// Values of headers can't be imported
const customHeaders = new gitlab.ProjectHook("custom_headers", {
project: "example/hooked",
url: "https://example.com/hook/example",
mergeRequestsEvents: true,
customHeaders: [
{
key: "X-Custom-Header",
value: "example",
},
{
key: "X-Custom-Header-Second",
value: "example-second",
},
],
});
// Using URL variables
// Values of URL variables can't be imported
const urlVariables = new gitlab.ProjectHook("url_variables", {
project: "example/hooked",
url: "https://example.com/hook/example?token=secret",
mergeRequestsEvents: true,
urlVariables: [{
key: "hidden",
value: "token=secret",
}],
});
import pulumi
import pulumi_gitlab as gitlab
example = gitlab.ProjectHook("example",
project="example/hooked",
url="https://example.com/hook/example",
name="example",
description="Example hook",
merge_requests_events=True,
push_events=False)
# Using Custom Headers
# Values of headers can't be imported
custom_headers = gitlab.ProjectHook("custom_headers",
project="example/hooked",
url="https://example.com/hook/example",
merge_requests_events=True,
custom_headers=[
{
"key": "X-Custom-Header",
"value": "example",
},
{
"key": "X-Custom-Header-Second",
"value": "example-second",
},
])
# Using URL variables
# Values of URL variables can't be imported
url_variables = gitlab.ProjectHook("url_variables",
project="example/hooked",
url="https://example.com/hook/example?token=secret",
merge_requests_events=True,
url_variables=[{
"key": "hidden",
"value": "token=secret",
}])
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v10/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{
Project: pulumi.String("example/hooked"),
Url: pulumi.String("https://example.com/hook/example"),
Name: pulumi.String("example"),
Description: pulumi.String("Example hook"),
MergeRequestsEvents: pulumi.Bool(true),
PushEvents: pulumi.Bool(false),
})
if err != nil {
return err
}
// Using Custom Headers
// Values of headers can't be imported
_, err = gitlab.NewProjectHook(ctx, "custom_headers", &gitlab.ProjectHookArgs{
Project: pulumi.String("example/hooked"),
Url: pulumi.String("https://example.com/hook/example"),
MergeRequestsEvents: pulumi.Bool(true),
CustomHeaders: gitlab.ProjectHookCustomHeaderArray{
&gitlab.ProjectHookCustomHeaderArgs{
Key: pulumi.String("X-Custom-Header"),
Value: pulumi.String("example"),
},
&gitlab.ProjectHookCustomHeaderArgs{
Key: pulumi.String("X-Custom-Header-Second"),
Value: pulumi.String("example-second"),
},
},
})
if err != nil {
return err
}
// Using URL variables
// Values of URL variables can't be imported
_, err = gitlab.NewProjectHook(ctx, "url_variables", &gitlab.ProjectHookArgs{
Project: pulumi.String("example/hooked"),
Url: pulumi.String("https://example.com/hook/example?token=secret"),
MergeRequestsEvents: pulumi.Bool(true),
UrlVariables: gitlab.ProjectHookUrlVariableArray{
&gitlab.ProjectHookUrlVariableArgs{
Key: pulumi.String("hidden"),
Value: pulumi.String("token=secret"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var example = new GitLab.ProjectHook("example", new()
{
Project = "example/hooked",
Url = "https://example.com/hook/example",
Name = "example",
Description = "Example hook",
MergeRequestsEvents = true,
PushEvents = false,
});
// Using Custom Headers
// Values of headers can't be imported
var customHeaders = new GitLab.ProjectHook("custom_headers", new()
{
Project = "example/hooked",
Url = "https://example.com/hook/example",
MergeRequestsEvents = true,
CustomHeaders = new[]
{
new GitLab.Inputs.ProjectHookCustomHeaderArgs
{
Key = "X-Custom-Header",
Value = "example",
},
new GitLab.Inputs.ProjectHookCustomHeaderArgs
{
Key = "X-Custom-Header-Second",
Value = "example-second",
},
},
});
// Using URL variables
// Values of URL variables can't be imported
var urlVariables = new GitLab.ProjectHook("url_variables", new()
{
Project = "example/hooked",
Url = "https://example.com/hook/example?token=secret",
MergeRequestsEvents = true,
UrlVariables = new[]
{
new GitLab.Inputs.ProjectHookUrlVariableArgs
{
Key = "hidden",
Value = "token=secret",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.ProjectHook;
import com.pulumi.gitlab.ProjectHookArgs;
import com.pulumi.gitlab.inputs.ProjectHookCustomHeaderArgs;
import com.pulumi.gitlab.inputs.ProjectHookUrlVariableArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 ProjectHook("example", ProjectHookArgs.builder()
.project("example/hooked")
.url("https://example.com/hook/example")
.name("example")
.description("Example hook")
.mergeRequestsEvents(true)
.pushEvents(false)
.build());
// Using Custom Headers
// Values of headers can't be imported
var customHeaders = new ProjectHook("customHeaders", ProjectHookArgs.builder()
.project("example/hooked")
.url("https://example.com/hook/example")
.mergeRequestsEvents(true)
.customHeaders(
ProjectHookCustomHeaderArgs.builder()
.key("X-Custom-Header")
.value("example")
.build(),
ProjectHookCustomHeaderArgs.builder()
.key("X-Custom-Header-Second")
.value("example-second")
.build())
.build());
// Using URL variables
// Values of URL variables can't be imported
var urlVariables = new ProjectHook("urlVariables", ProjectHookArgs.builder()
.project("example/hooked")
.url("https://example.com/hook/example?token=secret")
.mergeRequestsEvents(true)
.urlVariables(ProjectHookUrlVariableArgs.builder()
.key("hidden")
.value("token=secret")
.build())
.build());
}
}
resources:
example:
type: gitlab:ProjectHook
properties:
project: example/hooked
url: https://example.com/hook/example
name: example
description: Example hook
mergeRequestsEvents: true # Set to false to avoid default true value
pushEvents: false
# Using Custom Headers
# Values of headers can't be imported
customHeaders:
type: gitlab:ProjectHook
name: custom_headers
properties:
project: example/hooked
url: https://example.com/hook/example
mergeRequestsEvents: true
customHeaders:
- key: X-Custom-Header
value: example
- key: X-Custom-Header-Second
value: example-second
# Using URL variables
# Values of URL variables can't be imported
urlVariables:
type: gitlab:ProjectHook
name: url_variables
properties:
project: example/hooked
url: https://example.com/hook/example?token=secret
mergeRequestsEvents: true
urlVariables:
- key: hidden
value: token=secret
pulumi {
required_providers {
gitlab = {
source = "pulumi/gitlab"
}
}
}
resource "gitlab_projecthook" "example" {
project = "example/hooked"
url = "https://example.com/hook/example"
name = "example"
description = "Example hook"
merge_requests_events = true
# Set to false to avoid default true value
push_events = false
}
# Using Custom Headers
# Values of headers can't be imported
resource "gitlab_projecthook" "custom_headers" {
project = "example/hooked"
url = "https://example.com/hook/example"
merge_requests_events = true
custom_headers {
key = "X-Custom-Header"
value = "example"
}
custom_headers {
key = "X-Custom-Header-Second"
value = "example-second"
}
}
# Using URL variables
# Values of URL variables can't be imported
resource "gitlab_projecthook" "url_variables" {
project = "example/hooked"
url = "https://example.com/hook/example?token=secret"
merge_requests_events = true
url_variables {
key = "hidden"
value = "token=secret"
}
}
Create ProjectHook Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProjectHook(name: string, args: ProjectHookArgs, opts?: CustomResourceOptions);@overload
def ProjectHook(resource_name: str,
args: ProjectHookArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProjectHook(resource_name: str,
opts: Optional[ResourceOptions] = None,
project: Optional[str] = None,
url: Optional[str] = None,
name: Optional[str] = None,
token: Optional[str] = None,
custom_webhook_template: Optional[str] = None,
deployment_events: Optional[bool] = None,
pipeline_events: Optional[bool] = None,
emoji_events: Optional[bool] = None,
enable_ssl_verification: Optional[bool] = None,
feature_flag_events: Optional[bool] = None,
issues_events: Optional[bool] = None,
job_events: Optional[bool] = None,
merge_requests_events: Optional[bool] = None,
milestone_events: Optional[bool] = None,
custom_headers: Optional[Sequence[ProjectHookCustomHeaderArgs]] = None,
branch_filter_strategy: Optional[str] = None,
description: Optional[str] = None,
confidential_note_events: Optional[bool] = None,
push_events: Optional[bool] = None,
push_events_branch_filter: Optional[str] = None,
releases_events: Optional[bool] = None,
resource_access_token_events: Optional[bool] = None,
resource_deploy_token_events: Optional[bool] = None,
signing_token: Optional[str] = None,
tag_push_events: Optional[bool] = None,
note_events: Optional[bool] = None,
confidential_issues_events: Optional[bool] = None,
url_variables: Optional[Sequence[ProjectHookUrlVariableArgs]] = None,
vulnerability_events: Optional[bool] = None,
wiki_page_events: Optional[bool] = None)func NewProjectHook(ctx *Context, name string, args ProjectHookArgs, opts ...ResourceOption) (*ProjectHook, error)public ProjectHook(string name, ProjectHookArgs args, CustomResourceOptions? opts = null)
public ProjectHook(String name, ProjectHookArgs args)
public ProjectHook(String name, ProjectHookArgs args, CustomResourceOptions options)
type: gitlab:ProjectHook
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "gitlab_projecthook" "name" {
# resource properties
}Parameters
- 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.
- name String
- The unique name of the resource.
- args ProjectHookArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var projectHookResource = new GitLab.ProjectHook("projectHookResource", new()
{
Project = "string",
Url = "string",
Name = "string",
Token = "string",
CustomWebhookTemplate = "string",
DeploymentEvents = false,
PipelineEvents = false,
EmojiEvents = false,
EnableSslVerification = false,
FeatureFlagEvents = false,
IssuesEvents = false,
JobEvents = false,
MergeRequestsEvents = false,
MilestoneEvents = false,
CustomHeaders = new[]
{
new GitLab.Inputs.ProjectHookCustomHeaderArgs
{
Key = "string",
Value = "string",
},
},
BranchFilterStrategy = "string",
Description = "string",
ConfidentialNoteEvents = false,
PushEvents = false,
PushEventsBranchFilter = "string",
ReleasesEvents = false,
ResourceAccessTokenEvents = false,
ResourceDeployTokenEvents = false,
SigningToken = "string",
TagPushEvents = false,
NoteEvents = false,
ConfidentialIssuesEvents = false,
UrlVariables = new[]
{
new GitLab.Inputs.ProjectHookUrlVariableArgs
{
Key = "string",
Value = "string",
},
},
VulnerabilityEvents = false,
WikiPageEvents = false,
});
example, err := gitlab.NewProjectHook(ctx, "projectHookResource", &gitlab.ProjectHookArgs{
Project: pulumi.String("string"),
Url: pulumi.String("string"),
Name: pulumi.String("string"),
Token: pulumi.String("string"),
CustomWebhookTemplate: pulumi.String("string"),
DeploymentEvents: pulumi.Bool(false),
PipelineEvents: pulumi.Bool(false),
EmojiEvents: pulumi.Bool(false),
EnableSslVerification: pulumi.Bool(false),
FeatureFlagEvents: pulumi.Bool(false),
IssuesEvents: pulumi.Bool(false),
JobEvents: pulumi.Bool(false),
MergeRequestsEvents: pulumi.Bool(false),
MilestoneEvents: pulumi.Bool(false),
CustomHeaders: gitlab.ProjectHookCustomHeaderArray{
&gitlab.ProjectHookCustomHeaderArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
BranchFilterStrategy: pulumi.String("string"),
Description: pulumi.String("string"),
ConfidentialNoteEvents: pulumi.Bool(false),
PushEvents: pulumi.Bool(false),
PushEventsBranchFilter: pulumi.String("string"),
ReleasesEvents: pulumi.Bool(false),
ResourceAccessTokenEvents: pulumi.Bool(false),
ResourceDeployTokenEvents: pulumi.Bool(false),
SigningToken: pulumi.String("string"),
TagPushEvents: pulumi.Bool(false),
NoteEvents: pulumi.Bool(false),
ConfidentialIssuesEvents: pulumi.Bool(false),
UrlVariables: gitlab.ProjectHookUrlVariableArray{
&gitlab.ProjectHookUrlVariableArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
VulnerabilityEvents: pulumi.Bool(false),
WikiPageEvents: pulumi.Bool(false),
})
resource "gitlab_projecthook" "projectHookResource" {
project = "string"
url = "string"
name = "string"
token = "string"
custom_webhook_template = "string"
deployment_events = false
pipeline_events = false
emoji_events = false
enable_ssl_verification = false
feature_flag_events = false
issues_events = false
job_events = false
merge_requests_events = false
milestone_events = false
custom_headers {
key = "string"
value = "string"
}
branch_filter_strategy = "string"
description = "string"
confidential_note_events = false
push_events = false
push_events_branch_filter = "string"
releases_events = false
resource_access_token_events = false
resource_deploy_token_events = false
signing_token = "string"
tag_push_events = false
note_events = false
confidential_issues_events = false
url_variables {
key = "string"
value = "string"
}
vulnerability_events = false
wiki_page_events = false
}
var projectHookResource = new ProjectHook("projectHookResource", ProjectHookArgs.builder()
.project("string")
.url("string")
.name("string")
.token("string")
.customWebhookTemplate("string")
.deploymentEvents(false)
.pipelineEvents(false)
.emojiEvents(false)
.enableSslVerification(false)
.featureFlagEvents(false)
.issuesEvents(false)
.jobEvents(false)
.mergeRequestsEvents(false)
.milestoneEvents(false)
.customHeaders(ProjectHookCustomHeaderArgs.builder()
.key("string")
.value("string")
.build())
.branchFilterStrategy("string")
.description("string")
.confidentialNoteEvents(false)
.pushEvents(false)
.pushEventsBranchFilter("string")
.releasesEvents(false)
.resourceAccessTokenEvents(false)
.resourceDeployTokenEvents(false)
.signingToken("string")
.tagPushEvents(false)
.noteEvents(false)
.confidentialIssuesEvents(false)
.urlVariables(ProjectHookUrlVariableArgs.builder()
.key("string")
.value("string")
.build())
.vulnerabilityEvents(false)
.wikiPageEvents(false)
.build());
project_hook_resource = gitlab.ProjectHook("projectHookResource",
project="string",
url="string",
name="string",
token="string",
custom_webhook_template="string",
deployment_events=False,
pipeline_events=False,
emoji_events=False,
enable_ssl_verification=False,
feature_flag_events=False,
issues_events=False,
job_events=False,
merge_requests_events=False,
milestone_events=False,
custom_headers=[{
"key": "string",
"value": "string",
}],
branch_filter_strategy="string",
description="string",
confidential_note_events=False,
push_events=False,
push_events_branch_filter="string",
releases_events=False,
resource_access_token_events=False,
resource_deploy_token_events=False,
signing_token="string",
tag_push_events=False,
note_events=False,
confidential_issues_events=False,
url_variables=[{
"key": "string",
"value": "string",
}],
vulnerability_events=False,
wiki_page_events=False)
const projectHookResource = new gitlab.ProjectHook("projectHookResource", {
project: "string",
url: "string",
name: "string",
token: "string",
customWebhookTemplate: "string",
deploymentEvents: false,
pipelineEvents: false,
emojiEvents: false,
enableSslVerification: false,
featureFlagEvents: false,
issuesEvents: false,
jobEvents: false,
mergeRequestsEvents: false,
milestoneEvents: false,
customHeaders: [{
key: "string",
value: "string",
}],
branchFilterStrategy: "string",
description: "string",
confidentialNoteEvents: false,
pushEvents: false,
pushEventsBranchFilter: "string",
releasesEvents: false,
resourceAccessTokenEvents: false,
resourceDeployTokenEvents: false,
signingToken: "string",
tagPushEvents: false,
noteEvents: false,
confidentialIssuesEvents: false,
urlVariables: [{
key: "string",
value: "string",
}],
vulnerabilityEvents: false,
wikiPageEvents: false,
});
type: gitlab:ProjectHook
properties:
branchFilterStrategy: string
confidentialIssuesEvents: false
confidentialNoteEvents: false
customHeaders:
- key: string
value: string
customWebhookTemplate: string
deploymentEvents: false
description: string
emojiEvents: false
enableSslVerification: false
featureFlagEvents: false
issuesEvents: false
jobEvents: false
mergeRequestsEvents: false
milestoneEvents: false
name: string
noteEvents: false
pipelineEvents: false
project: string
pushEvents: false
pushEventsBranchFilter: string
releasesEvents: false
resourceAccessTokenEvents: false
resourceDeployTokenEvents: false
signingToken: string
tagPushEvents: false
token: string
url: string
urlVariables:
- key: string
value: string
vulnerabilityEvents: false
wikiPageEvents: false
ProjectHook Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
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. Forces re-creation to preserve
token. - Branch
Filter stringStrategy - Filter push events by branch. Valid values are:
wildcard,regex,allBranches. - Confidential
Issues boolEvents - Invoke the hook for confidential issues events. Defaults to
false. - Confidential
Note boolEvents - Invoke the hook for confidential note events. Defaults to
false. - Custom
Headers List<Pulumi.Git Lab. Inputs. Project Hook Custom Header> - Custom headers for the project webhook. Available from GitLab 17.1 onwards.
- Custom
Webhook stringTemplate - Custom webhook template.
- Deployment
Events bool - Invoke the hook for deployment events. Defaults to
false. - Description string
- Description of the webhook.
- Emoji
Events bool - Invoke the hook for emoji events. Defaults to
false. - Enable
Ssl boolVerification - Enable SSL verification when invoking the hook. Defaults to
true. - Feature
Flag boolEvents - Invoke the hook for feature flag events. Defaults to
false. - Issues
Events bool - Invoke the hook for issues events. Defaults to
false. - Job
Events bool - Invoke the hook for job events. Defaults to
false. - Merge
Requests boolEvents - Invoke the hook for merge requests events. Defaults to
false. - Milestone
Events bool - Invoke the hook for milestone events. Defaults to
false. - Name string
- Name of the project webhook.
- Note
Events bool - Invoke the hook for note events. Defaults to
false. - Pipeline
Events bool - Invoke the hook for pipeline events. Defaults to
false. - Push
Events bool - Invoke the hook for push events. Defaults to
true. - Push
Events stringBranch Filter - Invoke the hook for push events on matching branches only.
- Releases
Events bool - Invoke the hook for release events. Defaults to
false. - Resource
Access boolToken Events - Invoke the hook for project access token expiry events. Defaults to
false. - Resource
Deploy boolToken Events - Invoke the hook for resource deploy token events. Defaults to
false. - Signing
Token string - Secret used to sign webhook payloads (HMAC-SHA256, sent as the
X-Gitlab-Signatureheader). Requires GitLab 19.0 or later (feature flagwebhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources. - Tag
Push boolEvents - Invoke the hook for tag push events. Defaults to
false. - Token string
- A token to present when invoking the hook. The token is not available for imported resources.
- Url
Variables List<Pulumi.Git Lab. Inputs. Project Hook Url Variable> - Array of sensitive portions of the webhook URL to mask.
- Vulnerability
Events bool - Invoke the hook for vulnerability events. Defaults to
false. - Wiki
Page boolEvents - Invoke the hook for wiki page events. Defaults to
false.
- Project string
- The name or id of the project to add the hook to.
- Url string
- The url of the hook to invoke. Forces re-creation to preserve
token. - Branch
Filter stringStrategy - Filter push events by branch. Valid values are:
wildcard,regex,allBranches. - Confidential
Issues boolEvents - Invoke the hook for confidential issues events. Defaults to
false. - Confidential
Note boolEvents - Invoke the hook for confidential note events. Defaults to
false. - Custom
Headers []ProjectHook Custom Header Args - Custom headers for the project webhook. Available from GitLab 17.1 onwards.
- Custom
Webhook stringTemplate - Custom webhook template.
- Deployment
Events bool - Invoke the hook for deployment events. Defaults to
false. - Description string
- Description of the webhook.
- Emoji
Events bool - Invoke the hook for emoji events. Defaults to
false. - Enable
Ssl boolVerification - Enable SSL verification when invoking the hook. Defaults to
true. - Feature
Flag boolEvents - Invoke the hook for feature flag events. Defaults to
false. - Issues
Events bool - Invoke the hook for issues events. Defaults to
false. - Job
Events bool - Invoke the hook for job events. Defaults to
false. - Merge
Requests boolEvents - Invoke the hook for merge requests events. Defaults to
false. - Milestone
Events bool - Invoke the hook for milestone events. Defaults to
false. - Name string
- Name of the project webhook.
- Note
Events bool - Invoke the hook for note events. Defaults to
false. - Pipeline
Events bool - Invoke the hook for pipeline events. Defaults to
false. - Push
Events bool - Invoke the hook for push events. Defaults to
true. - Push
Events stringBranch Filter - Invoke the hook for push events on matching branches only.
- Releases
Events bool - Invoke the hook for release events. Defaults to
false. - Resource
Access boolToken Events - Invoke the hook for project access token expiry events. Defaults to
false. - Resource
Deploy boolToken Events - Invoke the hook for resource deploy token events. Defaults to
false. - Signing
Token string - Secret used to sign webhook payloads (HMAC-SHA256, sent as the
X-Gitlab-Signatureheader). Requires GitLab 19.0 or later (feature flagwebhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources. - Tag
Push boolEvents - Invoke the hook for tag push events. Defaults to
false. - Token string
- A token to present when invoking the hook. The token is not available for imported resources.
- Url
Variables []ProjectHook Url Variable Args - Array of sensitive portions of the webhook URL to mask.
- Vulnerability
Events bool - Invoke the hook for vulnerability events. Defaults to
false. - Wiki
Page boolEvents - Invoke the hook for wiki page events. Defaults to
false.
- project string
- The name or id of the project to add the hook to.
- url string
- The url of the hook to invoke. Forces re-creation to preserve
token. - branch_
filter_ stringstrategy - Filter push events by branch. Valid values are:
wildcard,regex,allBranches. - confidential_
issues_ boolevents - Invoke the hook for confidential issues events. Defaults to
false. - confidential_
note_ boolevents - Invoke the hook for confidential note events. Defaults to
false. - custom_
headers list(object) - Custom headers for the project webhook. Available from GitLab 17.1 onwards.
- custom_
webhook_ stringtemplate - Custom webhook template.
- deployment_
events bool - Invoke the hook for deployment events. Defaults to
false. - description string
- Description of the webhook.
- emoji_
events bool - Invoke the hook for emoji events. Defaults to
false. - enable_
ssl_ boolverification - Enable SSL verification when invoking the hook. Defaults to
true. - feature_
flag_ boolevents - Invoke the hook for feature flag events. Defaults to
false. - issues_
events bool - Invoke the hook for issues events. Defaults to
false. - job_
events bool - Invoke the hook for job events. Defaults to
false. - merge_
requests_ boolevents - Invoke the hook for merge requests events. Defaults to
false. - milestone_
events bool - Invoke the hook for milestone events. Defaults to
false. - name string
- Name of the project webhook.
- note_
events bool - Invoke the hook for note events. Defaults to
false. - pipeline_
events bool - Invoke the hook for pipeline events. Defaults to
false. - push_
events bool - Invoke the hook for push events. Defaults to
true. - push_
events_ stringbranch_ filter - Invoke the hook for push events on matching branches only.
- releases_
events bool - Invoke the hook for release events. Defaults to
false. - resource_
access_ booltoken_ events - Invoke the hook for project access token expiry events. Defaults to
false. - resource_
deploy_ booltoken_ events - Invoke the hook for resource deploy token events. Defaults to
false. - signing_
token string - Secret used to sign webhook payloads (HMAC-SHA256, sent as the
X-Gitlab-Signatureheader). Requires GitLab 19.0 or later (feature flagwebhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources. - tag_
push_ boolevents - Invoke the hook for tag push events. Defaults to
false. - token string
- A token to present when invoking the hook. The token is not available for imported resources.
- url_
variables list(object) - Array of sensitive portions of the webhook URL to mask.
- vulnerability_
events bool - Invoke the hook for vulnerability events. Defaults to
false. - wiki_
page_ boolevents - Invoke the hook for wiki page events. Defaults to
false.
- project String
- The name or id of the project to add the hook to.
- url String
- The url of the hook to invoke. Forces re-creation to preserve
token. - branch
Filter StringStrategy - Filter push events by branch. Valid values are:
wildcard,regex,allBranches. - confidential
Issues BooleanEvents - Invoke the hook for confidential issues events. Defaults to
false. - confidential
Note BooleanEvents - Invoke the hook for confidential note events. Defaults to
false. - custom
Headers List<ProjectHook Custom Header> - Custom headers for the project webhook. Available from GitLab 17.1 onwards.
- custom
Webhook StringTemplate - Custom webhook template.
- deployment
Events Boolean - Invoke the hook for deployment events. Defaults to
false. - description String
- Description of the webhook.
- emoji
Events Boolean - Invoke the hook for emoji events. Defaults to
false. - enable
Ssl BooleanVerification - Enable SSL verification when invoking the hook. Defaults to
true. - feature
Flag BooleanEvents - Invoke the hook for feature flag events. Defaults to
false. - issues
Events Boolean - Invoke the hook for issues events. Defaults to
false. - job
Events Boolean - Invoke the hook for job events. Defaults to
false. - merge
Requests BooleanEvents - Invoke the hook for merge requests events. Defaults to
false. - milestone
Events Boolean - Invoke the hook for milestone events. Defaults to
false. - name String
- Name of the project webhook.
- note
Events Boolean - Invoke the hook for note events. Defaults to
false. - pipeline
Events Boolean - Invoke the hook for pipeline events. Defaults to
false. - push
Events Boolean - Invoke the hook for push events. Defaults to
true. - push
Events StringBranch Filter - Invoke the hook for push events on matching branches only.
- releases
Events Boolean - Invoke the hook for release events. Defaults to
false. - resource
Access BooleanToken Events - Invoke the hook for project access token expiry events. Defaults to
false. - resource
Deploy BooleanToken Events - Invoke the hook for resource deploy token events. Defaults to
false. - signing
Token String - Secret used to sign webhook payloads (HMAC-SHA256, sent as the
X-Gitlab-Signatureheader). Requires GitLab 19.0 or later (feature flagwebhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources. - tag
Push BooleanEvents - Invoke the hook for tag push events. Defaults to
false. - token String
- A token to present when invoking the hook. The token is not available for imported resources.
- url
Variables List<ProjectHook Url Variable> - Array of sensitive portions of the webhook URL to mask.
- vulnerability
Events Boolean - Invoke the hook for vulnerability events. Defaults to
false. - wiki
Page BooleanEvents - Invoke the hook for wiki page events. Defaults to
false.
- project string
- The name or id of the project to add the hook to.
- url string
- The url of the hook to invoke. Forces re-creation to preserve
token. - branch
Filter stringStrategy - Filter push events by branch. Valid values are:
wildcard,regex,allBranches. - confidential
Issues booleanEvents - Invoke the hook for confidential issues events. Defaults to
false. - confidential
Note booleanEvents - Invoke the hook for confidential note events. Defaults to
false. - custom
Headers ProjectHook Custom Header[] - Custom headers for the project webhook. Available from GitLab 17.1 onwards.
- custom
Webhook stringTemplate - Custom webhook template.
- deployment
Events boolean - Invoke the hook for deployment events. Defaults to
false. - description string
- Description of the webhook.
- emoji
Events boolean - Invoke the hook for emoji events. Defaults to
false. - enable
Ssl booleanVerification - Enable SSL verification when invoking the hook. Defaults to
true. - feature
Flag booleanEvents - Invoke the hook for feature flag events. Defaults to
false. - issues
Events boolean - Invoke the hook for issues events. Defaults to
false. - job
Events boolean - Invoke the hook for job events. Defaults to
false. - merge
Requests booleanEvents - Invoke the hook for merge requests events. Defaults to
false. - milestone
Events boolean - Invoke the hook for milestone events. Defaults to
false. - name string
- Name of the project webhook.
- note
Events boolean - Invoke the hook for note events. Defaults to
false. - pipeline
Events boolean - Invoke the hook for pipeline events. Defaults to
false. - push
Events boolean - Invoke the hook for push events. Defaults to
true. - push
Events stringBranch Filter - Invoke the hook for push events on matching branches only.
- releases
Events boolean - Invoke the hook for release events. Defaults to
false. - resource
Access booleanToken Events - Invoke the hook for project access token expiry events. Defaults to
false. - resource
Deploy booleanToken Events - Invoke the hook for resource deploy token events. Defaults to
false. - signing
Token string - Secret used to sign webhook payloads (HMAC-SHA256, sent as the
X-Gitlab-Signatureheader). Requires GitLab 19.0 or later (feature flagwebhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources. - tag
Push booleanEvents - Invoke the hook for tag push events. Defaults to
false. - token string
- A token to present when invoking the hook. The token is not available for imported resources.
- url
Variables ProjectHook Url Variable[] - Array of sensitive portions of the webhook URL to mask.
- vulnerability
Events boolean - Invoke the hook for vulnerability events. Defaults to
false. - wiki
Page booleanEvents - Invoke the hook for wiki page events. Defaults to
false.
- project str
- The name or id of the project to add the hook to.
- url str
- The url of the hook to invoke. Forces re-creation to preserve
token. - branch_
filter_ strstrategy - Filter push events by branch. Valid values are:
wildcard,regex,allBranches. - confidential_
issues_ boolevents - Invoke the hook for confidential issues events. Defaults to
false. - confidential_
note_ boolevents - Invoke the hook for confidential note events. Defaults to
false. - custom_
headers Sequence[ProjectHook Custom Header Args] - Custom headers for the project webhook. Available from GitLab 17.1 onwards.
- custom_
webhook_ strtemplate - Custom webhook template.
- deployment_
events bool - Invoke the hook for deployment events. Defaults to
false. - description str
- Description of the webhook.
- emoji_
events bool - Invoke the hook for emoji events. Defaults to
false. - enable_
ssl_ boolverification - Enable SSL verification when invoking the hook. Defaults to
true. - feature_
flag_ boolevents - Invoke the hook for feature flag events. Defaults to
false. - issues_
events bool - Invoke the hook for issues events. Defaults to
false. - job_
events bool - Invoke the hook for job events. Defaults to
false. - merge_
requests_ boolevents - Invoke the hook for merge requests events. Defaults to
false. - milestone_
events bool - Invoke the hook for milestone events. Defaults to
false. - name str
- Name of the project webhook.
- note_
events bool - Invoke the hook for note events. Defaults to
false. - pipeline_
events bool - Invoke the hook for pipeline events. Defaults to
false. - push_
events bool - Invoke the hook for push events. Defaults to
true. - push_
events_ strbranch_ filter - Invoke the hook for push events on matching branches only.
- releases_
events bool - Invoke the hook for release events. Defaults to
false. - resource_
access_ booltoken_ events - Invoke the hook for project access token expiry events. Defaults to
false. - resource_
deploy_ booltoken_ events - Invoke the hook for resource deploy token events. Defaults to
false. - signing_
token str - Secret used to sign webhook payloads (HMAC-SHA256, sent as the
X-Gitlab-Signatureheader). Requires GitLab 19.0 or later (feature flagwebhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources. - tag_
push_ boolevents - Invoke the hook for tag push events. Defaults to
false. - token str
- A token to present when invoking the hook. The token is not available for imported resources.
- url_
variables Sequence[ProjectHook Url Variable Args] - Array of sensitive portions of the webhook URL to mask.
- vulnerability_
events bool - Invoke the hook for vulnerability events. Defaults to
false. - wiki_
page_ boolevents - Invoke the hook for wiki page events. Defaults to
false.
- project String
- The name or id of the project to add the hook to.
- url String
- The url of the hook to invoke. Forces re-creation to preserve
token. - branch
Filter StringStrategy - Filter push events by branch. Valid values are:
wildcard,regex,allBranches. - confidential
Issues BooleanEvents - Invoke the hook for confidential issues events. Defaults to
false. - confidential
Note BooleanEvents - Invoke the hook for confidential note events. Defaults to
false. - custom
Headers List<Property Map> - Custom headers for the project webhook. Available from GitLab 17.1 onwards.
- custom
Webhook StringTemplate - Custom webhook template.
- deployment
Events Boolean - Invoke the hook for deployment events. Defaults to
false. - description String
- Description of the webhook.
- emoji
Events Boolean - Invoke the hook for emoji events. Defaults to
false. - enable
Ssl BooleanVerification - Enable SSL verification when invoking the hook. Defaults to
true. - feature
Flag BooleanEvents - Invoke the hook for feature flag events. Defaults to
false. - issues
Events Boolean - Invoke the hook for issues events. Defaults to
false. - job
Events Boolean - Invoke the hook for job events. Defaults to
false. - merge
Requests BooleanEvents - Invoke the hook for merge requests events. Defaults to
false. - milestone
Events Boolean - Invoke the hook for milestone events. Defaults to
false. - name String
- Name of the project webhook.
- note
Events Boolean - Invoke the hook for note events. Defaults to
false. - pipeline
Events Boolean - Invoke the hook for pipeline events. Defaults to
false. - push
Events Boolean - Invoke the hook for push events. Defaults to
true. - push
Events StringBranch Filter - Invoke the hook for push events on matching branches only.
- releases
Events Boolean - Invoke the hook for release events. Defaults to
false. - resource
Access BooleanToken Events - Invoke the hook for project access token expiry events. Defaults to
false. - resource
Deploy BooleanToken Events - Invoke the hook for resource deploy token events. Defaults to
false. - signing
Token String - Secret used to sign webhook payloads (HMAC-SHA256, sent as the
X-Gitlab-Signatureheader). Requires GitLab 19.0 or later (feature flagwebhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources. - tag
Push BooleanEvents - Invoke the hook for tag push events. Defaults to
false. - token String
- A token to present when invoking the hook. The token is not available for imported resources.
- url
Variables List<Property Map> - Array of sensitive portions of the webhook URL to mask.
- vulnerability
Events Boolean - Invoke the hook for vulnerability events. Defaults to
false. - wiki
Page BooleanEvents - Invoke the hook for wiki page events. Defaults to
false.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectHook resource produces the following output properties:
- Alert
Status string - Lifecycle status of the webhook. Values include
executableanddisabled. - Disabled
Until string - Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
- Hook
Id int - The id of the project hook.
- Id string
- The provider-assigned unique ID for this managed resource.
- Project
Id int - The id of the project for the hook.
- Repository
Update boolEvents - Invoke the hook for repository update events.
- Signing
Token boolPresent - Whether a
signingTokenis configured server-side. Reflects the value returned by the GitLab API.
- Alert
Status string - Lifecycle status of the webhook. Values include
executableanddisabled. - Disabled
Until string - Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
- Hook
Id int - The id of the project hook.
- Id string
- The provider-assigned unique ID for this managed resource.
- Project
Id int - The id of the project for the hook.
- Repository
Update boolEvents - Invoke the hook for repository update events.
- Signing
Token boolPresent - Whether a
signingTokenis configured server-side. Reflects the value returned by the GitLab API.
- alert_
status string - Lifecycle status of the webhook. Values include
executableanddisabled. - disabled_
until string - Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
- hook_
id number - The id of the project hook.
- id string
- The provider-assigned unique ID for this managed resource.
- project_
id number - The id of the project for the hook.
- repository_
update_ boolevents - Invoke the hook for repository update events.
- signing_
token_ boolpresent - Whether a
signingTokenis configured server-side. Reflects the value returned by the GitLab API.
- alert
Status String - Lifecycle status of the webhook. Values include
executableanddisabled. - disabled
Until String - Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
- hook
Id Integer - The id of the project hook.
- id String
- The provider-assigned unique ID for this managed resource.
- project
Id Integer - The id of the project for the hook.
- repository
Update BooleanEvents - Invoke the hook for repository update events.
- signing
Token BooleanPresent - Whether a
signingTokenis configured server-side. Reflects the value returned by the GitLab API.
- alert
Status string - Lifecycle status of the webhook. Values include
executableanddisabled. - disabled
Until string - Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
- hook
Id number - The id of the project hook.
- id string
- The provider-assigned unique ID for this managed resource.
- project
Id number - The id of the project for the hook.
- repository
Update booleanEvents - Invoke the hook for repository update events.
- signing
Token booleanPresent - Whether a
signingTokenis configured server-side. Reflects the value returned by the GitLab API.
- alert_
status str - Lifecycle status of the webhook. Values include
executableanddisabled. - disabled_
until str - Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
- hook_
id int - The id of the project hook.
- id str
- The provider-assigned unique ID for this managed resource.
- project_
id int - The id of the project for the hook.
- repository_
update_ boolevents - Invoke the hook for repository update events.
- signing_
token_ boolpresent - Whether a
signingTokenis configured server-side. Reflects the value returned by the GitLab API.
- alert
Status String - Lifecycle status of the webhook. Values include
executableanddisabled. - disabled
Until String - Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
- hook
Id Number - The id of the project hook.
- id String
- The provider-assigned unique ID for this managed resource.
- project
Id Number - The id of the project for the hook.
- repository
Update BooleanEvents - Invoke the hook for repository update events.
- signing
Token BooleanPresent - Whether a
signingTokenis configured server-side. Reflects the value returned by the GitLab API.
Look up 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,
alert_status: Optional[str] = None,
branch_filter_strategy: Optional[str] = None,
confidential_issues_events: Optional[bool] = None,
confidential_note_events: Optional[bool] = None,
custom_headers: Optional[Sequence[ProjectHookCustomHeaderArgs]] = None,
custom_webhook_template: Optional[str] = None,
deployment_events: Optional[bool] = None,
description: Optional[str] = None,
disabled_until: Optional[str] = None,
emoji_events: Optional[bool] = None,
enable_ssl_verification: Optional[bool] = None,
feature_flag_events: Optional[bool] = None,
hook_id: Optional[int] = None,
issues_events: Optional[bool] = None,
job_events: Optional[bool] = None,
merge_requests_events: Optional[bool] = None,
milestone_events: Optional[bool] = None,
name: Optional[str] = None,
note_events: Optional[bool] = None,
pipeline_events: Optional[bool] = None,
project: Optional[str] = None,
project_id: Optional[int] = None,
push_events: Optional[bool] = None,
push_events_branch_filter: Optional[str] = None,
releases_events: Optional[bool] = None,
repository_update_events: Optional[bool] = None,
resource_access_token_events: Optional[bool] = None,
resource_deploy_token_events: Optional[bool] = None,
signing_token: Optional[str] = None,
signing_token_present: Optional[bool] = None,
tag_push_events: Optional[bool] = None,
token: Optional[str] = None,
url: Optional[str] = None,
url_variables: Optional[Sequence[ProjectHookUrlVariableArgs]] = None,
vulnerability_events: Optional[bool] = None,
wiki_page_events: Optional[bool] = None) -> ProjectHookfunc 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)public static ProjectHook get(String name, Output<String> id, ProjectHookState state, CustomResourceOptions options)resources: _: type: gitlab:ProjectHook get: id: ${id}import {
to = gitlab_projecthook.example
id = "${id}"
}
- 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.
- 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.
- Alert
Status string - Lifecycle status of the webhook. Values include
executableanddisabled. - Branch
Filter stringStrategy - Filter push events by branch. Valid values are:
wildcard,regex,allBranches. - Confidential
Issues boolEvents - Invoke the hook for confidential issues events. Defaults to
false. - Confidential
Note boolEvents - Invoke the hook for confidential note events. Defaults to
false. - Custom
Headers List<Pulumi.Git Lab. Inputs. Project Hook Custom Header> - Custom headers for the project webhook. Available from GitLab 17.1 onwards.
- Custom
Webhook stringTemplate - Custom webhook template.
- Deployment
Events bool - Invoke the hook for deployment events. Defaults to
false. - Description string
- Description of the webhook.
- Disabled
Until string - Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
- Emoji
Events bool - Invoke the hook for emoji events. Defaults to
false. - Enable
Ssl boolVerification - Enable SSL verification when invoking the hook. Defaults to
true. - Feature
Flag boolEvents - Invoke the hook for feature flag events. Defaults to
false. - Hook
Id int - The id of the project hook.
- Issues
Events bool - Invoke the hook for issues events. Defaults to
false. - Job
Events bool - Invoke the hook for job events. Defaults to
false. - Merge
Requests boolEvents - Invoke the hook for merge requests events. Defaults to
false. - Milestone
Events bool - Invoke the hook for milestone events. Defaults to
false. - Name string
- Name of the project webhook.
- Note
Events bool - Invoke the hook for note events. Defaults to
false. - Pipeline
Events bool - Invoke the hook for pipeline events. Defaults to
false. - Project string
- The name or id of the project to add the hook to.
- Project
Id int - The id of the project for the hook.
- Push
Events bool - Invoke the hook for push events. Defaults to
true. - Push
Events stringBranch Filter - Invoke the hook for push events on matching branches only.
- Releases
Events bool - Invoke the hook for release events. Defaults to
false. - Repository
Update boolEvents - Invoke the hook for repository update events.
- Resource
Access boolToken Events - Invoke the hook for project access token expiry events. Defaults to
false. - Resource
Deploy boolToken Events - Invoke the hook for resource deploy token events. Defaults to
false. - Signing
Token string - Secret used to sign webhook payloads (HMAC-SHA256, sent as the
X-Gitlab-Signatureheader). Requires GitLab 19.0 or later (feature flagwebhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources. - Signing
Token boolPresent - Whether a
signingTokenis configured server-side. Reflects the value returned by the GitLab API. - Tag
Push boolEvents - Invoke the hook for tag push events. Defaults to
false. - Token string
- A token to present when invoking the hook. The token is not available for imported resources.
- Url string
- The url of the hook to invoke. Forces re-creation to preserve
token. - Url
Variables List<Pulumi.Git Lab. Inputs. Project Hook Url Variable> - Array of sensitive portions of the webhook URL to mask.
- Vulnerability
Events bool - Invoke the hook for vulnerability events. Defaults to
false. - Wiki
Page boolEvents - Invoke the hook for wiki page events. Defaults to
false.
- Alert
Status string - Lifecycle status of the webhook. Values include
executableanddisabled. - Branch
Filter stringStrategy - Filter push events by branch. Valid values are:
wildcard,regex,allBranches. - Confidential
Issues boolEvents - Invoke the hook for confidential issues events. Defaults to
false. - Confidential
Note boolEvents - Invoke the hook for confidential note events. Defaults to
false. - Custom
Headers []ProjectHook Custom Header Args - Custom headers for the project webhook. Available from GitLab 17.1 onwards.
- Custom
Webhook stringTemplate - Custom webhook template.
- Deployment
Events bool - Invoke the hook for deployment events. Defaults to
false. - Description string
- Description of the webhook.
- Disabled
Until string - Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
- Emoji
Events bool - Invoke the hook for emoji events. Defaults to
false. - Enable
Ssl boolVerification - Enable SSL verification when invoking the hook. Defaults to
true. - Feature
Flag boolEvents - Invoke the hook for feature flag events. Defaults to
false. - Hook
Id int - The id of the project hook.
- Issues
Events bool - Invoke the hook for issues events. Defaults to
false. - Job
Events bool - Invoke the hook for job events. Defaults to
false. - Merge
Requests boolEvents - Invoke the hook for merge requests events. Defaults to
false. - Milestone
Events bool - Invoke the hook for milestone events. Defaults to
false. - Name string
- Name of the project webhook.
- Note
Events bool - Invoke the hook for note events. Defaults to
false. - Pipeline
Events bool - Invoke the hook for pipeline events. Defaults to
false. - Project string
- The name or id of the project to add the hook to.
- Project
Id int - The id of the project for the hook.
- Push
Events bool - Invoke the hook for push events. Defaults to
true. - Push
Events stringBranch Filter - Invoke the hook for push events on matching branches only.
- Releases
Events bool - Invoke the hook for release events. Defaults to
false. - Repository
Update boolEvents - Invoke the hook for repository update events.
- Resource
Access boolToken Events - Invoke the hook for project access token expiry events. Defaults to
false. - Resource
Deploy boolToken Events - Invoke the hook for resource deploy token events. Defaults to
false. - Signing
Token string - Secret used to sign webhook payloads (HMAC-SHA256, sent as the
X-Gitlab-Signatureheader). Requires GitLab 19.0 or later (feature flagwebhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources. - Signing
Token boolPresent - Whether a
signingTokenis configured server-side. Reflects the value returned by the GitLab API. - Tag
Push boolEvents - Invoke the hook for tag push events. Defaults to
false. - Token string
- A token to present when invoking the hook. The token is not available for imported resources.
- Url string
- The url of the hook to invoke. Forces re-creation to preserve
token. - Url
Variables []ProjectHook Url Variable Args - Array of sensitive portions of the webhook URL to mask.
- Vulnerability
Events bool - Invoke the hook for vulnerability events. Defaults to
false. - Wiki
Page boolEvents - Invoke the hook for wiki page events. Defaults to
false.
- alert_
status string - Lifecycle status of the webhook. Values include
executableanddisabled. - branch_
filter_ stringstrategy - Filter push events by branch. Valid values are:
wildcard,regex,allBranches. - confidential_
issues_ boolevents - Invoke the hook for confidential issues events. Defaults to
false. - confidential_
note_ boolevents - Invoke the hook for confidential note events. Defaults to
false. - custom_
headers list(object) - Custom headers for the project webhook. Available from GitLab 17.1 onwards.
- custom_
webhook_ stringtemplate - Custom webhook template.
- deployment_
events bool - Invoke the hook for deployment events. Defaults to
false. - description string
- Description of the webhook.
- disabled_
until string - Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
- emoji_
events bool - Invoke the hook for emoji events. Defaults to
false. - enable_
ssl_ boolverification - Enable SSL verification when invoking the hook. Defaults to
true. - feature_
flag_ boolevents - Invoke the hook for feature flag events. Defaults to
false. - hook_
id number - The id of the project hook.
- issues_
events bool - Invoke the hook for issues events. Defaults to
false. - job_
events bool - Invoke the hook for job events. Defaults to
false. - merge_
requests_ boolevents - Invoke the hook for merge requests events. Defaults to
false. - milestone_
events bool - Invoke the hook for milestone events. Defaults to
false. - name string
- Name of the project webhook.
- note_
events bool - Invoke the hook for note events. Defaults to
false. - pipeline_
events bool - Invoke the hook for pipeline events. Defaults to
false. - project string
- The name or id of the project to add the hook to.
- project_
id number - The id of the project for the hook.
- push_
events bool - Invoke the hook for push events. Defaults to
true. - push_
events_ stringbranch_ filter - Invoke the hook for push events on matching branches only.
- releases_
events bool - Invoke the hook for release events. Defaults to
false. - repository_
update_ boolevents - Invoke the hook for repository update events.
- resource_
access_ booltoken_ events - Invoke the hook for project access token expiry events. Defaults to
false. - resource_
deploy_ booltoken_ events - Invoke the hook for resource deploy token events. Defaults to
false. - signing_
token string - Secret used to sign webhook payloads (HMAC-SHA256, sent as the
X-Gitlab-Signatureheader). Requires GitLab 19.0 or later (feature flagwebhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources. - signing_
token_ boolpresent - Whether a
signingTokenis configured server-side. Reflects the value returned by the GitLab API. - tag_
push_ boolevents - Invoke the hook for tag push events. Defaults to
false. - token string
- A token to present when invoking the hook. The token is not available for imported resources.
- url string
- The url of the hook to invoke. Forces re-creation to preserve
token. - url_
variables list(object) - Array of sensitive portions of the webhook URL to mask.
- vulnerability_
events bool - Invoke the hook for vulnerability events. Defaults to
false. - wiki_
page_ boolevents - Invoke the hook for wiki page events. Defaults to
false.
- alert
Status String - Lifecycle status of the webhook. Values include
executableanddisabled. - branch
Filter StringStrategy - Filter push events by branch. Valid values are:
wildcard,regex,allBranches. - confidential
Issues BooleanEvents - Invoke the hook for confidential issues events. Defaults to
false. - confidential
Note BooleanEvents - Invoke the hook for confidential note events. Defaults to
false. - custom
Headers List<ProjectHook Custom Header> - Custom headers for the project webhook. Available from GitLab 17.1 onwards.
- custom
Webhook StringTemplate - Custom webhook template.
- deployment
Events Boolean - Invoke the hook for deployment events. Defaults to
false. - description String
- Description of the webhook.
- disabled
Until String - Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
- emoji
Events Boolean - Invoke the hook for emoji events. Defaults to
false. - enable
Ssl BooleanVerification - Enable SSL verification when invoking the hook. Defaults to
true. - feature
Flag BooleanEvents - Invoke the hook for feature flag events. Defaults to
false. - hook
Id Integer - The id of the project hook.
- issues
Events Boolean - Invoke the hook for issues events. Defaults to
false. - job
Events Boolean - Invoke the hook for job events. Defaults to
false. - merge
Requests BooleanEvents - Invoke the hook for merge requests events. Defaults to
false. - milestone
Events Boolean - Invoke the hook for milestone events. Defaults to
false. - name String
- Name of the project webhook.
- note
Events Boolean - Invoke the hook for note events. Defaults to
false. - pipeline
Events Boolean - Invoke the hook for pipeline events. Defaults to
false. - project String
- The name or id of the project to add the hook to.
- project
Id Integer - The id of the project for the hook.
- push
Events Boolean - Invoke the hook for push events. Defaults to
true. - push
Events StringBranch Filter - Invoke the hook for push events on matching branches only.
- releases
Events Boolean - Invoke the hook for release events. Defaults to
false. - repository
Update BooleanEvents - Invoke the hook for repository update events.
- resource
Access BooleanToken Events - Invoke the hook for project access token expiry events. Defaults to
false. - resource
Deploy BooleanToken Events - Invoke the hook for resource deploy token events. Defaults to
false. - signing
Token String - Secret used to sign webhook payloads (HMAC-SHA256, sent as the
X-Gitlab-Signatureheader). Requires GitLab 19.0 or later (feature flagwebhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources. - signing
Token BooleanPresent - Whether a
signingTokenis configured server-side. Reflects the value returned by the GitLab API. - tag
Push BooleanEvents - Invoke the hook for tag push events. Defaults to
false. - token String
- A token to present when invoking the hook. The token is not available for imported resources.
- url String
- The url of the hook to invoke. Forces re-creation to preserve
token. - url
Variables List<ProjectHook Url Variable> - Array of sensitive portions of the webhook URL to mask.
- vulnerability
Events Boolean - Invoke the hook for vulnerability events. Defaults to
false. - wiki
Page BooleanEvents - Invoke the hook for wiki page events. Defaults to
false.
- alert
Status string - Lifecycle status of the webhook. Values include
executableanddisabled. - branch
Filter stringStrategy - Filter push events by branch. Valid values are:
wildcard,regex,allBranches. - confidential
Issues booleanEvents - Invoke the hook for confidential issues events. Defaults to
false. - confidential
Note booleanEvents - Invoke the hook for confidential note events. Defaults to
false. - custom
Headers ProjectHook Custom Header[] - Custom headers for the project webhook. Available from GitLab 17.1 onwards.
- custom
Webhook stringTemplate - Custom webhook template.
- deployment
Events boolean - Invoke the hook for deployment events. Defaults to
false. - description string
- Description of the webhook.
- disabled
Until string - Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
- emoji
Events boolean - Invoke the hook for emoji events. Defaults to
false. - enable
Ssl booleanVerification - Enable SSL verification when invoking the hook. Defaults to
true. - feature
Flag booleanEvents - Invoke the hook for feature flag events. Defaults to
false. - hook
Id number - The id of the project hook.
- issues
Events boolean - Invoke the hook for issues events. Defaults to
false. - job
Events boolean - Invoke the hook for job events. Defaults to
false. - merge
Requests booleanEvents - Invoke the hook for merge requests events. Defaults to
false. - milestone
Events boolean - Invoke the hook for milestone events. Defaults to
false. - name string
- Name of the project webhook.
- note
Events boolean - Invoke the hook for note events. Defaults to
false. - pipeline
Events boolean - Invoke the hook for pipeline events. Defaults to
false. - project string
- The name or id of the project to add the hook to.
- project
Id number - The id of the project for the hook.
- push
Events boolean - Invoke the hook for push events. Defaults to
true. - push
Events stringBranch Filter - Invoke the hook for push events on matching branches only.
- releases
Events boolean - Invoke the hook for release events. Defaults to
false. - repository
Update booleanEvents - Invoke the hook for repository update events.
- resource
Access booleanToken Events - Invoke the hook for project access token expiry events. Defaults to
false. - resource
Deploy booleanToken Events - Invoke the hook for resource deploy token events. Defaults to
false. - signing
Token string - Secret used to sign webhook payloads (HMAC-SHA256, sent as the
X-Gitlab-Signatureheader). Requires GitLab 19.0 or later (feature flagwebhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources. - signing
Token booleanPresent - Whether a
signingTokenis configured server-side. Reflects the value returned by the GitLab API. - tag
Push booleanEvents - Invoke the hook for tag push events. Defaults to
false. - token string
- A token to present when invoking the hook. The token is not available for imported resources.
- url string
- The url of the hook to invoke. Forces re-creation to preserve
token. - url
Variables ProjectHook Url Variable[] - Array of sensitive portions of the webhook URL to mask.
- vulnerability
Events boolean - Invoke the hook for vulnerability events. Defaults to
false. - wiki
Page booleanEvents - Invoke the hook for wiki page events. Defaults to
false.
- alert_
status str - Lifecycle status of the webhook. Values include
executableanddisabled. - branch_
filter_ strstrategy - Filter push events by branch. Valid values are:
wildcard,regex,allBranches. - confidential_
issues_ boolevents - Invoke the hook for confidential issues events. Defaults to
false. - confidential_
note_ boolevents - Invoke the hook for confidential note events. Defaults to
false. - custom_
headers Sequence[ProjectHook Custom Header Args] - Custom headers for the project webhook. Available from GitLab 17.1 onwards.
- custom_
webhook_ strtemplate - Custom webhook template.
- deployment_
events bool - Invoke the hook for deployment events. Defaults to
false. - description str
- Description of the webhook.
- disabled_
until str - Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
- emoji_
events bool - Invoke the hook for emoji events. Defaults to
false. - enable_
ssl_ boolverification - Enable SSL verification when invoking the hook. Defaults to
true. - feature_
flag_ boolevents - Invoke the hook for feature flag events. Defaults to
false. - hook_
id int - The id of the project hook.
- issues_
events bool - Invoke the hook for issues events. Defaults to
false. - job_
events bool - Invoke the hook for job events. Defaults to
false. - merge_
requests_ boolevents - Invoke the hook for merge requests events. Defaults to
false. - milestone_
events bool - Invoke the hook for milestone events. Defaults to
false. - name str
- Name of the project webhook.
- note_
events bool - Invoke the hook for note events. Defaults to
false. - pipeline_
events bool - Invoke the hook for pipeline events. Defaults to
false. - project str
- The name or id of the project to add the hook to.
- project_
id int - The id of the project for the hook.
- push_
events bool - Invoke the hook for push events. Defaults to
true. - push_
events_ strbranch_ filter - Invoke the hook for push events on matching branches only.
- releases_
events bool - Invoke the hook for release events. Defaults to
false. - repository_
update_ boolevents - Invoke the hook for repository update events.
- resource_
access_ booltoken_ events - Invoke the hook for project access token expiry events. Defaults to
false. - resource_
deploy_ booltoken_ events - Invoke the hook for resource deploy token events. Defaults to
false. - signing_
token str - Secret used to sign webhook payloads (HMAC-SHA256, sent as the
X-Gitlab-Signatureheader). Requires GitLab 19.0 or later (feature flagwebhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources. - signing_
token_ boolpresent - Whether a
signingTokenis configured server-side. Reflects the value returned by the GitLab API. - tag_
push_ boolevents - Invoke the hook for tag push events. Defaults to
false. - token str
- A token to present when invoking the hook. The token is not available for imported resources.
- url str
- The url of the hook to invoke. Forces re-creation to preserve
token. - url_
variables Sequence[ProjectHook Url Variable Args] - Array of sensitive portions of the webhook URL to mask.
- vulnerability_
events bool - Invoke the hook for vulnerability events. Defaults to
false. - wiki_
page_ boolevents - Invoke the hook for wiki page events. Defaults to
false.
- alert
Status String - Lifecycle status of the webhook. Values include
executableanddisabled. - branch
Filter StringStrategy - Filter push events by branch. Valid values are:
wildcard,regex,allBranches. - confidential
Issues BooleanEvents - Invoke the hook for confidential issues events. Defaults to
false. - confidential
Note BooleanEvents - Invoke the hook for confidential note events. Defaults to
false. - custom
Headers List<Property Map> - Custom headers for the project webhook. Available from GitLab 17.1 onwards.
- custom
Webhook StringTemplate - Custom webhook template.
- deployment
Events Boolean - Invoke the hook for deployment events. Defaults to
false. - description String
- Description of the webhook.
- disabled
Until String - Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
- emoji
Events Boolean - Invoke the hook for emoji events. Defaults to
false. - enable
Ssl BooleanVerification - Enable SSL verification when invoking the hook. Defaults to
true. - feature
Flag BooleanEvents - Invoke the hook for feature flag events. Defaults to
false. - hook
Id Number - The id of the project hook.
- issues
Events Boolean - Invoke the hook for issues events. Defaults to
false. - job
Events Boolean - Invoke the hook for job events. Defaults to
false. - merge
Requests BooleanEvents - Invoke the hook for merge requests events. Defaults to
false. - milestone
Events Boolean - Invoke the hook for milestone events. Defaults to
false. - name String
- Name of the project webhook.
- note
Events Boolean - Invoke the hook for note events. Defaults to
false. - pipeline
Events Boolean - Invoke the hook for pipeline events. Defaults to
false. - project String
- The name or id of the project to add the hook to.
- project
Id Number - The id of the project for the hook.
- push
Events Boolean - Invoke the hook for push events. Defaults to
true. - push
Events StringBranch Filter - Invoke the hook for push events on matching branches only.
- releases
Events Boolean - Invoke the hook for release events. Defaults to
false. - repository
Update BooleanEvents - Invoke the hook for repository update events.
- resource
Access BooleanToken Events - Invoke the hook for project access token expiry events. Defaults to
false. - resource
Deploy BooleanToken Events - Invoke the hook for resource deploy token events. Defaults to
false. - signing
Token String - Secret used to sign webhook payloads (HMAC-SHA256, sent as the
X-Gitlab-Signatureheader). Requires GitLab 19.0 or later (feature flagwebhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources. - signing
Token BooleanPresent - Whether a
signingTokenis configured server-side. Reflects the value returned by the GitLab API. - tag
Push BooleanEvents - Invoke the hook for tag push events. Defaults to
false. - token String
- A token to present when invoking the hook. The token is not available for imported resources.
- url String
- The url of the hook to invoke. Forces re-creation to preserve
token. - url
Variables List<Property Map> - Array of sensitive portions of the webhook URL to mask.
- vulnerability
Events Boolean - Invoke the hook for vulnerability events. Defaults to
false. - wiki
Page BooleanEvents - Invoke the hook for wiki page events. Defaults to
false.
Supporting Types
ProjectHookCustomHeader, ProjectHookCustomHeaderArgs
ProjectHookUrlVariable, ProjectHookUrlVariableArgs
Import
Starting in Terraform v1.5.0, you can use an import block to import gitlab.ProjectHook. For example:
Importing using the CLI is supported with the following syntax:
A GitLab Project Hook can be imported using a key composed of <project>:<hook-id>, for example:
$ pulumi import gitlab:index/projectHook:ProjectHook example "12345:1"
Where project may be the product ID or path with namespace depending on what you have in your config.
NOTE: the token resource attribute is not available for imported resources as this information cannot be read from the GitLab API.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- GitLab pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
gitlabTerraform Provider.
published on Friday, Jun 26, 2026 by Pulumi