1. Packages
  2. Buildkite
  3. API Docs
  4. Cluster
  5. ClusterQueue
Buildkite v3.1.6 published on Wednesday, Apr 3, 2024 by Pulumiverse

buildkite.Cluster.ClusterQueue

Explore with Pulumi AI

buildkite logo
Buildkite v3.1.6 published on Wednesday, Apr 3, 2024 by Pulumiverse

    A Cluster Queue is a queue belonging to a specific Cluster for its Agents to target builds on.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as buildkite from "@pulumiverse/buildkite";
    
    // create a cluster
    const primary = new buildkite.cluster.Cluster("primary", {
        description: "Runs the monolith build and deploy",
        emoji: "🚀",
        color: "#bada55",
    });
    const monolith = new buildkite.pipeline.Pipeline("monolith", {
        repository: "https://github.com/...",
        clusterId: primary.id,
    });
    // create a queue to put pipeline builds in
    const _default = new buildkite.cluster.ClusterQueue("default", {
        clusterId: primary.id,
        key: "default",
    });
    
    import pulumi
    import pulumiverse_buildkite as buildkite
    
    # create a cluster
    primary = buildkite.cluster.Cluster("primary",
        description="Runs the monolith build and deploy",
        emoji="🚀",
        color="#bada55")
    monolith = buildkite.pipeline.Pipeline("monolith",
        repository="https://github.com/...",
        cluster_id=primary.id)
    # create a queue to put pipeline builds in
    default = buildkite.cluster.ClusterQueue("default",
        cluster_id=primary.id,
        key="default")
    
    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 {
    		// create a cluster
    		primary, err := Cluster.NewCluster(ctx, "primary", &Cluster.ClusterArgs{
    			Description: pulumi.String("Runs the monolith build and deploy"),
    			Emoji:       pulumi.String("🚀"),
    			Color:       pulumi.String("#bada55"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = Pipeline.NewPipeline(ctx, "monolith", &Pipeline.PipelineArgs{
    			Repository: pulumi.String("https://github.com/..."),
    			ClusterId:  primary.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		// create a queue to put pipeline builds in
    		_, err = Cluster.NewClusterQueue(ctx, "default", &Cluster.ClusterQueueArgs{
    			ClusterId: primary.ID(),
    			Key:       pulumi.String("default"),
    		})
    		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 cluster
        var primary = new Buildkite.Cluster.Cluster("primary", new()
        {
            Description = "Runs the monolith build and deploy",
            Emoji = "🚀",
            Color = "#bada55",
        });
    
        var monolith = new Buildkite.Pipeline.Pipeline("monolith", new()
        {
            Repository = "https://github.com/...",
            ClusterId = primary.Id,
        });
    
        // create a queue to put pipeline builds in
        var @default = new Buildkite.Cluster.ClusterQueue("default", new()
        {
            ClusterId = primary.Id,
            Key = "default",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.buildkite.Cluster.Cluster;
    import com.pulumi.buildkite.Cluster.ClusterArgs;
    import com.pulumi.buildkite.Pipeline.Pipeline;
    import com.pulumi.buildkite.Pipeline.PipelineArgs;
    import com.pulumi.buildkite.Cluster.ClusterQueue;
    import com.pulumi.buildkite.Cluster.ClusterQueueArgs;
    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 primary = new Cluster("primary", ClusterArgs.builder()        
                .description("Runs the monolith build and deploy")
                .emoji("🚀")
                .color("#bada55")
                .build());
    
            var monolith = new Pipeline("monolith", PipelineArgs.builder()        
                .repository("https://github.com/...")
                .clusterId(primary.id())
                .build());
    
            var default_ = new ClusterQueue("default", ClusterQueueArgs.builder()        
                .clusterId(primary.id())
                .key("default")
                .build());
    
        }
    }
    
    resources:
      # create a cluster
      primary:
        type: buildkite:Cluster:Cluster
        properties:
          description: Runs the monolith build and deploy
          emoji: "\U0001F680"
          color: '#bada55'
      monolith:
        type: buildkite:Pipeline:Pipeline
        properties:
          repository: https://github.com/...
          clusterId: ${primary.id}
      # create a queue to put pipeline builds in
      default:
        type: buildkite:Cluster:ClusterQueue
        properties:
          clusterId: ${primary.id}
          key: default
    

    Create ClusterQueue Resource

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

    Constructor syntax

    new ClusterQueue(name: string, args: ClusterQueueArgs, opts?: CustomResourceOptions);
    @overload
    def ClusterQueue(resource_name: str,
                     args: ClusterQueueArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def ClusterQueue(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     cluster_id: Optional[str] = None,
                     key: Optional[str] = None,
                     description: Optional[str] = None)
    func NewClusterQueue(ctx *Context, name string, args ClusterQueueArgs, opts ...ResourceOption) (*ClusterQueue, error)
    public ClusterQueue(string name, ClusterQueueArgs args, CustomResourceOptions? opts = null)
    public ClusterQueue(String name, ClusterQueueArgs args)
    public ClusterQueue(String name, ClusterQueueArgs args, CustomResourceOptions options)
    
    type: buildkite:Cluster:ClusterQueue
    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 ClusterQueueArgs
    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 ClusterQueueArgs
    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 ClusterQueueArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ClusterQueueArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ClusterQueueArgs
    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 clusterQueueResource = new Buildkite.Cluster.ClusterQueue("clusterQueueResource", new()
    {
        ClusterId = "string",
        Key = "string",
        Description = "string",
    });
    
    example, err := Cluster.NewClusterQueue(ctx, "clusterQueueResource", &Cluster.ClusterQueueArgs{
    	ClusterId:   pulumi.String("string"),
    	Key:         pulumi.String("string"),
    	Description: pulumi.String("string"),
    })
    
    var clusterQueueResource = new ClusterQueue("clusterQueueResource", ClusterQueueArgs.builder()
        .clusterId("string")
        .key("string")
        .description("string")
        .build());
    
    cluster_queue_resource = buildkite.cluster.ClusterQueue("clusterQueueResource",
        cluster_id="string",
        key="string",
        description="string")
    
    const clusterQueueResource = new buildkite.cluster.ClusterQueue("clusterQueueResource", {
        clusterId: "string",
        key: "string",
        description: "string",
    });
    
    type: buildkite:Cluster:ClusterQueue
    properties:
        clusterId: string
        description: string
        key: string
    

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

    ClusterId string
    The ID of the cluster that this cluster queue belongs to.
    Key string
    The key of the cluster queue.
    Description string
    A description for the cluster queue.
    ClusterId string
    The ID of the cluster that this cluster queue belongs to.
    Key string
    The key of the cluster queue.
    Description string
    A description for the cluster queue.
    clusterId String
    The ID of the cluster that this cluster queue belongs to.
    key String
    The key of the cluster queue.
    description String
    A description for the cluster queue.
    clusterId string
    The ID of the cluster that this cluster queue belongs to.
    key string
    The key of the cluster queue.
    description string
    A description for the cluster queue.
    cluster_id str
    The ID of the cluster that this cluster queue belongs to.
    key str
    The key of the cluster queue.
    description str
    A description for the cluster queue.
    clusterId String
    The ID of the cluster that this cluster queue belongs to.
    key String
    The key of the cluster queue.
    description String
    A description for the cluster queue.

    Outputs

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

    ClusterUuid string
    The UUID of the cluster this queue belongs to.
    Id string
    The provider-assigned unique ID for this managed resource.
    Uuid string
    The UUID of the cluster queue.
    ClusterUuid string
    The UUID of the cluster this queue belongs to.
    Id string
    The provider-assigned unique ID for this managed resource.
    Uuid string
    The UUID of the cluster queue.
    clusterUuid String
    The UUID of the cluster this queue belongs to.
    id String
    The provider-assigned unique ID for this managed resource.
    uuid String
    The UUID of the cluster queue.
    clusterUuid string
    The UUID of the cluster this queue belongs to.
    id string
    The provider-assigned unique ID for this managed resource.
    uuid string
    The UUID of the cluster queue.
    cluster_uuid str
    The UUID of the cluster this queue belongs to.
    id str
    The provider-assigned unique ID for this managed resource.
    uuid str
    The UUID of the cluster queue.
    clusterUuid String
    The UUID of the cluster this queue belongs to.
    id String
    The provider-assigned unique ID for this managed resource.
    uuid String
    The UUID of the cluster queue.

    Look up Existing ClusterQueue Resource

    Get an existing ClusterQueue 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?: ClusterQueueState, opts?: CustomResourceOptions): ClusterQueue
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_id: Optional[str] = None,
            cluster_uuid: Optional[str] = None,
            description: Optional[str] = None,
            key: Optional[str] = None,
            uuid: Optional[str] = None) -> ClusterQueue
    func GetClusterQueue(ctx *Context, name string, id IDInput, state *ClusterQueueState, opts ...ResourceOption) (*ClusterQueue, error)
    public static ClusterQueue Get(string name, Input<string> id, ClusterQueueState? state, CustomResourceOptions? opts = null)
    public static ClusterQueue get(String name, Output<String> id, ClusterQueueState 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:
    ClusterId string
    The ID of the cluster that this cluster queue belongs to.
    ClusterUuid string
    The UUID of the cluster this queue belongs to.
    Description string
    A description for the cluster queue.
    Key string
    The key of the cluster queue.
    Uuid string
    The UUID of the cluster queue.
    ClusterId string
    The ID of the cluster that this cluster queue belongs to.
    ClusterUuid string
    The UUID of the cluster this queue belongs to.
    Description string
    A description for the cluster queue.
    Key string
    The key of the cluster queue.
    Uuid string
    The UUID of the cluster queue.
    clusterId String
    The ID of the cluster that this cluster queue belongs to.
    clusterUuid String
    The UUID of the cluster this queue belongs to.
    description String
    A description for the cluster queue.
    key String
    The key of the cluster queue.
    uuid String
    The UUID of the cluster queue.
    clusterId string
    The ID of the cluster that this cluster queue belongs to.
    clusterUuid string
    The UUID of the cluster this queue belongs to.
    description string
    A description for the cluster queue.
    key string
    The key of the cluster queue.
    uuid string
    The UUID of the cluster queue.
    cluster_id str
    The ID of the cluster that this cluster queue belongs to.
    cluster_uuid str
    The UUID of the cluster this queue belongs to.
    description str
    A description for the cluster queue.
    key str
    The key of the cluster queue.
    uuid str
    The UUID of the cluster queue.
    clusterId String
    The ID of the cluster that this cluster queue belongs to.
    clusterUuid String
    The UUID of the cluster this queue belongs to.
    description String
    A description for the cluster queue.
    key String
    The key of the cluster queue.
    uuid String
    The UUID of the cluster queue.

    Import

    import a cluster queue resource using the GraphQL ID along with its respective cluster UUID

    you can use this query to find the ID:

    query getClusterQueues {

    organization(slug: “ORGANIZATION_SLUG”) {

    cluster(id: "CLUSTER_UUID") {
    
      queues(first: 50) {
    
        edges {
    
          node {
    
            id
    
            key
    
          }
    
        }
    
      }
    
    }
    

    }

    }

    $ pulumi import buildkite:Cluster/clusterQueue:ClusterQueue test Q2x1c3RlclF1ZXVlLS0tYjJiOGRhNTEtOWY5My00Y2MyLTkyMjktMGRiNzg3ZDQzOTAz,35498aaf-ad05-4fa5-9a07-91bf6cacd2bd
    

    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
    Buildkite v3.1.6 published on Wednesday, Apr 3, 2024 by Pulumiverse