1. Packages
  2. GitLab
  3. API Docs
  4. SystemHook
GitLab v6.10.0 published on Monday, Mar 25, 2024 by Pulumi

gitlab.SystemHook

Explore with Pulumi AI

gitlab logo
GitLab v6.10.0 published on Monday, Mar 25, 2024 by Pulumi

    The gitlab.SystemHook resource allows to manage the lifecycle of a system hook.

    This resource requires GitLab 14.9

    Upstream API: GitLab REST API docs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gitlab from "@pulumi/gitlab";
    
    const example = new gitlab.SystemHook("example", {
        enableSslVerification: true,
        mergeRequestsEvents: true,
        pushEvents: true,
        repositoryUpdateEvents: true,
        tagPushEvents: true,
        token: "secret-token",
        url: "https://example.com/hook-%d",
    });
    
    import pulumi
    import pulumi_gitlab as gitlab
    
    example = gitlab.SystemHook("example",
        enable_ssl_verification=True,
        merge_requests_events=True,
        push_events=True,
        repository_update_events=True,
        tag_push_events=True,
        token="secret-token",
        url="https://example.com/hook-%d")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gitlab.NewSystemHook(ctx, "example", &gitlab.SystemHookArgs{
    			EnableSslVerification:  pulumi.Bool(true),
    			MergeRequestsEvents:    pulumi.Bool(true),
    			PushEvents:             pulumi.Bool(true),
    			RepositoryUpdateEvents: pulumi.Bool(true),
    			TagPushEvents:          pulumi.Bool(true),
    			Token:                  pulumi.String("secret-token"),
    			Url:                    pulumi.String("https://example.com/hook-%d"),
    		})
    		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.SystemHook("example", new()
        {
            EnableSslVerification = true,
            MergeRequestsEvents = true,
            PushEvents = true,
            RepositoryUpdateEvents = true,
            TagPushEvents = true,
            Token = "secret-token",
            Url = "https://example.com/hook-%d",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gitlab.SystemHook;
    import com.pulumi.gitlab.SystemHookArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new SystemHook("example", SystemHookArgs.builder()        
                .enableSslVerification(true)
                .mergeRequestsEvents(true)
                .pushEvents(true)
                .repositoryUpdateEvents(true)
                .tagPushEvents(true)
                .token("secret-token")
                .url("https://example.com/hook-%d")
                .build());
    
        }
    }
    
    resources:
      example:
        type: gitlab:SystemHook
        properties:
          enableSslVerification: true
          mergeRequestsEvents: true
          pushEvents: true
          repositoryUpdateEvents: true
          tagPushEvents: true
          token: secret-token
          url: https://example.com/hook-%d
    

    Create SystemHook Resource

    new SystemHook(name: string, args: SystemHookArgs, opts?: CustomResourceOptions);
    @overload
    def SystemHook(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   enable_ssl_verification: Optional[bool] = None,
                   merge_requests_events: Optional[bool] = None,
                   push_events: Optional[bool] = None,
                   repository_update_events: Optional[bool] = None,
                   tag_push_events: Optional[bool] = None,
                   token: Optional[str] = None,
                   url: Optional[str] = None)
    @overload
    def SystemHook(resource_name: str,
                   args: SystemHookArgs,
                   opts: Optional[ResourceOptions] = None)
    func NewSystemHook(ctx *Context, name string, args SystemHookArgs, opts ...ResourceOption) (*SystemHook, error)
    public SystemHook(string name, SystemHookArgs args, CustomResourceOptions? opts = null)
    public SystemHook(String name, SystemHookArgs args)
    public SystemHook(String name, SystemHookArgs args, CustomResourceOptions options)
    
    type: gitlab:SystemHook
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args SystemHookArgs
    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 SystemHookArgs
    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 SystemHookArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SystemHookArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SystemHookArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    SystemHook Resource Properties

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

    Inputs

    The SystemHook resource accepts the following input properties:

    Url string
    The hook URL.
    EnableSslVerification bool
    Do SSL verification when triggering the hook.
    MergeRequestsEvents bool
    Trigger hook on merge requests events.
    PushEvents bool
    When true, the hook fires on push events.
    RepositoryUpdateEvents bool
    Trigger hook on repository update events.
    TagPushEvents bool
    When true, the hook fires on new tags being pushed.
    Token string
    Secret token to validate received payloads; this isn’t returned in the response. This attribute is not available for imported resources.
    Url string
    The hook URL.
    EnableSslVerification bool
    Do SSL verification when triggering the hook.
    MergeRequestsEvents bool
    Trigger hook on merge requests events.
    PushEvents bool
    When true, the hook fires on push events.
    RepositoryUpdateEvents bool
    Trigger hook on repository update events.
    TagPushEvents bool
    When true, the hook fires on new tags being pushed.
    Token string
    Secret token to validate received payloads; this isn’t returned in the response. This attribute is not available for imported resources.
    url String
    The hook URL.
    enableSslVerification Boolean
    Do SSL verification when triggering the hook.
    mergeRequestsEvents Boolean
    Trigger hook on merge requests events.
    pushEvents Boolean
    When true, the hook fires on push events.
    repositoryUpdateEvents Boolean
    Trigger hook on repository update events.
    tagPushEvents Boolean
    When true, the hook fires on new tags being pushed.
    token String
    Secret token to validate received payloads; this isn’t returned in the response. This attribute is not available for imported resources.
    url string
    The hook URL.
    enableSslVerification boolean
    Do SSL verification when triggering the hook.
    mergeRequestsEvents boolean
    Trigger hook on merge requests events.
    pushEvents boolean
    When true, the hook fires on push events.
    repositoryUpdateEvents boolean
    Trigger hook on repository update events.
    tagPushEvents boolean
    When true, the hook fires on new tags being pushed.
    token string
    Secret token to validate received payloads; this isn’t returned in the response. This attribute is not available for imported resources.
    url str
    The hook URL.
    enable_ssl_verification bool
    Do SSL verification when triggering the hook.
    merge_requests_events bool
    Trigger hook on merge requests events.
    push_events bool
    When true, the hook fires on push events.
    repository_update_events bool
    Trigger hook on repository update events.
    tag_push_events bool
    When true, the hook fires on new tags being pushed.
    token str
    Secret token to validate received payloads; this isn’t returned in the response. This attribute is not available for imported resources.
    url String
    The hook URL.
    enableSslVerification Boolean
    Do SSL verification when triggering the hook.
    mergeRequestsEvents Boolean
    Trigger hook on merge requests events.
    pushEvents Boolean
    When true, the hook fires on push events.
    repositoryUpdateEvents Boolean
    Trigger hook on repository update events.
    tagPushEvents Boolean
    When true, the hook fires on new tags being pushed.
    token String
    Secret token to validate received payloads; this isn’t returned in the response. This attribute is not available for imported resources.

    Outputs

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

    CreatedAt string
    The date and time the hook was created in ISO8601 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreatedAt string
    The date and time the hook was created in ISO8601 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    createdAt String
    The date and time the hook was created in ISO8601 format.
    id String
    The provider-assigned unique ID for this managed resource.
    createdAt string
    The date and time the hook was created in ISO8601 format.
    id string
    The provider-assigned unique ID for this managed resource.
    created_at str
    The date and time the hook was created in ISO8601 format.
    id str
    The provider-assigned unique ID for this managed resource.
    createdAt String
    The date and time the hook was created in ISO8601 format.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SystemHook Resource

    Get an existing SystemHook 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?: SystemHookState, opts?: CustomResourceOptions): SystemHook
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            enable_ssl_verification: Optional[bool] = None,
            merge_requests_events: Optional[bool] = None,
            push_events: Optional[bool] = None,
            repository_update_events: Optional[bool] = None,
            tag_push_events: Optional[bool] = None,
            token: Optional[str] = None,
            url: Optional[str] = None) -> SystemHook
    func GetSystemHook(ctx *Context, name string, id IDInput, state *SystemHookState, opts ...ResourceOption) (*SystemHook, error)
    public static SystemHook Get(string name, Input<string> id, SystemHookState? state, CustomResourceOptions? opts = null)
    public static SystemHook get(String name, Output<String> id, SystemHookState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    CreatedAt string
    The date and time the hook was created in ISO8601 format.
    EnableSslVerification bool
    Do SSL verification when triggering the hook.
    MergeRequestsEvents bool
    Trigger hook on merge requests events.
    PushEvents bool
    When true, the hook fires on push events.
    RepositoryUpdateEvents bool
    Trigger hook on repository update events.
    TagPushEvents bool
    When true, the hook fires on new tags being pushed.
    Token string
    Secret token to validate received payloads; this isn’t returned in the response. This attribute is not available for imported resources.
    Url string
    The hook URL.
    CreatedAt string
    The date and time the hook was created in ISO8601 format.
    EnableSslVerification bool
    Do SSL verification when triggering the hook.
    MergeRequestsEvents bool
    Trigger hook on merge requests events.
    PushEvents bool
    When true, the hook fires on push events.
    RepositoryUpdateEvents bool
    Trigger hook on repository update events.
    TagPushEvents bool
    When true, the hook fires on new tags being pushed.
    Token string
    Secret token to validate received payloads; this isn’t returned in the response. This attribute is not available for imported resources.
    Url string
    The hook URL.
    createdAt String
    The date and time the hook was created in ISO8601 format.
    enableSslVerification Boolean
    Do SSL verification when triggering the hook.
    mergeRequestsEvents Boolean
    Trigger hook on merge requests events.
    pushEvents Boolean
    When true, the hook fires on push events.
    repositoryUpdateEvents Boolean
    Trigger hook on repository update events.
    tagPushEvents Boolean
    When true, the hook fires on new tags being pushed.
    token String
    Secret token to validate received payloads; this isn’t returned in the response. This attribute is not available for imported resources.
    url String
    The hook URL.
    createdAt string
    The date and time the hook was created in ISO8601 format.
    enableSslVerification boolean
    Do SSL verification when triggering the hook.
    mergeRequestsEvents boolean
    Trigger hook on merge requests events.
    pushEvents boolean
    When true, the hook fires on push events.
    repositoryUpdateEvents boolean
    Trigger hook on repository update events.
    tagPushEvents boolean
    When true, the hook fires on new tags being pushed.
    token string
    Secret token to validate received payloads; this isn’t returned in the response. This attribute is not available for imported resources.
    url string
    The hook URL.
    created_at str
    The date and time the hook was created in ISO8601 format.
    enable_ssl_verification bool
    Do SSL verification when triggering the hook.
    merge_requests_events bool
    Trigger hook on merge requests events.
    push_events bool
    When true, the hook fires on push events.
    repository_update_events bool
    Trigger hook on repository update events.
    tag_push_events bool
    When true, the hook fires on new tags being pushed.
    token str
    Secret token to validate received payloads; this isn’t returned in the response. This attribute is not available for imported resources.
    url str
    The hook URL.
    createdAt String
    The date and time the hook was created in ISO8601 format.
    enableSslVerification Boolean
    Do SSL verification when triggering the hook.
    mergeRequestsEvents Boolean
    Trigger hook on merge requests events.
    pushEvents Boolean
    When true, the hook fires on push events.
    repositoryUpdateEvents Boolean
    Trigger hook on repository update events.
    tagPushEvents Boolean
    When true, the hook fires on new tags being pushed.
    token String
    Secret token to validate received payloads; this isn’t returned in the response. This attribute is not available for imported resources.
    url String
    The hook URL.

    Import

    You can import a system hook using the hook id {hook-id}, e.g.

    $ pulumi import gitlab:index/systemHook:SystemHook example 42
    

    NOTE: the token attribute won’t be available for imported 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
    GitLab v6.10.0 published on Monday, Mar 25, 2024 by Pulumi