Viewing docs for Buildkite v3.2.0
published on Monday, Feb 23, 2026 by Pulumiverse
published on Monday, Feb 23, 2026 by Pulumiverse
Viewing docs for Buildkite v3.2.0
published on Monday, Feb 23, 2026 by Pulumiverse
published on Monday, Feb 23, 2026 by Pulumiverse
Use this data source to retrieve a pipeline template by its ID or name.
More information on pipeline templates can be found in the documentation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as buildkite from "@pulumiverse/buildkite";
const repository = "git@github.com:my-org/my-repo.git";
const devTemplate = buildkite.Pipeline.getTemplate({
id: templateDev.id,
});
const frontendTemplate = buildkite.Pipeline.getTemplate({
name: "Frontend app template",
});
const apiv2Dev = new buildkite.pipeline.Pipeline("apiv2_dev", {
name: "API v2",
repository: repository,
pipelineTemplateId: devTemplate.then(devTemplate => devTemplate.id),
});
const frontend = new buildkite.pipeline.Pipeline("frontend", {
name: "Frontend",
repository: repository,
pipelineTemplateId: frontendTemplate.then(frontendTemplate => frontendTemplate.id),
});
import pulumi
import pulumi_buildkite as buildkite
import pulumiverse_buildkite as buildkite
repository = "git@github.com:my-org/my-repo.git"
dev_template = buildkite.Pipeline.get_template(id=template_dev["id"])
frontend_template = buildkite.Pipeline.get_template(name="Frontend app template")
apiv2_dev = buildkite.pipeline.Pipeline("apiv2_dev",
name="API v2",
repository=repository,
pipeline_template_id=dev_template.id)
frontend = buildkite.pipeline.Pipeline("frontend",
name="Frontend",
repository=repository,
pipeline_template_id=frontend_template.id)
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 {
repository := "git@github.com:my-org/my-repo.git"
devTemplate, err := pipeline.GetTemplate(ctx, &pipeline.GetTemplateArgs{
Id: pulumi.StringRef(templateDev.Id),
}, nil)
if err != nil {
return err
}
frontendTemplate, err := pipeline.GetTemplate(ctx, &pipeline.GetTemplateArgs{
Name: pulumi.StringRef("Frontend app template"),
}, nil)
if err != nil {
return err
}
_, err = pipeline.NewPipeline(ctx, "apiv2_dev", &pipeline.PipelineArgs{
Name: pulumi.String("API v2"),
Repository: pulumi.String(repository),
PipelineTemplateId: pulumi.String(devTemplate.Id),
})
if err != nil {
return err
}
_, err = pipeline.NewPipeline(ctx, "frontend", &pipeline.PipelineArgs{
Name: pulumi.String("Frontend"),
Repository: pulumi.String(repository),
PipelineTemplateId: pulumi.String(frontendTemplate.Id),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Buildkite = Pulumiverse.Buildkite;
return await Deployment.RunAsync(() =>
{
var repository = "git@github.com:my-org/my-repo.git";
var devTemplate = Buildkite.Pipeline.GetTemplate.Invoke(new()
{
Id = templateDev.Id,
});
var frontendTemplate = Buildkite.Pipeline.GetTemplate.Invoke(new()
{
Name = "Frontend app template",
});
var apiv2Dev = new Buildkite.Pipeline.Pipeline("apiv2_dev", new()
{
Name = "API v2",
Repository = repository,
PipelineTemplateId = devTemplate.Apply(getTemplateResult => getTemplateResult.Id),
});
var frontend = new Buildkite.Pipeline.Pipeline("frontend", new()
{
Name = "Frontend",
Repository = repository,
PipelineTemplateId = frontendTemplate.Apply(getTemplateResult => getTemplateResult.Id),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.buildkite.Pipeline.PipelineFunctions;
import com.pulumi.buildkite.Pipeline.inputs.GetTemplateArgs;
import com.pulumi.buildkite.Pipeline.Pipeline;
import com.pulumi.buildkite.Pipeline.PipelineArgs;
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) {
final var repository = "git@github.com:my-org/my-repo.git";
final var devTemplate = PipelineFunctions.getTemplate(GetTemplateArgs.builder()
.id(templateDev.id())
.build());
final var frontendTemplate = PipelineFunctions.getTemplate(GetTemplateArgs.builder()
.name("Frontend app template")
.build());
var apiv2Dev = new Pipeline("apiv2Dev", PipelineArgs.builder()
.name("API v2")
.repository(repository)
.pipelineTemplateId(devTemplate.id())
.build());
var frontend = new Pipeline("frontend", PipelineArgs.builder()
.name("Frontend")
.repository(repository)
.pipelineTemplateId(frontendTemplate.id())
.build());
}
}
resources:
apiv2Dev:
type: buildkite:Pipeline:Pipeline
name: apiv2_dev
properties:
name: API v2
repository: ${repository}
pipelineTemplateId: ${devTemplate.id}
frontend:
type: buildkite:Pipeline:Pipeline
properties:
name: Frontend
repository: ${repository}
pipelineTemplateId: ${frontendTemplate.id}
variables:
repository: git@github.com:my-org/my-repo.git
devTemplate:
fn::invoke:
function: buildkite:Pipeline:getTemplate
arguments:
id: ${templateDev.id}
frontendTemplate:
fn::invoke:
function: buildkite:Pipeline:getTemplate
arguments:
name: Frontend app template
Using getTemplate
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getTemplate(args: GetTemplateArgs, opts?: InvokeOptions): Promise<GetTemplateResult>
function getTemplateOutput(args: GetTemplateOutputArgs, opts?: InvokeOptions): Output<GetTemplateResult>def get_template(id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTemplateResult
def get_template_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTemplateResult]func LookupTemplate(ctx *Context, args *LookupTemplateArgs, opts ...InvokeOption) (*LookupTemplateResult, error)
func LookupTemplateOutput(ctx *Context, args *LookupTemplateOutputArgs, opts ...InvokeOption) LookupTemplateResultOutput> Note: This function is named LookupTemplate in the Go SDK.
public static class GetTemplate
{
public static Task<GetTemplateResult> InvokeAsync(GetTemplateArgs args, InvokeOptions? opts = null)
public static Output<GetTemplateResult> Invoke(GetTemplateInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetTemplateResult> getTemplate(GetTemplateArgs args, InvokeOptions options)
public static Output<GetTemplateResult> getTemplate(GetTemplateArgs args, InvokeOptions options)
fn::invoke:
function: buildkite:Pipeline/getTemplate:getTemplate
arguments:
# arguments dictionaryThe following arguments are supported:
getTemplate Result
The following output properties are available:
- Available bool
- If the pipeline template is available for assignment by non admin users.
- Configuration string
- The YAML step configuration for the pipeline template.
- Description string
- The description for the pipeline template.
- Id string
- The GraphQL ID of the pipeline template.
- Name string
- The name of the pipeline template.
- Uuid string
- The UUID of the pipeline template.
- Available bool
- If the pipeline template is available for assignment by non admin users.
- Configuration string
- The YAML step configuration for the pipeline template.
- Description string
- The description for the pipeline template.
- Id string
- The GraphQL ID of the pipeline template.
- Name string
- The name of the pipeline template.
- Uuid string
- The UUID of the pipeline template.
- available Boolean
- If the pipeline template is available for assignment by non admin users.
- configuration String
- The YAML step configuration for the pipeline template.
- description String
- The description for the pipeline template.
- id String
- The GraphQL ID of the pipeline template.
- name String
- The name of the pipeline template.
- uuid String
- The UUID of the pipeline template.
- available boolean
- If the pipeline template is available for assignment by non admin users.
- configuration string
- The YAML step configuration for the pipeline template.
- description string
- The description for the pipeline template.
- id string
- The GraphQL ID of the pipeline template.
- name string
- The name of the pipeline template.
- uuid string
- The UUID of the pipeline template.
- available bool
- If the pipeline template is available for assignment by non admin users.
- configuration str
- The YAML step configuration for the pipeline template.
- description str
- The description for the pipeline template.
- id str
- The GraphQL ID of the pipeline template.
- name str
- The name of the pipeline template.
- uuid str
- The UUID of the pipeline template.
- available Boolean
- If the pipeline template is available for assignment by non admin users.
- configuration String
- The YAML step configuration for the pipeline template.
- description String
- The description for the pipeline template.
- id String
- The GraphQL ID of the pipeline template.
- name String
- The name of the pipeline template.
- uuid String
- The UUID of the pipeline template.
Package Details
- Repository
- buildkite pulumiverse/pulumi-buildkite
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
buildkiteTerraform Provider.
Viewing docs for Buildkite v3.2.0
published on Monday, Feb 23, 2026 by Pulumiverse
published on Monday, Feb 23, 2026 by Pulumiverse
