gitlab.PipelineTrigger
Explore with Pulumi AI
The gitlab.PipelineTrigger
resource allows to manage the lifecycle of a pipeline trigger.
Upstream API: GitLab REST API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const example = new gitlab.PipelineTrigger("example", {
project: "12345",
description: "Used to trigger builds",
});
import pulumi
import pulumi_gitlab as gitlab
example = gitlab.PipelineTrigger("example",
project="12345",
description="Used to trigger builds")
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gitlab.NewPipelineTrigger(ctx, "example", &gitlab.PipelineTriggerArgs{
Project: pulumi.String("12345"),
Description: pulumi.String("Used to trigger builds"),
})
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.PipelineTrigger("example", new()
{
Project = "12345",
Description = "Used to trigger builds",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.PipelineTrigger;
import com.pulumi.gitlab.PipelineTriggerArgs;
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 PipelineTrigger("example", PipelineTriggerArgs.builder()
.project("12345")
.description("Used to trigger builds")
.build());
}
}
resources:
example:
type: gitlab:PipelineTrigger
properties:
project: '12345'
description: Used to trigger builds
Create PipelineTrigger Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PipelineTrigger(name: string, args: PipelineTriggerArgs, opts?: CustomResourceOptions);
@overload
def PipelineTrigger(resource_name: str,
args: PipelineTriggerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PipelineTrigger(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
project: Optional[str] = None)
func NewPipelineTrigger(ctx *Context, name string, args PipelineTriggerArgs, opts ...ResourceOption) (*PipelineTrigger, error)
public PipelineTrigger(string name, PipelineTriggerArgs args, CustomResourceOptions? opts = null)
public PipelineTrigger(String name, PipelineTriggerArgs args)
public PipelineTrigger(String name, PipelineTriggerArgs args, CustomResourceOptions options)
type: gitlab:PipelineTrigger
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 PipelineTriggerArgs
- 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 PipelineTriggerArgs
- 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 PipelineTriggerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PipelineTriggerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PipelineTriggerArgs
- 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 pipelineTriggerResource = new GitLab.PipelineTrigger("pipelineTriggerResource", new()
{
Description = "string",
Project = "string",
});
example, err := gitlab.NewPipelineTrigger(ctx, "pipelineTriggerResource", &gitlab.PipelineTriggerArgs{
Description: pulumi.String("string"),
Project: pulumi.String("string"),
})
var pipelineTriggerResource = new PipelineTrigger("pipelineTriggerResource", PipelineTriggerArgs.builder()
.description("string")
.project("string")
.build());
pipeline_trigger_resource = gitlab.PipelineTrigger("pipelineTriggerResource",
description="string",
project="string")
const pipelineTriggerResource = new gitlab.PipelineTrigger("pipelineTriggerResource", {
description: "string",
project: "string",
});
type: gitlab:PipelineTrigger
properties:
description: string
project: string
PipelineTrigger 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 PipelineTrigger resource accepts the following input properties:
- Description string
- The description of the pipeline trigger.
- Project string
- The name or id of the project to add the trigger to.
- Description string
- The description of the pipeline trigger.
- Project string
- The name or id of the project to add the trigger to.
- description String
- The description of the pipeline trigger.
- project String
- The name or id of the project to add the trigger to.
- description string
- The description of the pipeline trigger.
- project string
- The name or id of the project to add the trigger to.
- description str
- The description of the pipeline trigger.
- project str
- The name or id of the project to add the trigger to.
- description String
- The description of the pipeline trigger.
- project String
- The name or id of the project to add the trigger to.
Outputs
All input properties are implicitly available as output properties. Additionally, the PipelineTrigger resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Pipeline
Trigger intId - The pipeline trigger id.
- Token string
- The pipeline trigger token. This value is not available during import.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pipeline
Trigger intId - The pipeline trigger id.
- Token string
- The pipeline trigger token. This value is not available during import.
- id String
- The provider-assigned unique ID for this managed resource.
- pipeline
Trigger IntegerId - The pipeline trigger id.
- token String
- The pipeline trigger token. This value is not available during import.
- id string
- The provider-assigned unique ID for this managed resource.
- pipeline
Trigger numberId - The pipeline trigger id.
- token string
- The pipeline trigger token. This value is not available during import.
- id str
- The provider-assigned unique ID for this managed resource.
- pipeline_
trigger_ intid - The pipeline trigger id.
- token str
- The pipeline trigger token. This value is not available during import.
- id String
- The provider-assigned unique ID for this managed resource.
- pipeline
Trigger NumberId - The pipeline trigger id.
- token String
- The pipeline trigger token. This value is not available during import.
Look up Existing PipelineTrigger Resource
Get an existing PipelineTrigger 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?: PipelineTriggerState, opts?: CustomResourceOptions): PipelineTrigger
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
pipeline_trigger_id: Optional[int] = None,
project: Optional[str] = None,
token: Optional[str] = None) -> PipelineTrigger
func GetPipelineTrigger(ctx *Context, name string, id IDInput, state *PipelineTriggerState, opts ...ResourceOption) (*PipelineTrigger, error)
public static PipelineTrigger Get(string name, Input<string> id, PipelineTriggerState? state, CustomResourceOptions? opts = null)
public static PipelineTrigger get(String name, Output<String> id, PipelineTriggerState 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.
- Description string
- The description of the pipeline trigger.
- Pipeline
Trigger intId - The pipeline trigger id.
- Project string
- The name or id of the project to add the trigger to.
- Token string
- The pipeline trigger token. This value is not available during import.
- Description string
- The description of the pipeline trigger.
- Pipeline
Trigger intId - The pipeline trigger id.
- Project string
- The name or id of the project to add the trigger to.
- Token string
- The pipeline trigger token. This value is not available during import.
- description String
- The description of the pipeline trigger.
- pipeline
Trigger IntegerId - The pipeline trigger id.
- project String
- The name or id of the project to add the trigger to.
- token String
- The pipeline trigger token. This value is not available during import.
- description string
- The description of the pipeline trigger.
- pipeline
Trigger numberId - The pipeline trigger id.
- project string
- The name or id of the project to add the trigger to.
- token string
- The pipeline trigger token. This value is not available during import.
- description str
- The description of the pipeline trigger.
- pipeline_
trigger_ intid - The pipeline trigger id.
- project str
- The name or id of the project to add the trigger to.
- token str
- The pipeline trigger token. This value is not available during import.
- description String
- The description of the pipeline trigger.
- pipeline
Trigger NumberId - The pipeline trigger id.
- project String
- The name or id of the project to add the trigger to.
- token String
- The pipeline trigger token. This value is not available during import.
Import
GitLab pipeline triggers can be imported using an id made up of {project_id}:{pipeline_trigger_id}
, e.g.
$ pulumi import gitlab:index/pipelineTrigger:PipelineTrigger test 1:3
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.