1. Packages
  2. Buildkite
  3. API Docs
  4. Cluster
  5. getCluster
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

    Use this data source to retrieve a cluster by name. You can find out more about clusters in the Buildkite documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as buildkite from "@pulumiverse/buildkite";
    
    // Find the "default" cluster
    const _default = buildkite.Cluster.getCluster({
        name: "default",
    });
    // Assign a pipeline to that cluster
    const terraform_provider_buildkite = new buildkite.pipeline.Pipeline("terraform-provider-buildkite", {
        name: "terraform-provider-buildkite",
        repository: "git@github.com:buildkite/terraform-provider-buildkite.git",
        clusterId: _default.then(_default => _default.id),
    });
    
    import pulumi
    import pulumi_buildkite as buildkite
    import pulumiverse_buildkite as buildkite
    
    # Find the "default" cluster
    default = buildkite.Cluster.get_cluster(name="default")
    # Assign a pipeline to that cluster
    terraform_provider_buildkite = buildkite.pipeline.Pipeline("terraform-provider-buildkite",
        name="terraform-provider-buildkite",
        repository="git@github.com:buildkite/terraform-provider-buildkite.git",
        cluster_id=default.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-buildkite/sdk/v3/go/buildkite/cluster"
    	"github.com/pulumiverse/pulumi-buildkite/sdk/v3/go/buildkite/pipeline"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Find the "default" cluster
    		_default, err := cluster.GetCluster(ctx, &cluster.GetClusterArgs{
    			Name: "default",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Assign a pipeline to that cluster
    		_, err = pipeline.NewPipeline(ctx, "terraform-provider-buildkite", &pipeline.PipelineArgs{
    			Name:       pulumi.String("terraform-provider-buildkite"),
    			Repository: pulumi.String("git@github.com:buildkite/terraform-provider-buildkite.git"),
    			ClusterId:  pulumi.String(_default.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(() => 
    {
        // Find the "default" cluster
        var @default = Buildkite.Cluster.GetCluster.Invoke(new()
        {
            Name = "default",
        });
    
        // Assign a pipeline to that cluster
        var terraform_provider_buildkite = new Buildkite.Pipeline.Pipeline("terraform-provider-buildkite", new()
        {
            Name = "terraform-provider-buildkite",
            Repository = "git@github.com:buildkite/terraform-provider-buildkite.git",
            ClusterId = @default.Apply(@default => @default.Apply(getClusterResult => getClusterResult.Id)),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.buildkite.Cluster.ClusterFunctions;
    import com.pulumi.buildkite.Cluster.inputs.GetClusterArgs;
    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) {
            // Find the "default" cluster
            final var default = ClusterFunctions.getCluster(GetClusterArgs.builder()
                .name("default")
                .build());
    
            // Assign a pipeline to that cluster
            var terraform_provider_buildkite = new Pipeline("terraform-provider-buildkite", PipelineArgs.builder()
                .name("terraform-provider-buildkite")
                .repository("git@github.com:buildkite/terraform-provider-buildkite.git")
                .clusterId(default_.id())
                .build());
    
        }
    }
    
    resources:
      # Assign a pipeline to that cluster
      terraform-provider-buildkite:
        type: buildkite:Pipeline:Pipeline
        properties:
          name: terraform-provider-buildkite
          repository: git@github.com:buildkite/terraform-provider-buildkite.git
          clusterId: ${default.id}
    variables:
      # Find the "default" cluster
      default:
        fn::invoke:
          function: buildkite:Cluster:getCluster
          arguments:
            name: default
    

    Using getCluster

    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 getCluster(args: GetClusterArgs, opts?: InvokeOptions): Promise<GetClusterResult>
    function getClusterOutput(args: GetClusterOutputArgs, opts?: InvokeOptions): Output<GetClusterResult>
    def get_cluster(name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetClusterResult
    def get_cluster_output(name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetClusterResult]
    func LookupCluster(ctx *Context, args *LookupClusterArgs, opts ...InvokeOption) (*LookupClusterResult, error)
    func LookupClusterOutput(ctx *Context, args *LookupClusterOutputArgs, opts ...InvokeOption) LookupClusterResultOutput

    > Note: This function is named LookupCluster in the Go SDK.

    public static class GetCluster 
    {
        public static Task<GetClusterResult> InvokeAsync(GetClusterArgs args, InvokeOptions? opts = null)
        public static Output<GetClusterResult> Invoke(GetClusterInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetClusterResult> getCluster(GetClusterArgs args, InvokeOptions options)
    public static Output<GetClusterResult> getCluster(GetClusterArgs args, InvokeOptions options)
    
    fn::invoke:
      function: buildkite:Cluster/getCluster:getCluster
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the cluster to retrieve.
    Name string
    The name of the cluster to retrieve.
    name String
    The name of the cluster to retrieve.
    name string
    The name of the cluster to retrieve.
    name str
    The name of the cluster to retrieve.
    name String
    The name of the cluster to retrieve.

    getCluster Result

    The following output properties are available:

    Color string
    The color of the cluster.
    Description string
    The description of the cluster.
    Emoji string
    The emoji of the cluster.
    Id string
    The GraphQL ID of the cluster.
    Maintainers List<Pulumiverse.Buildkite.Cluster.Outputs.GetClusterMaintainer>
    List of maintainers (users and teams) for this cluster.
    Name string
    The name of the cluster to retrieve.
    Uuid string
    The UUID of the cluster
    Color string
    The color of the cluster.
    Description string
    The description of the cluster.
    Emoji string
    The emoji of the cluster.
    Id string
    The GraphQL ID of the cluster.
    Maintainers []GetClusterMaintainerType
    List of maintainers (users and teams) for this cluster.
    Name string
    The name of the cluster to retrieve.
    Uuid string
    The UUID of the cluster
    color String
    The color of the cluster.
    description String
    The description of the cluster.
    emoji String
    The emoji of the cluster.
    id String
    The GraphQL ID of the cluster.
    maintainers List<GetMaintainer>
    List of maintainers (users and teams) for this cluster.
    name String
    The name of the cluster to retrieve.
    uuid String
    The UUID of the cluster
    color string
    The color of the cluster.
    description string
    The description of the cluster.
    emoji string
    The emoji of the cluster.
    id string
    The GraphQL ID of the cluster.
    maintainers GetClusterMaintainer[]
    List of maintainers (users and teams) for this cluster.
    name string
    The name of the cluster to retrieve.
    uuid string
    The UUID of the cluster
    color str
    The color of the cluster.
    description str
    The description of the cluster.
    emoji str
    The emoji of the cluster.
    id str
    The GraphQL ID of the cluster.
    maintainers Sequence[GetClusterMaintainer]
    List of maintainers (users and teams) for this cluster.
    name str
    The name of the cluster to retrieve.
    uuid str
    The UUID of the cluster
    color String
    The color of the cluster.
    description String
    The description of the cluster.
    emoji String
    The emoji of the cluster.
    id String
    The GraphQL ID of the cluster.
    maintainers List<Property Map>
    List of maintainers (users and teams) for this cluster.
    name String
    The name of the cluster to retrieve.
    uuid String
    The UUID of the cluster

    Supporting Types

    GetClusterMaintainer

    ActorEmail string
    The email of the actor (only for users).
    ActorName string
    The name of the actor.
    ActorSlug string
    The slug of the actor (only for teams).
    ActorType string
    The type of the actor (user or team).
    ActorUuid string
    The UUID of the actor (user or team).
    PermissionUuid string
    The UUID of the maintainer permission.
    ActorEmail string
    The email of the actor (only for users).
    ActorName string
    The name of the actor.
    ActorSlug string
    The slug of the actor (only for teams).
    ActorType string
    The type of the actor (user or team).
    ActorUuid string
    The UUID of the actor (user or team).
    PermissionUuid string
    The UUID of the maintainer permission.
    actorEmail String
    The email of the actor (only for users).
    actorName String
    The name of the actor.
    actorSlug String
    The slug of the actor (only for teams).
    actorType String
    The type of the actor (user or team).
    actorUuid String
    The UUID of the actor (user or team).
    permissionUuid String
    The UUID of the maintainer permission.
    actorEmail string
    The email of the actor (only for users).
    actorName string
    The name of the actor.
    actorSlug string
    The slug of the actor (only for teams).
    actorType string
    The type of the actor (user or team).
    actorUuid string
    The UUID of the actor (user or team).
    permissionUuid string
    The UUID of the maintainer permission.
    actor_email str
    The email of the actor (only for users).
    actor_name str
    The name of the actor.
    actor_slug str
    The slug of the actor (only for teams).
    actor_type str
    The type of the actor (user or team).
    actor_uuid str
    The UUID of the actor (user or team).
    permission_uuid str
    The UUID of the maintainer permission.
    actorEmail String
    The email of the actor (only for users).
    actorName String
    The name of the actor.
    actorSlug String
    The slug of the actor (only for teams).
    actorType String
    The type of the actor (user or team).
    actorUuid String
    The UUID of the actor (user or team).
    permissionUuid String
    The UUID of the maintainer permission.

    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.