1. Packages
  2. Packages
  3. Gitlab Provider
  4. API Docs
  5. ProjectHook
Viewing docs for GitLab v10.0.0
published on Friday, Jun 26, 2026 by Pulumi
gitlab logo
Viewing docs for GitLab v10.0.0
published on Friday, Jun 26, 2026 by Pulumi

    The gitlab.ProjectHook resource manages the lifecycle of a project hook.

    Note that pushEvents defaults to true.

    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.
    BranchFilterStrategy string
    Filter push events by branch. Valid values are: wildcard, regex, allBranches.
    ConfidentialIssuesEvents bool
    Invoke the hook for confidential issues events. Defaults to false.
    ConfidentialNoteEvents bool
    Invoke the hook for confidential note events. Defaults to false.
    CustomHeaders List<Pulumi.GitLab.Inputs.ProjectHookCustomHeader>
    Custom headers for the project webhook. Available from GitLab 17.1 onwards.
    CustomWebhookTemplate string
    Custom webhook template.
    DeploymentEvents bool
    Invoke the hook for deployment events. Defaults to false.
    Description string
    Description of the webhook.
    EmojiEvents bool
    Invoke the hook for emoji events. Defaults to false.
    EnableSslVerification bool
    Enable SSL verification when invoking the hook. Defaults to true.
    FeatureFlagEvents bool
    Invoke the hook for feature flag events. Defaults to false.
    IssuesEvents bool
    Invoke the hook for issues events. Defaults to false.
    JobEvents bool
    Invoke the hook for job events. Defaults to false.
    MergeRequestsEvents bool
    Invoke the hook for merge requests events. Defaults to false.
    MilestoneEvents bool
    Invoke the hook for milestone events. Defaults to false.
    Name string
    Name of the project webhook.
    NoteEvents bool
    Invoke the hook for note events. Defaults to false.
    PipelineEvents bool
    Invoke the hook for pipeline events. Defaults to false.
    PushEvents bool
    Invoke the hook for push events. Defaults to true.
    PushEventsBranchFilter string
    Invoke the hook for push events on matching branches only.
    ReleasesEvents bool
    Invoke the hook for release events. Defaults to false.
    ResourceAccessTokenEvents bool
    Invoke the hook for project access token expiry events. Defaults to false.
    ResourceDeployTokenEvents bool
    Invoke the hook for resource deploy token events. Defaults to false.
    SigningToken string
    Secret used to sign webhook payloads (HMAC-SHA256, sent as the X-Gitlab-Signature header). Requires GitLab 19.0 or later (feature flag webhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources.
    TagPushEvents bool
    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.
    UrlVariables List<Pulumi.GitLab.Inputs.ProjectHookUrlVariable>
    Array of sensitive portions of the webhook URL to mask.
    VulnerabilityEvents bool
    Invoke the hook for vulnerability events. Defaults to false.
    WikiPageEvents bool
    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.
    BranchFilterStrategy string
    Filter push events by branch. Valid values are: wildcard, regex, allBranches.
    ConfidentialIssuesEvents bool
    Invoke the hook for confidential issues events. Defaults to false.
    ConfidentialNoteEvents bool
    Invoke the hook for confidential note events. Defaults to false.
    CustomHeaders []ProjectHookCustomHeaderArgs
    Custom headers for the project webhook. Available from GitLab 17.1 onwards.
    CustomWebhookTemplate string
    Custom webhook template.
    DeploymentEvents bool
    Invoke the hook for deployment events. Defaults to false.
    Description string
    Description of the webhook.
    EmojiEvents bool
    Invoke the hook for emoji events. Defaults to false.
    EnableSslVerification bool
    Enable SSL verification when invoking the hook. Defaults to true.
    FeatureFlagEvents bool
    Invoke the hook for feature flag events. Defaults to false.
    IssuesEvents bool
    Invoke the hook for issues events. Defaults to false.
    JobEvents bool
    Invoke the hook for job events. Defaults to false.
    MergeRequestsEvents bool
    Invoke the hook for merge requests events. Defaults to false.
    MilestoneEvents bool
    Invoke the hook for milestone events. Defaults to false.
    Name string
    Name of the project webhook.
    NoteEvents bool
    Invoke the hook for note events. Defaults to false.
    PipelineEvents bool
    Invoke the hook for pipeline events. Defaults to false.
    PushEvents bool
    Invoke the hook for push events. Defaults to true.
    PushEventsBranchFilter string
    Invoke the hook for push events on matching branches only.
    ReleasesEvents bool
    Invoke the hook for release events. Defaults to false.
    ResourceAccessTokenEvents bool
    Invoke the hook for project access token expiry events. Defaults to false.
    ResourceDeployTokenEvents bool
    Invoke the hook for resource deploy token events. Defaults to false.
    SigningToken string
    Secret used to sign webhook payloads (HMAC-SHA256, sent as the X-Gitlab-Signature header). Requires GitLab 19.0 or later (feature flag webhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources.
    TagPushEvents bool
    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.
    UrlVariables []ProjectHookUrlVariableArgs
    Array of sensitive portions of the webhook URL to mask.
    VulnerabilityEvents bool
    Invoke the hook for vulnerability events. Defaults to false.
    WikiPageEvents bool
    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_strategy string
    Filter push events by branch. Valid values are: wildcard, regex, allBranches.
    confidential_issues_events bool
    Invoke the hook for confidential issues events. Defaults to false.
    confidential_note_events bool
    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_template string
    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_verification bool
    Enable SSL verification when invoking the hook. Defaults to true.
    feature_flag_events bool
    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_events bool
    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_branch_filter string
    Invoke the hook for push events on matching branches only.
    releases_events bool
    Invoke the hook for release events. Defaults to false.
    resource_access_token_events bool
    Invoke the hook for project access token expiry events. Defaults to false.
    resource_deploy_token_events bool
    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-Signature header). Requires GitLab 19.0 or later (feature flag webhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources.
    tag_push_events bool
    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_events bool
    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.
    branchFilterStrategy String
    Filter push events by branch. Valid values are: wildcard, regex, allBranches.
    confidentialIssuesEvents Boolean
    Invoke the hook for confidential issues events. Defaults to false.
    confidentialNoteEvents Boolean
    Invoke the hook for confidential note events. Defaults to false.
    customHeaders List<ProjectHookCustomHeader>
    Custom headers for the project webhook. Available from GitLab 17.1 onwards.
    customWebhookTemplate String
    Custom webhook template.
    deploymentEvents Boolean
    Invoke the hook for deployment events. Defaults to false.
    description String
    Description of the webhook.
    emojiEvents Boolean
    Invoke the hook for emoji events. Defaults to false.
    enableSslVerification Boolean
    Enable SSL verification when invoking the hook. Defaults to true.
    featureFlagEvents Boolean
    Invoke the hook for feature flag events. Defaults to false.
    issuesEvents Boolean
    Invoke the hook for issues events. Defaults to false.
    jobEvents Boolean
    Invoke the hook for job events. Defaults to false.
    mergeRequestsEvents Boolean
    Invoke the hook for merge requests events. Defaults to false.
    milestoneEvents Boolean
    Invoke the hook for milestone events. Defaults to false.
    name String
    Name of the project webhook.
    noteEvents Boolean
    Invoke the hook for note events. Defaults to false.
    pipelineEvents Boolean
    Invoke the hook for pipeline events. Defaults to false.
    pushEvents Boolean
    Invoke the hook for push events. Defaults to true.
    pushEventsBranchFilter String
    Invoke the hook for push events on matching branches only.
    releasesEvents Boolean
    Invoke the hook for release events. Defaults to false.
    resourceAccessTokenEvents Boolean
    Invoke the hook for project access token expiry events. Defaults to false.
    resourceDeployTokenEvents Boolean
    Invoke the hook for resource deploy token events. Defaults to false.
    signingToken String
    Secret used to sign webhook payloads (HMAC-SHA256, sent as the X-Gitlab-Signature header). Requires GitLab 19.0 or later (feature flag webhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources.
    tagPushEvents Boolean
    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.
    urlVariables List<ProjectHookUrlVariable>
    Array of sensitive portions of the webhook URL to mask.
    vulnerabilityEvents Boolean
    Invoke the hook for vulnerability events. Defaults to false.
    wikiPageEvents Boolean
    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.
    branchFilterStrategy string
    Filter push events by branch. Valid values are: wildcard, regex, allBranches.
    confidentialIssuesEvents boolean
    Invoke the hook for confidential issues events. Defaults to false.
    confidentialNoteEvents boolean
    Invoke the hook for confidential note events. Defaults to false.
    customHeaders ProjectHookCustomHeader[]
    Custom headers for the project webhook. Available from GitLab 17.1 onwards.
    customWebhookTemplate string
    Custom webhook template.
    deploymentEvents boolean
    Invoke the hook for deployment events. Defaults to false.
    description string
    Description of the webhook.
    emojiEvents boolean
    Invoke the hook for emoji events. Defaults to false.
    enableSslVerification boolean
    Enable SSL verification when invoking the hook. Defaults to true.
    featureFlagEvents boolean
    Invoke the hook for feature flag events. Defaults to false.
    issuesEvents boolean
    Invoke the hook for issues events. Defaults to false.
    jobEvents boolean
    Invoke the hook for job events. Defaults to false.
    mergeRequestsEvents boolean
    Invoke the hook for merge requests events. Defaults to false.
    milestoneEvents boolean
    Invoke the hook for milestone events. Defaults to false.
    name string
    Name of the project webhook.
    noteEvents boolean
    Invoke the hook for note events. Defaults to false.
    pipelineEvents boolean
    Invoke the hook for pipeline events. Defaults to false.
    pushEvents boolean
    Invoke the hook for push events. Defaults to true.
    pushEventsBranchFilter string
    Invoke the hook for push events on matching branches only.
    releasesEvents boolean
    Invoke the hook for release events. Defaults to false.
    resourceAccessTokenEvents boolean
    Invoke the hook for project access token expiry events. Defaults to false.
    resourceDeployTokenEvents boolean
    Invoke the hook for resource deploy token events. Defaults to false.
    signingToken string
    Secret used to sign webhook payloads (HMAC-SHA256, sent as the X-Gitlab-Signature header). Requires GitLab 19.0 or later (feature flag webhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources.
    tagPushEvents boolean
    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.
    urlVariables ProjectHookUrlVariable[]
    Array of sensitive portions of the webhook URL to mask.
    vulnerabilityEvents boolean
    Invoke the hook for vulnerability events. Defaults to false.
    wikiPageEvents boolean
    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_strategy str
    Filter push events by branch. Valid values are: wildcard, regex, allBranches.
    confidential_issues_events bool
    Invoke the hook for confidential issues events. Defaults to false.
    confidential_note_events bool
    Invoke the hook for confidential note events. Defaults to false.
    custom_headers Sequence[ProjectHookCustomHeaderArgs]
    Custom headers for the project webhook. Available from GitLab 17.1 onwards.
    custom_webhook_template str
    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_verification bool
    Enable SSL verification when invoking the hook. Defaults to true.
    feature_flag_events bool
    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_events bool
    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_branch_filter str
    Invoke the hook for push events on matching branches only.
    releases_events bool
    Invoke the hook for release events. Defaults to false.
    resource_access_token_events bool
    Invoke the hook for project access token expiry events. Defaults to false.
    resource_deploy_token_events bool
    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-Signature header). Requires GitLab 19.0 or later (feature flag webhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources.
    tag_push_events bool
    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[ProjectHookUrlVariableArgs]
    Array of sensitive portions of the webhook URL to mask.
    vulnerability_events bool
    Invoke the hook for vulnerability events. Defaults to false.
    wiki_page_events bool
    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.
    branchFilterStrategy String
    Filter push events by branch. Valid values are: wildcard, regex, allBranches.
    confidentialIssuesEvents Boolean
    Invoke the hook for confidential issues events. Defaults to false.
    confidentialNoteEvents Boolean
    Invoke the hook for confidential note events. Defaults to false.
    customHeaders List<Property Map>
    Custom headers for the project webhook. Available from GitLab 17.1 onwards.
    customWebhookTemplate String
    Custom webhook template.
    deploymentEvents Boolean
    Invoke the hook for deployment events. Defaults to false.
    description String
    Description of the webhook.
    emojiEvents Boolean
    Invoke the hook for emoji events. Defaults to false.
    enableSslVerification Boolean
    Enable SSL verification when invoking the hook. Defaults to true.
    featureFlagEvents Boolean
    Invoke the hook for feature flag events. Defaults to false.
    issuesEvents Boolean
    Invoke the hook for issues events. Defaults to false.
    jobEvents Boolean
    Invoke the hook for job events. Defaults to false.
    mergeRequestsEvents Boolean
    Invoke the hook for merge requests events. Defaults to false.
    milestoneEvents Boolean
    Invoke the hook for milestone events. Defaults to false.
    name String
    Name of the project webhook.
    noteEvents Boolean
    Invoke the hook for note events. Defaults to false.
    pipelineEvents Boolean
    Invoke the hook for pipeline events. Defaults to false.
    pushEvents Boolean
    Invoke the hook for push events. Defaults to true.
    pushEventsBranchFilter String
    Invoke the hook for push events on matching branches only.
    releasesEvents Boolean
    Invoke the hook for release events. Defaults to false.
    resourceAccessTokenEvents Boolean
    Invoke the hook for project access token expiry events. Defaults to false.
    resourceDeployTokenEvents Boolean
    Invoke the hook for resource deploy token events. Defaults to false.
    signingToken String
    Secret used to sign webhook payloads (HMAC-SHA256, sent as the X-Gitlab-Signature header). Requires GitLab 19.0 or later (feature flag webhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources.
    tagPushEvents Boolean
    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.
    urlVariables List<Property Map>
    Array of sensitive portions of the webhook URL to mask.
    vulnerabilityEvents Boolean
    Invoke the hook for vulnerability events. Defaults to false.
    wikiPageEvents Boolean
    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:

    AlertStatus string
    Lifecycle status of the webhook. Values include executable and disabled.
    DisabledUntil string
    Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
    HookId int
    The id of the project hook.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectId int
    The id of the project for the hook.
    RepositoryUpdateEvents bool
    Invoke the hook for repository update events.
    SigningTokenPresent bool
    Whether a signingToken is configured server-side. Reflects the value returned by the GitLab API.
    AlertStatus string
    Lifecycle status of the webhook. Values include executable and disabled.
    DisabledUntil string
    Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
    HookId int
    The id of the project hook.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectId int
    The id of the project for the hook.
    RepositoryUpdateEvents bool
    Invoke the hook for repository update events.
    SigningTokenPresent bool
    Whether a signingToken is configured server-side. Reflects the value returned by the GitLab API.
    alert_status string
    Lifecycle status of the webhook. Values include executable and disabled.
    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_events bool
    Invoke the hook for repository update events.
    signing_token_present bool
    Whether a signingToken is configured server-side. Reflects the value returned by the GitLab API.
    alertStatus String
    Lifecycle status of the webhook. Values include executable and disabled.
    disabledUntil String
    Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
    hookId Integer
    The id of the project hook.
    id String
    The provider-assigned unique ID for this managed resource.
    projectId Integer
    The id of the project for the hook.
    repositoryUpdateEvents Boolean
    Invoke the hook for repository update events.
    signingTokenPresent Boolean
    Whether a signingToken is configured server-side. Reflects the value returned by the GitLab API.
    alertStatus string
    Lifecycle status of the webhook. Values include executable and disabled.
    disabledUntil string
    Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
    hookId number
    The id of the project hook.
    id string
    The provider-assigned unique ID for this managed resource.
    projectId number
    The id of the project for the hook.
    repositoryUpdateEvents boolean
    Invoke the hook for repository update events.
    signingTokenPresent boolean
    Whether a signingToken is configured server-side. Reflects the value returned by the GitLab API.
    alert_status str
    Lifecycle status of the webhook. Values include executable and disabled.
    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_events bool
    Invoke the hook for repository update events.
    signing_token_present bool
    Whether a signingToken is configured server-side. Reflects the value returned by the GitLab API.
    alertStatus String
    Lifecycle status of the webhook. Values include executable and disabled.
    disabledUntil String
    Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
    hookId Number
    The id of the project hook.
    id String
    The provider-assigned unique ID for this managed resource.
    projectId Number
    The id of the project for the hook.
    repositoryUpdateEvents Boolean
    Invoke the hook for repository update events.
    signingTokenPresent Boolean
    Whether a signingToken is 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) -> 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)
    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.
    The following state arguments are supported:
    AlertStatus string
    Lifecycle status of the webhook. Values include executable and disabled.
    BranchFilterStrategy string
    Filter push events by branch. Valid values are: wildcard, regex, allBranches.
    ConfidentialIssuesEvents bool
    Invoke the hook for confidential issues events. Defaults to false.
    ConfidentialNoteEvents bool
    Invoke the hook for confidential note events. Defaults to false.
    CustomHeaders List<Pulumi.GitLab.Inputs.ProjectHookCustomHeader>
    Custom headers for the project webhook. Available from GitLab 17.1 onwards.
    CustomWebhookTemplate string
    Custom webhook template.
    DeploymentEvents bool
    Invoke the hook for deployment events. Defaults to false.
    Description string
    Description of the webhook.
    DisabledUntil string
    Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
    EmojiEvents bool
    Invoke the hook for emoji events. Defaults to false.
    EnableSslVerification bool
    Enable SSL verification when invoking the hook. Defaults to true.
    FeatureFlagEvents bool
    Invoke the hook for feature flag events. Defaults to false.
    HookId int
    The id of the project hook.
    IssuesEvents bool
    Invoke the hook for issues events. Defaults to false.
    JobEvents bool
    Invoke the hook for job events. Defaults to false.
    MergeRequestsEvents bool
    Invoke the hook for merge requests events. Defaults to false.
    MilestoneEvents bool
    Invoke the hook for milestone events. Defaults to false.
    Name string
    Name of the project webhook.
    NoteEvents bool
    Invoke the hook for note events. Defaults to false.
    PipelineEvents bool
    Invoke the hook for pipeline events. Defaults to false.
    Project string
    The name or id of the project to add the hook to.
    ProjectId int
    The id of the project for the hook.
    PushEvents bool
    Invoke the hook for push events. Defaults to true.
    PushEventsBranchFilter string
    Invoke the hook for push events on matching branches only.
    ReleasesEvents bool
    Invoke the hook for release events. Defaults to false.
    RepositoryUpdateEvents bool
    Invoke the hook for repository update events.
    ResourceAccessTokenEvents bool
    Invoke the hook for project access token expiry events. Defaults to false.
    ResourceDeployTokenEvents bool
    Invoke the hook for resource deploy token events. Defaults to false.
    SigningToken string
    Secret used to sign webhook payloads (HMAC-SHA256, sent as the X-Gitlab-Signature header). Requires GitLab 19.0 or later (feature flag webhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources.
    SigningTokenPresent bool
    Whether a signingToken is configured server-side. Reflects the value returned by the GitLab API.
    TagPushEvents bool
    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.
    UrlVariables List<Pulumi.GitLab.Inputs.ProjectHookUrlVariable>
    Array of sensitive portions of the webhook URL to mask.
    VulnerabilityEvents bool
    Invoke the hook for vulnerability events. Defaults to false.
    WikiPageEvents bool
    Invoke the hook for wiki page events. Defaults to false.
    AlertStatus string
    Lifecycle status of the webhook. Values include executable and disabled.
    BranchFilterStrategy string
    Filter push events by branch. Valid values are: wildcard, regex, allBranches.
    ConfidentialIssuesEvents bool
    Invoke the hook for confidential issues events. Defaults to false.
    ConfidentialNoteEvents bool
    Invoke the hook for confidential note events. Defaults to false.
    CustomHeaders []ProjectHookCustomHeaderArgs
    Custom headers for the project webhook. Available from GitLab 17.1 onwards.
    CustomWebhookTemplate string
    Custom webhook template.
    DeploymentEvents bool
    Invoke the hook for deployment events. Defaults to false.
    Description string
    Description of the webhook.
    DisabledUntil string
    Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
    EmojiEvents bool
    Invoke the hook for emoji events. Defaults to false.
    EnableSslVerification bool
    Enable SSL verification when invoking the hook. Defaults to true.
    FeatureFlagEvents bool
    Invoke the hook for feature flag events. Defaults to false.
    HookId int
    The id of the project hook.
    IssuesEvents bool
    Invoke the hook for issues events. Defaults to false.
    JobEvents bool
    Invoke the hook for job events. Defaults to false.
    MergeRequestsEvents bool
    Invoke the hook for merge requests events. Defaults to false.
    MilestoneEvents bool
    Invoke the hook for milestone events. Defaults to false.
    Name string
    Name of the project webhook.
    NoteEvents bool
    Invoke the hook for note events. Defaults to false.
    PipelineEvents bool
    Invoke the hook for pipeline events. Defaults to false.
    Project string
    The name or id of the project to add the hook to.
    ProjectId int
    The id of the project for the hook.
    PushEvents bool
    Invoke the hook for push events. Defaults to true.
    PushEventsBranchFilter string
    Invoke the hook for push events on matching branches only.
    ReleasesEvents bool
    Invoke the hook for release events. Defaults to false.
    RepositoryUpdateEvents bool
    Invoke the hook for repository update events.
    ResourceAccessTokenEvents bool
    Invoke the hook for project access token expiry events. Defaults to false.
    ResourceDeployTokenEvents bool
    Invoke the hook for resource deploy token events. Defaults to false.
    SigningToken string
    Secret used to sign webhook payloads (HMAC-SHA256, sent as the X-Gitlab-Signature header). Requires GitLab 19.0 or later (feature flag webhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources.
    SigningTokenPresent bool
    Whether a signingToken is configured server-side. Reflects the value returned by the GitLab API.
    TagPushEvents bool
    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.
    UrlVariables []ProjectHookUrlVariableArgs
    Array of sensitive portions of the webhook URL to mask.
    VulnerabilityEvents bool
    Invoke the hook for vulnerability events. Defaults to false.
    WikiPageEvents bool
    Invoke the hook for wiki page events. Defaults to false.
    alert_status string
    Lifecycle status of the webhook. Values include executable and disabled.
    branch_filter_strategy string
    Filter push events by branch. Valid values are: wildcard, regex, allBranches.
    confidential_issues_events bool
    Invoke the hook for confidential issues events. Defaults to false.
    confidential_note_events bool
    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_template string
    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_verification bool
    Enable SSL verification when invoking the hook. Defaults to true.
    feature_flag_events bool
    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_events bool
    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_branch_filter string
    Invoke the hook for push events on matching branches only.
    releases_events bool
    Invoke the hook for release events. Defaults to false.
    repository_update_events bool
    Invoke the hook for repository update events.
    resource_access_token_events bool
    Invoke the hook for project access token expiry events. Defaults to false.
    resource_deploy_token_events bool
    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-Signature header). Requires GitLab 19.0 or later (feature flag webhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources.
    signing_token_present bool
    Whether a signingToken is configured server-side. Reflects the value returned by the GitLab API.
    tag_push_events bool
    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_events bool
    Invoke the hook for wiki page events. Defaults to false.
    alertStatus String
    Lifecycle status of the webhook. Values include executable and disabled.
    branchFilterStrategy String
    Filter push events by branch. Valid values are: wildcard, regex, allBranches.
    confidentialIssuesEvents Boolean
    Invoke the hook for confidential issues events. Defaults to false.
    confidentialNoteEvents Boolean
    Invoke the hook for confidential note events. Defaults to false.
    customHeaders List<ProjectHookCustomHeader>
    Custom headers for the project webhook. Available from GitLab 17.1 onwards.
    customWebhookTemplate String
    Custom webhook template.
    deploymentEvents Boolean
    Invoke the hook for deployment events. Defaults to false.
    description String
    Description of the webhook.
    disabledUntil String
    Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
    emojiEvents Boolean
    Invoke the hook for emoji events. Defaults to false.
    enableSslVerification Boolean
    Enable SSL verification when invoking the hook. Defaults to true.
    featureFlagEvents Boolean
    Invoke the hook for feature flag events. Defaults to false.
    hookId Integer
    The id of the project hook.
    issuesEvents Boolean
    Invoke the hook for issues events. Defaults to false.
    jobEvents Boolean
    Invoke the hook for job events. Defaults to false.
    mergeRequestsEvents Boolean
    Invoke the hook for merge requests events. Defaults to false.
    milestoneEvents Boolean
    Invoke the hook for milestone events. Defaults to false.
    name String
    Name of the project webhook.
    noteEvents Boolean
    Invoke the hook for note events. Defaults to false.
    pipelineEvents Boolean
    Invoke the hook for pipeline events. Defaults to false.
    project String
    The name or id of the project to add the hook to.
    projectId Integer
    The id of the project for the hook.
    pushEvents Boolean
    Invoke the hook for push events. Defaults to true.
    pushEventsBranchFilter String
    Invoke the hook for push events on matching branches only.
    releasesEvents Boolean
    Invoke the hook for release events. Defaults to false.
    repositoryUpdateEvents Boolean
    Invoke the hook for repository update events.
    resourceAccessTokenEvents Boolean
    Invoke the hook for project access token expiry events. Defaults to false.
    resourceDeployTokenEvents Boolean
    Invoke the hook for resource deploy token events. Defaults to false.
    signingToken String
    Secret used to sign webhook payloads (HMAC-SHA256, sent as the X-Gitlab-Signature header). Requires GitLab 19.0 or later (feature flag webhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources.
    signingTokenPresent Boolean
    Whether a signingToken is configured server-side. Reflects the value returned by the GitLab API.
    tagPushEvents Boolean
    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.
    urlVariables List<ProjectHookUrlVariable>
    Array of sensitive portions of the webhook URL to mask.
    vulnerabilityEvents Boolean
    Invoke the hook for vulnerability events. Defaults to false.
    wikiPageEvents Boolean
    Invoke the hook for wiki page events. Defaults to false.
    alertStatus string
    Lifecycle status of the webhook. Values include executable and disabled.
    branchFilterStrategy string
    Filter push events by branch. Valid values are: wildcard, regex, allBranches.
    confidentialIssuesEvents boolean
    Invoke the hook for confidential issues events. Defaults to false.
    confidentialNoteEvents boolean
    Invoke the hook for confidential note events. Defaults to false.
    customHeaders ProjectHookCustomHeader[]
    Custom headers for the project webhook. Available from GitLab 17.1 onwards.
    customWebhookTemplate string
    Custom webhook template.
    deploymentEvents boolean
    Invoke the hook for deployment events. Defaults to false.
    description string
    Description of the webhook.
    disabledUntil string
    Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
    emojiEvents boolean
    Invoke the hook for emoji events. Defaults to false.
    enableSslVerification boolean
    Enable SSL verification when invoking the hook. Defaults to true.
    featureFlagEvents boolean
    Invoke the hook for feature flag events. Defaults to false.
    hookId number
    The id of the project hook.
    issuesEvents boolean
    Invoke the hook for issues events. Defaults to false.
    jobEvents boolean
    Invoke the hook for job events. Defaults to false.
    mergeRequestsEvents boolean
    Invoke the hook for merge requests events. Defaults to false.
    milestoneEvents boolean
    Invoke the hook for milestone events. Defaults to false.
    name string
    Name of the project webhook.
    noteEvents boolean
    Invoke the hook for note events. Defaults to false.
    pipelineEvents boolean
    Invoke the hook for pipeline events. Defaults to false.
    project string
    The name or id of the project to add the hook to.
    projectId number
    The id of the project for the hook.
    pushEvents boolean
    Invoke the hook for push events. Defaults to true.
    pushEventsBranchFilter string
    Invoke the hook for push events on matching branches only.
    releasesEvents boolean
    Invoke the hook for release events. Defaults to false.
    repositoryUpdateEvents boolean
    Invoke the hook for repository update events.
    resourceAccessTokenEvents boolean
    Invoke the hook for project access token expiry events. Defaults to false.
    resourceDeployTokenEvents boolean
    Invoke the hook for resource deploy token events. Defaults to false.
    signingToken string
    Secret used to sign webhook payloads (HMAC-SHA256, sent as the X-Gitlab-Signature header). Requires GitLab 19.0 or later (feature flag webhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources.
    signingTokenPresent boolean
    Whether a signingToken is configured server-side. Reflects the value returned by the GitLab API.
    tagPushEvents boolean
    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.
    urlVariables ProjectHookUrlVariable[]
    Array of sensitive portions of the webhook URL to mask.
    vulnerabilityEvents boolean
    Invoke the hook for vulnerability events. Defaults to false.
    wikiPageEvents boolean
    Invoke the hook for wiki page events. Defaults to false.
    alert_status str
    Lifecycle status of the webhook. Values include executable and disabled.
    branch_filter_strategy str
    Filter push events by branch. Valid values are: wildcard, regex, allBranches.
    confidential_issues_events bool
    Invoke the hook for confidential issues events. Defaults to false.
    confidential_note_events bool
    Invoke the hook for confidential note events. Defaults to false.
    custom_headers Sequence[ProjectHookCustomHeaderArgs]
    Custom headers for the project webhook. Available from GitLab 17.1 onwards.
    custom_webhook_template str
    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_verification bool
    Enable SSL verification when invoking the hook. Defaults to true.
    feature_flag_events bool
    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_events bool
    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_branch_filter str
    Invoke the hook for push events on matching branches only.
    releases_events bool
    Invoke the hook for release events. Defaults to false.
    repository_update_events bool
    Invoke the hook for repository update events.
    resource_access_token_events bool
    Invoke the hook for project access token expiry events. Defaults to false.
    resource_deploy_token_events bool
    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-Signature header). Requires GitLab 19.0 or later (feature flag webhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources.
    signing_token_present bool
    Whether a signingToken is configured server-side. Reflects the value returned by the GitLab API.
    tag_push_events bool
    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[ProjectHookUrlVariableArgs]
    Array of sensitive portions of the webhook URL to mask.
    vulnerability_events bool
    Invoke the hook for vulnerability events. Defaults to false.
    wiki_page_events bool
    Invoke the hook for wiki page events. Defaults to false.
    alertStatus String
    Lifecycle status of the webhook. Values include executable and disabled.
    branchFilterStrategy String
    Filter push events by branch. Valid values are: wildcard, regex, allBranches.
    confidentialIssuesEvents Boolean
    Invoke the hook for confidential issues events. Defaults to false.
    confidentialNoteEvents Boolean
    Invoke the hook for confidential note events. Defaults to false.
    customHeaders List<Property Map>
    Custom headers for the project webhook. Available from GitLab 17.1 onwards.
    customWebhookTemplate String
    Custom webhook template.
    deploymentEvents Boolean
    Invoke the hook for deployment events. Defaults to false.
    description String
    Description of the webhook.
    disabledUntil String
    Time until the webhook is re-enabled after being automatically disabled due to failures, in ISO8601 format. Null when the webhook is enabled.
    emojiEvents Boolean
    Invoke the hook for emoji events. Defaults to false.
    enableSslVerification Boolean
    Enable SSL verification when invoking the hook. Defaults to true.
    featureFlagEvents Boolean
    Invoke the hook for feature flag events. Defaults to false.
    hookId Number
    The id of the project hook.
    issuesEvents Boolean
    Invoke the hook for issues events. Defaults to false.
    jobEvents Boolean
    Invoke the hook for job events. Defaults to false.
    mergeRequestsEvents Boolean
    Invoke the hook for merge requests events. Defaults to false.
    milestoneEvents Boolean
    Invoke the hook for milestone events. Defaults to false.
    name String
    Name of the project webhook.
    noteEvents Boolean
    Invoke the hook for note events. Defaults to false.
    pipelineEvents Boolean
    Invoke the hook for pipeline events. Defaults to false.
    project String
    The name or id of the project to add the hook to.
    projectId Number
    The id of the project for the hook.
    pushEvents Boolean
    Invoke the hook for push events. Defaults to true.
    pushEventsBranchFilter String
    Invoke the hook for push events on matching branches only.
    releasesEvents Boolean
    Invoke the hook for release events. Defaults to false.
    repositoryUpdateEvents Boolean
    Invoke the hook for repository update events.
    resourceAccessTokenEvents Boolean
    Invoke the hook for project access token expiry events. Defaults to false.
    resourceDeployTokenEvents Boolean
    Invoke the hook for resource deploy token events. Defaults to false.
    signingToken String
    Secret used to sign webhook payloads (HMAC-SHA256, sent as the X-Gitlab-Signature header). Requires GitLab 19.0 or later (feature flag webhookSigningToken, on by default). Write-only — the value is never returned by the API and is not available for imported resources.
    signingTokenPresent Boolean
    Whether a signingToken is configured server-side. Reflects the value returned by the GitLab API.
    tagPushEvents Boolean
    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.
    urlVariables List<Property Map>
    Array of sensitive portions of the webhook URL to mask.
    vulnerabilityEvents Boolean
    Invoke the hook for vulnerability events. Defaults to false.
    wikiPageEvents Boolean
    Invoke the hook for wiki page events. Defaults to false.

    Supporting Types

    ProjectHookCustomHeader, ProjectHookCustomHeaderArgs

    Key string
    Key of the custom header.
    Value string
    Value of the custom header. This value cannot be imported.
    Key string
    Key of the custom header.
    Value string
    Value of the custom header. This value cannot be imported.
    key string
    Key of the custom header.
    value string
    Value of the custom header. This value cannot be imported.
    key String
    Key of the custom header.
    value String
    Value of the custom header. This value cannot be imported.
    key string
    Key of the custom header.
    value string
    Value of the custom header. This value cannot be imported.
    key str
    Key of the custom header.
    value str
    Value of the custom header. This value cannot be imported.
    key String
    Key of the custom header.
    value String
    Value of the custom header. This value cannot be imported.

    ProjectHookUrlVariable, ProjectHookUrlVariableArgs

    Key string
    The value to display in place of the sensitive portion in the URL.
    Value string
    The sensitive portion of the webhook URL to mask. This value cannot be imported.
    Key string
    The value to display in place of the sensitive portion in the URL.
    Value string
    The sensitive portion of the webhook URL to mask. This value cannot be imported.
    key string
    The value to display in place of the sensitive portion in the URL.
    value string
    The sensitive portion of the webhook URL to mask. This value cannot be imported.
    key String
    The value to display in place of the sensitive portion in the URL.
    value String
    The sensitive portion of the webhook URL to mask. This value cannot be imported.
    key string
    The value to display in place of the sensitive portion in the URL.
    value string
    The sensitive portion of the webhook URL to mask. This value cannot be imported.
    key str
    The value to display in place of the sensitive portion in the URL.
    value str
    The sensitive portion of the webhook URL to mask. This value cannot be imported.
    key String
    The value to display in place of the sensitive portion in the URL.
    value String
    The sensitive portion of the webhook URL to mask. This value cannot be imported.

    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 gitlab Terraform Provider.
    gitlab logo
    Viewing docs for GitLab v10.0.0
    published on Friday, Jun 26, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial