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

buildkite.Cluster.ClusterDefaultQueue

Explore with Pulumi AI

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

    This resource allows you to manage a default queue for a Buildkite Cluster. Find out more information in our documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as buildkite from "@pulumiverse/buildkite";
    
    // create a cluster
    const primaryCluster = new buildkite.cluster.Cluster("primaryCluster", {
        description: "Runs the monolith build and deploy",
        emoji: "πŸš€",
        color: "#bada55",
    });
    const _default = new buildkite.cluster.ClusterQueue("default", {
        clusterId: primaryCluster.id,
        key: "default",
    });
    const primaryClusterDefaultQueue = new buildkite.cluster.ClusterDefaultQueue("primaryClusterDefaultQueue", {
        clusterId: primaryCluster.id,
        queueId: _default.id,
    });
    
    import pulumi
    import pulumiverse_buildkite as buildkite
    
    # create a cluster
    primary_cluster = buildkite.cluster.Cluster("primaryCluster",
        description="Runs the monolith build and deploy",
        emoji="πŸš€",
        color="#bada55")
    default = buildkite.cluster.ClusterQueue("default",
        cluster_id=primary_cluster.id,
        key="default")
    primary_cluster_default_queue = buildkite.cluster.ClusterDefaultQueue("primaryClusterDefaultQueue",
        cluster_id=primary_cluster.id,
        queue_id=default.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-buildkite/sdk/v3/go/buildkite/Cluster"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// create a cluster
    		primaryCluster, err := Cluster.NewCluster(ctx, "primaryCluster", &Cluster.ClusterArgs{
    			Description: pulumi.String("Runs the monolith build and deploy"),
    			Emoji:       pulumi.String("πŸš€"),
    			Color:       pulumi.String("#bada55"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = Cluster.NewClusterQueue(ctx, "default", &Cluster.ClusterQueueArgs{
    			ClusterId: primaryCluster.ID(),
    			Key:       pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = Cluster.NewClusterDefaultQueue(ctx, "primaryClusterDefaultQueue", &Cluster.ClusterDefaultQueueArgs{
    			ClusterId: primaryCluster.ID(),
    			QueueId:   _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(() => 
    {
        // create a cluster
        var primaryCluster = new Buildkite.Cluster.Cluster("primaryCluster", new()
        {
            Description = "Runs the monolith build and deploy",
            Emoji = "πŸš€",
            Color = "#bada55",
        });
    
        var @default = new Buildkite.Cluster.ClusterQueue("default", new()
        {
            ClusterId = primaryCluster.Id,
            Key = "default",
        });
    
        var primaryClusterDefaultQueue = new Buildkite.Cluster.ClusterDefaultQueue("primaryClusterDefaultQueue", new()
        {
            ClusterId = primaryCluster.Id,
            QueueId = @default.Id,
        });
    
    });
    
    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.Cluster.ClusterQueue;
    import com.pulumi.buildkite.Cluster.ClusterQueueArgs;
    import com.pulumi.buildkite.Cluster.ClusterDefaultQueue;
    import com.pulumi.buildkite.Cluster.ClusterDefaultQueueArgs;
    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 primaryCluster = new Cluster("primaryCluster", ClusterArgs.builder()        
                .description("Runs the monolith build and deploy")
                .emoji("πŸš€")
                .color("#bada55")
                .build());
    
            var default_ = new ClusterQueue("default", ClusterQueueArgs.builder()        
                .clusterId(primaryCluster.id())
                .key("default")
                .build());
    
            var primaryClusterDefaultQueue = new ClusterDefaultQueue("primaryClusterDefaultQueue", ClusterDefaultQueueArgs.builder()        
                .clusterId(primaryCluster.id())
                .queueId(default_.id())
                .build());
    
        }
    }
    
    resources:
      # create a cluster
      primaryCluster:
        type: buildkite:Cluster:Cluster
        properties:
          description: Runs the monolith build and deploy
          emoji: "\U0001F680"
          color: '#bada55'
      default:
        type: buildkite:Cluster:ClusterQueue
        properties:
          clusterId: ${primaryCluster.id}
          key: default
      primaryClusterDefaultQueue:
        type: buildkite:Cluster:ClusterDefaultQueue
        properties:
          clusterId: ${primaryCluster.id}
          queueId: ${default.id}
    

    Create ClusterDefaultQueue Resource

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

    Constructor syntax

    new ClusterDefaultQueue(name: string, args: ClusterDefaultQueueArgs, opts?: CustomResourceOptions);
    @overload
    def ClusterDefaultQueue(resource_name: str,
                            args: ClusterDefaultQueueArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def ClusterDefaultQueue(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            cluster_id: Optional[str] = None,
                            queue_id: Optional[str] = None)
    func NewClusterDefaultQueue(ctx *Context, name string, args ClusterDefaultQueueArgs, opts ...ResourceOption) (*ClusterDefaultQueue, error)
    public ClusterDefaultQueue(string name, ClusterDefaultQueueArgs args, CustomResourceOptions? opts = null)
    public ClusterDefaultQueue(String name, ClusterDefaultQueueArgs args)
    public ClusterDefaultQueue(String name, ClusterDefaultQueueArgs args, CustomResourceOptions options)
    
    type: buildkite:Cluster:ClusterDefaultQueue
    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 ClusterDefaultQueueArgs
    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 ClusterDefaultQueueArgs
    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 ClusterDefaultQueueArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ClusterDefaultQueueArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ClusterDefaultQueueArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var clusterDefaultQueueResource = new Buildkite.Cluster.ClusterDefaultQueue("clusterDefaultQueueResource", new()
    {
        ClusterId = "string",
        QueueId = "string",
    });
    
    example, err := Cluster.NewClusterDefaultQueue(ctx, "clusterDefaultQueueResource", &Cluster.ClusterDefaultQueueArgs{
    	ClusterId: pulumi.String("string"),
    	QueueId:   pulumi.String("string"),
    })
    
    var clusterDefaultQueueResource = new ClusterDefaultQueue("clusterDefaultQueueResource", ClusterDefaultQueueArgs.builder()        
        .clusterId("string")
        .queueId("string")
        .build());
    
    cluster_default_queue_resource = buildkite.cluster.ClusterDefaultQueue("clusterDefaultQueueResource",
        cluster_id="string",
        queue_id="string")
    
    const clusterDefaultQueueResource = new buildkite.cluster.ClusterDefaultQueue("clusterDefaultQueueResource", {
        clusterId: "string",
        queueId: "string",
    });
    
    type: buildkite:Cluster:ClusterDefaultQueue
    properties:
        clusterId: string
        queueId: string
    

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

    ClusterId string
    The GraphQL ID of the cluster to which to add a default queue.
    QueueId string
    The GraphQL ID of the cluster queue to set as default on the cluster.
    ClusterId string
    The GraphQL ID of the cluster to which to add a default queue.
    QueueId string
    The GraphQL ID of the cluster queue to set as default on the cluster.
    clusterId String
    The GraphQL ID of the cluster to which to add a default queue.
    queueId String
    The GraphQL ID of the cluster queue to set as default on the cluster.
    clusterId string
    The GraphQL ID of the cluster to which to add a default queue.
    queueId string
    The GraphQL ID of the cluster queue to set as default on the cluster.
    cluster_id str
    The GraphQL ID of the cluster to which to add a default queue.
    queue_id str
    The GraphQL ID of the cluster queue to set as default on the cluster.
    clusterId String
    The GraphQL ID of the cluster to which to add a default queue.
    queueId String
    The GraphQL ID of the cluster queue to set as default on the cluster.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Uuid string
    The UUID of the cluster.
    Id string
    The provider-assigned unique ID for this managed resource.
    Uuid string
    The UUID of the cluster.
    id String
    The provider-assigned unique ID for this managed resource.
    uuid String
    The UUID of the cluster.
    id string
    The provider-assigned unique ID for this managed resource.
    uuid string
    The UUID of the cluster.
    id str
    The provider-assigned unique ID for this managed resource.
    uuid str
    The UUID of the cluster.
    id String
    The provider-assigned unique ID for this managed resource.
    uuid String
    The UUID of the cluster.

    Look up Existing ClusterDefaultQueue Resource

    Get an existing ClusterDefaultQueue 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?: ClusterDefaultQueueState, opts?: CustomResourceOptions): ClusterDefaultQueue
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_id: Optional[str] = None,
            queue_id: Optional[str] = None,
            uuid: Optional[str] = None) -> ClusterDefaultQueue
    func GetClusterDefaultQueue(ctx *Context, name string, id IDInput, state *ClusterDefaultQueueState, opts ...ResourceOption) (*ClusterDefaultQueue, error)
    public static ClusterDefaultQueue Get(string name, Input<string> id, ClusterDefaultQueueState? state, CustomResourceOptions? opts = null)
    public static ClusterDefaultQueue get(String name, Output<String> id, ClusterDefaultQueueState 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 GraphQL ID of the cluster to which to add a default queue.
    QueueId string
    The GraphQL ID of the cluster queue to set as default on the cluster.
    Uuid string
    The UUID of the cluster.
    ClusterId string
    The GraphQL ID of the cluster to which to add a default queue.
    QueueId string
    The GraphQL ID of the cluster queue to set as default on the cluster.
    Uuid string
    The UUID of the cluster.
    clusterId String
    The GraphQL ID of the cluster to which to add a default queue.
    queueId String
    The GraphQL ID of the cluster queue to set as default on the cluster.
    uuid String
    The UUID of the cluster.
    clusterId string
    The GraphQL ID of the cluster to which to add a default queue.
    queueId string
    The GraphQL ID of the cluster queue to set as default on the cluster.
    uuid string
    The UUID of the cluster.
    cluster_id str
    The GraphQL ID of the cluster to which to add a default queue.
    queue_id str
    The GraphQL ID of the cluster queue to set as default on the cluster.
    uuid str
    The UUID of the cluster.
    clusterId String
    The GraphQL ID of the cluster to which to add a default queue.
    queueId String
    The GraphQL ID of the cluster queue to set as default on the cluster.
    uuid String
    The UUID of the cluster.

    Import

    import a clusters default queue resource using the GraphQL ID of the cluster itself

    you can use this query to find the ID:

    query getClusters {

    organization(slug: “ORGANIZATION”){

    clusters(first: 5, order:NAME) {
    
      edges{
    
        node {
    
          id
    
          name
    
        }
    
      }
    
    }
    

    }

    }

    $ pulumi import buildkite:Cluster/clusterDefaultQueue:ClusterDefaultQueue primary Q2x1c3Rlci0tLTI3ZmFmZjA4LTA3OWEtNDk5ZC1hMmIwLTIzNmY3NWFkMWZjYg==
    

    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