1. Packages
  2. Buildkite
  3. API Docs
  4. Pipeline
  5. Webhook
Viewing docs for Buildkite v3.2.0
published on Monday, Feb 23, 2026 by Pulumiverse
buildkite logo
Viewing docs for Buildkite v3.2.0
published on Monday, Feb 23, 2026 by Pulumiverse

    This resource manages a webhook for a Buildkite pipeline’s source repository.

    The webhook enables automatic build triggering when changes are pushed to the repository. Only one webhook can exist per pipeline - if a webhook already exists, it will be adopted into state.

    Only supported for GitHub and GitHub Enterprise repositories connected via a GitHub App.

    The repository attribute must match the pipeline’s configured repository URL. Use repository = buildkite_pipeline.<name>.repository to keep them in sync.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as buildkite from "@pulumiverse/buildkite";
    
    // create a pipeline
    const pipeline = new buildkite.pipeline.Pipeline("pipeline", {
        name: "my pipeline",
        repository: "https://github.com/my-org/my-repo.git",
    });
    // create a webhook to automatically trigger builds on push
    const webhook = new buildkite.pipeline.Webhook("webhook", {
        pipelineId: pipeline.id,
        repository: pipeline.repository,
    });
    
    import pulumi
    import pulumiverse_buildkite as buildkite
    
    # create a pipeline
    pipeline = buildkite.pipeline.Pipeline("pipeline",
        name="my pipeline",
        repository="https://github.com/my-org/my-repo.git")
    # create a webhook to automatically trigger builds on push
    webhook = buildkite.pipeline.Webhook("webhook",
        pipeline_id=pipeline.id,
        repository=pipeline.repository)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-buildkite/sdk/v3/go/buildkite/pipeline"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// create a pipeline
    		pipeline, err := pipeline.NewPipeline(ctx, "pipeline", &pipeline.PipelineArgs{
    			Name:       pulumi.String("my pipeline"),
    			Repository: pulumi.String("https://github.com/my-org/my-repo.git"),
    		})
    		if err != nil {
    			return err
    		}
    		// create a webhook to automatically trigger builds on push
    		_, err = pipeline.NewWebhook(ctx, "webhook", &pipeline.WebhookArgs{
    			PipelineId: pipeline.ID(),
    			Repository: pipeline.Repository,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Buildkite = Pulumiverse.Buildkite;
    
    return await Deployment.RunAsync(() => 
    {
        // create a pipeline
        var pipeline = new Buildkite.Pipeline.Pipeline("pipeline", new()
        {
            Name = "my pipeline",
            Repository = "https://github.com/my-org/my-repo.git",
        });
    
        // create a webhook to automatically trigger builds on push
        var webhook = new Buildkite.Pipeline.Webhook("webhook", new()
        {
            PipelineId = pipeline.Id,
            Repository = pipeline.Repository,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.buildkite.Pipeline.Pipeline;
    import com.pulumi.buildkite.Pipeline.PipelineArgs;
    import com.pulumi.buildkite.Pipeline.Webhook;
    import com.pulumi.buildkite.Pipeline.WebhookArgs;
    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) {
            // create a pipeline
            var pipeline = new Pipeline("pipeline", PipelineArgs.builder()
                .name("my pipeline")
                .repository("https://github.com/my-org/my-repo.git")
                .build());
    
            // create a webhook to automatically trigger builds on push
            var webhook = new Webhook("webhook", WebhookArgs.builder()
                .pipelineId(pipeline.id())
                .repository(pipeline.repository())
                .build());
    
        }
    }
    
    resources:
      # create a pipeline
      pipeline:
        type: buildkite:Pipeline:Pipeline
        properties:
          name: my pipeline
          repository: https://github.com/my-org/my-repo.git
      # create a webhook to automatically trigger builds on push
      webhook:
        type: buildkite:Pipeline:Webhook
        properties:
          pipelineId: ${pipeline.id}
          repository: ${pipeline.repository}
    

    Create Webhook Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Webhook(name: string, args: WebhookArgs, opts?: CustomResourceOptions);
    @overload
    def Webhook(resource_name: str,
                args: WebhookArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Webhook(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                pipeline_id: Optional[str] = None,
                repository: Optional[str] = None)
    func NewWebhook(ctx *Context, name string, args WebhookArgs, opts ...ResourceOption) (*Webhook, error)
    public Webhook(string name, WebhookArgs args, CustomResourceOptions? opts = null)
    public Webhook(String name, WebhookArgs args)
    public Webhook(String name, WebhookArgs args, CustomResourceOptions options)
    
    type: buildkite:Pipeline:Webhook
    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 WebhookArgs
    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 WebhookArgs
    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 WebhookArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WebhookArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WebhookArgs
    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 webhookResource = new Buildkite.Pipeline.Webhook("webhookResource", new()
    {
        PipelineId = "string",
        Repository = "string",
    });
    
    example, err := pipeline.NewWebhook(ctx, "webhookResource", &pipeline.WebhookArgs{
    	PipelineId: pulumi.String("string"),
    	Repository: pulumi.String("string"),
    })
    
    var webhookResource = new Webhook("webhookResource", WebhookArgs.builder()
        .pipelineId("string")
        .repository("string")
        .build());
    
    webhook_resource = buildkite.pipeline.Webhook("webhookResource",
        pipeline_id="string",
        repository="string")
    
    const webhookResource = new buildkite.pipeline.Webhook("webhookResource", {
        pipelineId: "string",
        repository: "string",
    });
    
    type: buildkite:Pipeline:Webhook
    properties:
        pipelineId: string
        repository: string
    

    Webhook 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 Webhook resource accepts the following input properties:

    PipelineId string
    The GraphQL ID of the pipeline.
    Repository string
    The repository URL the webhook is configured for. The webhook will be replaced when this value changes.
    PipelineId string
    The GraphQL ID of the pipeline.
    Repository string
    The repository URL the webhook is configured for. The webhook will be replaced when this value changes.
    pipelineId String
    The GraphQL ID of the pipeline.
    repository String
    The repository URL the webhook is configured for. The webhook will be replaced when this value changes.
    pipelineId string
    The GraphQL ID of the pipeline.
    repository string
    The repository URL the webhook is configured for. The webhook will be replaced when this value changes.
    pipeline_id str
    The GraphQL ID of the pipeline.
    repository str
    The repository URL the webhook is configured for. The webhook will be replaced when this value changes.
    pipelineId String
    The GraphQL ID of the pipeline.
    repository String
    The repository URL the webhook is configured for. The webhook will be replaced when this value changes.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    WebhookUrl string
    The Buildkite webhook URL that receives events from the repository.
    Id string
    The provider-assigned unique ID for this managed resource.
    WebhookUrl string
    The Buildkite webhook URL that receives events from the repository.
    id String
    The provider-assigned unique ID for this managed resource.
    webhookUrl String
    The Buildkite webhook URL that receives events from the repository.
    id string
    The provider-assigned unique ID for this managed resource.
    webhookUrl string
    The Buildkite webhook URL that receives events from the repository.
    id str
    The provider-assigned unique ID for this managed resource.
    webhook_url str
    The Buildkite webhook URL that receives events from the repository.
    id String
    The provider-assigned unique ID for this managed resource.
    webhookUrl String
    The Buildkite webhook URL that receives events from the repository.

    Look up Existing Webhook Resource

    Get an existing Webhook 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?: WebhookState, opts?: CustomResourceOptions): Webhook
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            pipeline_id: Optional[str] = None,
            repository: Optional[str] = None,
            webhook_url: Optional[str] = None) -> Webhook
    func GetWebhook(ctx *Context, name string, id IDInput, state *WebhookState, opts ...ResourceOption) (*Webhook, error)
    public static Webhook Get(string name, Input<string> id, WebhookState? state, CustomResourceOptions? opts = null)
    public static Webhook get(String name, Output<String> id, WebhookState state, CustomResourceOptions options)
    resources:  _:    type: buildkite:Pipeline:Webhook    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.
    The following state arguments are supported:
    PipelineId string
    The GraphQL ID of the pipeline.
    Repository string
    The repository URL the webhook is configured for. The webhook will be replaced when this value changes.
    WebhookUrl string
    The Buildkite webhook URL that receives events from the repository.
    PipelineId string
    The GraphQL ID of the pipeline.
    Repository string
    The repository URL the webhook is configured for. The webhook will be replaced when this value changes.
    WebhookUrl string
    The Buildkite webhook URL that receives events from the repository.
    pipelineId String
    The GraphQL ID of the pipeline.
    repository String
    The repository URL the webhook is configured for. The webhook will be replaced when this value changes.
    webhookUrl String
    The Buildkite webhook URL that receives events from the repository.
    pipelineId string
    The GraphQL ID of the pipeline.
    repository string
    The repository URL the webhook is configured for. The webhook will be replaced when this value changes.
    webhookUrl string
    The Buildkite webhook URL that receives events from the repository.
    pipeline_id str
    The GraphQL ID of the pipeline.
    repository str
    The repository URL the webhook is configured for. The webhook will be replaced when this value changes.
    webhook_url str
    The Buildkite webhook URL that receives events from the repository.
    pipelineId String
    The GraphQL ID of the pipeline.
    repository String
    The repository URL the webhook is configured for. The webhook will be replaced when this value changes.
    webhookUrl String
    The Buildkite webhook URL that receives events from the repository.

    Import

    Using pulumi import, import resources using the id. For example:

    import a pipeline webhook using the pipeline’s GraphQL ID

    you can use this query to find the pipeline ID:

    query getPipelineId {

    pipeline(slug: “ORGANIZATION_SLUG/PIPELINE_SLUG”) {

    id
    

    }

    }

    $ pulumi import buildkite:Pipeline/webhook:Webhook webhook UGlwZWxpbmUtLS0wMTkzYTNlOC1lYzc4LTQyNWEtYTM0Ny03YzRjNDczZDFlMGE=
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    buildkite pulumiverse/pulumi-buildkite
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the buildkite Terraform Provider.
    buildkite logo
    Viewing docs for Buildkite v3.2.0
    published on Monday, Feb 23, 2026 by Pulumiverse
      Try Pulumi Cloud free. Your team will thank you.