buildkite.Cluster.ClusterQueue
Explore with Pulumi AI
# Resource: cluster_queue
This resource allows you to create and manage cluster queues.
Buildkite Documentation: https://buildkite.com/docs/clusters/manage-clusters#set-up-clusters-create-a-queue
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Buildkite = Pulumiverse.Buildkite;
return await Deployment.RunAsync(() =>
{
var queue1 = new Buildkite.Cluster.ClusterQueue("queue1", new()
{
ClusterId = "Q2x1c3Rlci0tLTMzMDc0ZDhiLTM4MjctNDRkNC05YTQ3LTkwN2E2NWZjODViNg==",
Description = "Prod deployment cluster queue",
Key = "prod-deploy",
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-buildkite/sdk/v2/go/buildkite/Cluster"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Cluster.NewClusterQueue(ctx, "queue1", &Cluster.ClusterQueueArgs{
ClusterId: pulumi.String("Q2x1c3Rlci0tLTMzMDc0ZDhiLTM4MjctNDRkNC05YTQ3LTkwN2E2NWZjODViNg=="),
Description: pulumi.String("Prod deployment cluster queue"),
Key: pulumi.String("prod-deploy"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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 queue1 = new ClusterQueue("queue1", ClusterQueueArgs.builder()
.clusterId("Q2x1c3Rlci0tLTMzMDc0ZDhiLTM4MjctNDRkNC05YTQ3LTkwN2E2NWZjODViNg==")
.description("Prod deployment cluster queue")
.key("prod-deploy")
.build());
}
}
import pulumi
import pulumiverse_buildkite as buildkite
queue1 = buildkite.cluster.ClusterQueue("queue1",
cluster_id="Q2x1c3Rlci0tLTMzMDc0ZDhiLTM4MjctNDRkNC05YTQ3LTkwN2E2NWZjODViNg==",
description="Prod deployment cluster queue",
key="prod-deploy")
import * as pulumi from "@pulumi/pulumi";
import * as buildkite from "@pulumiverse/buildkite";
const queue1 = new buildkite.cluster.ClusterQueue("queue1", {
clusterId: "Q2x1c3Rlci0tLTMzMDc0ZDhiLTM4MjctNDRkNC05YTQ3LTkwN2E2NWZjODViNg==",
description: "Prod deployment cluster queue",
key: "prod-deploy",
});
resources:
queue1:
type: buildkite:Cluster:ClusterQueue
properties:
clusterId: Q2x1c3Rlci0tLTMzMDc0ZDhiLTM4MjctNDRkNC05YTQ3LTkwN2E2NWZjODViNg==
description: Prod deployment cluster queue
key: prod-deploy
Create ClusterQueue Resource
new ClusterQueue(name: string, args: ClusterQueueArgs, opts?: CustomResourceOptions);
@overload
def ClusterQueue(resource_name: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
description: Optional[str] = None,
key: Optional[str] = None)
@overload
def ClusterQueue(resource_name: str,
args: ClusterQueueArgs,
opts: Optional[ResourceOptions] = 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.
- 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.
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:
- Cluster
Id string The ID of the cluster that this cluster queue belongs to.
- Key string
The key of the cluster queue.
- Description string
The description of the cluster queue.
- Cluster
Id string The ID of the cluster that this cluster queue belongs to.
- Key string
The key of the cluster queue.
- Description string
The description of the cluster queue.
- cluster
Id String The ID of the cluster that this cluster queue belongs to.
- key String
The key of the cluster queue.
- description String
The description of the cluster queue.
- cluster
Id string The ID of the cluster that this cluster queue belongs to.
- key string
The key of the cluster queue.
- description string
The description of 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
The description of the cluster queue.
- cluster
Id String The ID of the cluster that this cluster queue belongs to.
- key String
The key of the cluster queue.
- description String
The description of the cluster queue.
Outputs
All input properties are implicitly available as output properties. Additionally, the ClusterQueue resource produces the following output properties:
- Cluster
Uuid string The UUID of the cluster that this cluster queue belongs to.
- Id string
The provider-assigned unique ID for this managed resource.
- Uuid string
The UUID of the created cluster queue.
- Cluster
Uuid string The UUID of the cluster that this cluster queue belongs to.
- Id string
The provider-assigned unique ID for this managed resource.
- Uuid string
The UUID of the created cluster queue.
- cluster
Uuid String The UUID of the cluster that this cluster queue belongs to.
- id String
The provider-assigned unique ID for this managed resource.
- uuid String
The UUID of the created cluster queue.
- cluster
Uuid string The UUID of the cluster that this cluster queue belongs to.
- id string
The provider-assigned unique ID for this managed resource.
- uuid string
The UUID of the created cluster queue.
- cluster_
uuid str The UUID of the cluster that this cluster queue belongs to.
- id str
The provider-assigned unique ID for this managed resource.
- uuid str
The UUID of the created cluster queue.
- cluster
Uuid String The UUID of the cluster that this cluster queue belongs to.
- id String
The provider-assigned unique ID for this managed resource.
- uuid String
The UUID of the created 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.
- Cluster
Id string The ID of the cluster that this cluster queue belongs to.
- Cluster
Uuid string The UUID of the cluster that this cluster queue belongs to.
- Description string
The description of the cluster queue.
- Key string
The key of the cluster queue.
- Uuid string
The UUID of the created cluster queue.
- Cluster
Id string The ID of the cluster that this cluster queue belongs to.
- Cluster
Uuid string The UUID of the cluster that this cluster queue belongs to.
- Description string
The description of the cluster queue.
- Key string
The key of the cluster queue.
- Uuid string
The UUID of the created cluster queue.
- cluster
Id String The ID of the cluster that this cluster queue belongs to.
- cluster
Uuid String The UUID of the cluster that this cluster queue belongs to.
- description String
The description of the cluster queue.
- key String
The key of the cluster queue.
- uuid String
The UUID of the created cluster queue.
- cluster
Id string The ID of the cluster that this cluster queue belongs to.
- cluster
Uuid string The UUID of the cluster that this cluster queue belongs to.
- description string
The description of the cluster queue.
- key string
The key of the cluster queue.
- uuid string
The UUID of the created cluster queue.
- cluster_
id str The ID of the cluster that this cluster queue belongs to.
- cluster_
uuid str The UUID of the cluster that this cluster queue belongs to.
- description str
The description of the cluster queue.
- key str
The key of the cluster queue.
- uuid str
The UUID of the created cluster queue.
- cluster
Id String The ID of the cluster that this cluster queue belongs to.
- cluster
Uuid String The UUID of the cluster that this cluster queue belongs to.
- description String
The description of the cluster queue.
- key String
The key of the cluster queue.
- uuid String
The UUID of the created cluster queue.
Import
Cluster queues can be imported using its GraphQL ID
, along with its respective cluster UUID
, separated by a comma. e.g.
$ pulumi import buildkite:Cluster/clusterQueue:ClusterQueue test Q2x1c3RlclF1ZXVlLS0tYjJiOGRhNTEtOWY5My00Y2MyLTkyMjktMGRiNzg3ZDQzOTAz,35498aaf-ad05-4fa5-9a07-91bf6cacd2bd
To find the cluster’s UUID
to utilize, you can use the below GraphQL query below. Alternatively, you can use this pre-saved query, where you will need fo fill in the organization slug (ORGANIZATION_SLUG) for obtaining the relevant cluster name/UUID
that the cluster queue is in. graphql query getClusters {
organization(slug"ORGANIZATION_SLUG") {
clusters(first50) {
edges{
node{
name
uuid
}
}
}
} } After the cluster UUID
has been found, you can use the below GraphQL query to find the cluster queue’s GraphQL ID
. Alternatively, this pre-saved query can be used, specifying the organization slug (ORGANIZATION_SLUG) and the cluster UUID
from above (CLUSTER_UUID). graphql query getClusterQueues {
organization(slug"ORGANIZATION_SLUG") {
cluster(id"CLUSTER_UUID") {
queues(first50) {
edges {
node {
id
key
}
}
}
}
} }
Package Details
- Repository
- buildkite pulumiverse/pulumi-buildkite
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
buildkite
Terraform Provider.