The gitlab.ProjectHook resource allows to manage the lifecycle of a project hook.
Note that
push_eventsdefaults 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",
},
],
});
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",
},
])
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v9/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
}
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",
},
},
});
});
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 java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new 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());
}
}
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
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,
custom_headers: Optional[Sequence[ProjectHookCustomHeaderArgs]] = None,
deployment_events: Optional[bool] = None,
description: Optional[str] = None,
enable_ssl_verification: Optional[bool] = None,
issues_events: Optional[bool] = None,
job_events: Optional[bool] = None,
merge_requests_events: Optional[bool] = None,
confidential_issues_events: Optional[bool] = None,
note_events: Optional[bool] = None,
pipeline_events: Optional[bool] = None,
custom_webhook_template: Optional[str] = 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,
tag_push_events: Optional[bool] = None,
token: Optional[str] = None,
confidential_note_events: Optional[bool] = 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.
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",
CustomHeaders = new[]
{
new GitLab.Inputs.ProjectHookCustomHeaderArgs
{
Key = "string",
Value = "string",
},
},
DeploymentEvents = false,
Description = "string",
EnableSslVerification = false,
IssuesEvents = false,
JobEvents = false,
MergeRequestsEvents = false,
ConfidentialIssuesEvents = false,
NoteEvents = false,
PipelineEvents = false,
CustomWebhookTemplate = "string",
PushEvents = false,
PushEventsBranchFilter = "string",
ReleasesEvents = false,
ResourceAccessTokenEvents = false,
TagPushEvents = false,
Token = "string",
ConfidentialNoteEvents = false,
VulnerabilityEvents = false,
WikiPageEvents = false,
});
example, err := gitlab.NewProjectHook(ctx, "projectHookResource", &gitlab.ProjectHookArgs{
Project: pulumi.String("string"),
Url: pulumi.String("string"),
Name: pulumi.String("string"),
CustomHeaders: gitlab.ProjectHookCustomHeaderArray{
&gitlab.ProjectHookCustomHeaderArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
DeploymentEvents: pulumi.Bool(false),
Description: pulumi.String("string"),
EnableSslVerification: pulumi.Bool(false),
IssuesEvents: pulumi.Bool(false),
JobEvents: pulumi.Bool(false),
MergeRequestsEvents: pulumi.Bool(false),
ConfidentialIssuesEvents: pulumi.Bool(false),
NoteEvents: pulumi.Bool(false),
PipelineEvents: pulumi.Bool(false),
CustomWebhookTemplate: pulumi.String("string"),
PushEvents: pulumi.Bool(false),
PushEventsBranchFilter: pulumi.String("string"),
ReleasesEvents: pulumi.Bool(false),
ResourceAccessTokenEvents: pulumi.Bool(false),
TagPushEvents: pulumi.Bool(false),
Token: pulumi.String("string"),
ConfidentialNoteEvents: pulumi.Bool(false),
VulnerabilityEvents: pulumi.Bool(false),
WikiPageEvents: pulumi.Bool(false),
})
var projectHookResource = new ProjectHook("projectHookResource", ProjectHookArgs.builder()
.project("string")
.url("string")
.name("string")
.customHeaders(ProjectHookCustomHeaderArgs.builder()
.key("string")
.value("string")
.build())
.deploymentEvents(false)
.description("string")
.enableSslVerification(false)
.issuesEvents(false)
.jobEvents(false)
.mergeRequestsEvents(false)
.confidentialIssuesEvents(false)
.noteEvents(false)
.pipelineEvents(false)
.customWebhookTemplate("string")
.pushEvents(false)
.pushEventsBranchFilter("string")
.releasesEvents(false)
.resourceAccessTokenEvents(false)
.tagPushEvents(false)
.token("string")
.confidentialNoteEvents(false)
.vulnerabilityEvents(false)
.wikiPageEvents(false)
.build());
project_hook_resource = gitlab.ProjectHook("projectHookResource",
project="string",
url="string",
name="string",
custom_headers=[{
"key": "string",
"value": "string",
}],
deployment_events=False,
description="string",
enable_ssl_verification=False,
issues_events=False,
job_events=False,
merge_requests_events=False,
confidential_issues_events=False,
note_events=False,
pipeline_events=False,
custom_webhook_template="string",
push_events=False,
push_events_branch_filter="string",
releases_events=False,
resource_access_token_events=False,
tag_push_events=False,
token="string",
confidential_note_events=False,
vulnerability_events=False,
wiki_page_events=False)
const projectHookResource = new gitlab.ProjectHook("projectHookResource", {
project: "string",
url: "string",
name: "string",
customHeaders: [{
key: "string",
value: "string",
}],
deploymentEvents: false,
description: "string",
enableSslVerification: false,
issuesEvents: false,
jobEvents: false,
mergeRequestsEvents: false,
confidentialIssuesEvents: false,
noteEvents: false,
pipelineEvents: false,
customWebhookTemplate: "string",
pushEvents: false,
pushEventsBranchFilter: "string",
releasesEvents: false,
resourceAccessTokenEvents: false,
tagPushEvents: false,
token: "string",
confidentialNoteEvents: false,
vulnerabilityEvents: false,
wikiPageEvents: false,
});
type: gitlab:ProjectHook
properties:
confidentialIssuesEvents: false
confidentialNoteEvents: false
customHeaders:
- key: string
value: string
customWebhookTemplate: string
deploymentEvents: false
description: string
enableSslVerification: false
issuesEvents: false
jobEvents: false
mergeRequestsEvents: false
name: string
noteEvents: false
pipelineEvents: false
project: string
pushEvents: false
pushEventsBranchFilter: string
releasesEvents: false
resourceAccessTokenEvents: false
tagPushEvents: false
token: string
url: 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. - 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.
- Enable
Ssl boolVerification - Enable SSL verification when invoking the hook. Defaults to
true. - 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. - 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. - 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.
- 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. - 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.
- Enable
Ssl boolVerification - Enable SSL verification when invoking the hook. Defaults to
true. - 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. - 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. - 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.
- 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. - 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.
- enable
Ssl BooleanVerification - Enable SSL verification when invoking the hook. Defaults to
true. - 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. - 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. - 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.
- 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. - 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.
- enable
Ssl booleanVerification - Enable SSL verification when invoking the hook. Defaults to
true. - 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. - 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. - 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.
- 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. - 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.
- enable_
ssl_ boolverification - Enable SSL verification when invoking the hook. Defaults to
true. - 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. - 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. - 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.
- 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. - 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.
- enable
Ssl BooleanVerification - Enable SSL verification when invoking the hook. Defaults to
true. - 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. - 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. - 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.
- 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:
- 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.
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,
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,
enable_ssl_verification: Optional[bool] = None,
hook_id: Optional[int] = None,
issues_events: Optional[bool] = None,
job_events: Optional[bool] = None,
merge_requests_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,
resource_access_token_events: Optional[bool] = None,
tag_push_events: Optional[bool] = None,
token: Optional[str] = None,
url: Optional[str] = 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}- 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.
- 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.
- Enable
Ssl boolVerification - Enable SSL verification when invoking the hook. Defaults to
true. - 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. - 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. - Resource
Access boolToken Events - Invoke the hook for project access token expiry events. Defaults to
false. - 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. - 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.
- 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.
- Enable
Ssl boolVerification - Enable SSL verification when invoking the hook. Defaults to
true. - 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. - 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. - Resource
Access boolToken Events - Invoke the hook for project access token expiry events. Defaults to
false. - 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. - 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.
- 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.
- enable
Ssl BooleanVerification - Enable SSL verification when invoking the hook. Defaults to
true. - 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. - 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. - resource
Access BooleanToken Events - Invoke the hook for project access token expiry events. Defaults to
false. - 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. - 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.
- 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.
- enable
Ssl booleanVerification - Enable SSL verification when invoking the hook. Defaults to
true. - 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. - 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. - resource
Access booleanToken Events - Invoke the hook for project access token expiry events. Defaults to
false. - 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. - 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.
- 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.
- enable_
ssl_ boolverification - Enable SSL verification when invoking the hook. Defaults to
true. - 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. - 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. - resource_
access_ booltoken_ events - Invoke the hook for project access token expiry events. Defaults to
false. - 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. - 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.
- 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.
- enable
Ssl BooleanVerification - Enable SSL verification when invoking the hook. Defaults to
true. - 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. - 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. - resource
Access BooleanToken Events - Invoke the hook for project access token expiry events. Defaults to
false. - 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. - 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
Import
Starting in Terraform v1.5.0, you can use an import block to import gitlab_project_hook. For example:
terraform
import {
to = gitlab_project_hook.example
id = “see CLI command below for ID”
}
Importing using the CLI is supported with the following syntax:
A GitLab Project Hook can be imported using a key composed of <project-id>:<hook-id>, e.g.
$ pulumi import gitlab:index/projectHook:ProjectHook example "12345:1"
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.
