buildkite logo
Buildkite v0.2.5, Dec 2 22

buildkite.AgentToken

# Resource: agent_token

This resource allows you to create and manage agent tokens.

Buildkite Documentation: https://buildkite.com/docs/agent/v3/tokens

Example Usage

using System.Collections.Generic;
using Pulumi;
using Buildkite = Pulumi.Buildkite;

return await Deployment.RunAsync(() => 
{
    var fleet = new Buildkite.AgentToken("fleet", new()
    {
        Description = "token used by build fleet",
    });

});
package main

import (
	"github.com/grapl-security/pulumi-buildkite/sdk/go/buildkite"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := buildkite.NewAgentToken(ctx, "fleet", &buildkite.AgentTokenArgs{
			Description: pulumi.String("token used by build fleet"),
		})
		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.AgentToken;
import com.pulumi.buildkite.AgentTokenArgs;
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 fleet = new AgentToken("fleet", AgentTokenArgs.builder()        
            .description("token used by build fleet")
            .build());

    }
}
import pulumi
import pulumi_buildkite as buildkite

fleet = buildkite.AgentToken("fleet", description="token used by build fleet")
import * as pulumi from "@pulumi/pulumi";
import * as buildkite from "@pulumi/buildkite";

const fleet = new buildkite.AgentToken("fleet", {
    description: "token used by build fleet",
});
resources:
  fleet:
    type: buildkite:AgentToken
    properties:
      description: token used by build fleet

Create AgentToken Resource

new AgentToken(name: string, args?: AgentTokenArgs, opts?: CustomResourceOptions);
@overload
def AgentToken(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               description: Optional[str] = None)
@overload
def AgentToken(resource_name: str,
               args: Optional[AgentTokenArgs] = None,
               opts: Optional[ResourceOptions] = None)
func NewAgentToken(ctx *Context, name string, args *AgentTokenArgs, opts ...ResourceOption) (*AgentToken, error)
public AgentToken(string name, AgentTokenArgs? args = null, CustomResourceOptions? opts = null)
public AgentToken(String name, AgentTokenArgs args)
public AgentToken(String name, AgentTokenArgs args, CustomResourceOptions options)
type: buildkite:AgentToken
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AgentTokenArgs
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 AgentTokenArgs
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 AgentTokenArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AgentTokenArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AgentTokenArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

Description string

This is the description of the agent token.

Description string

This is the description of the agent token.

description String

This is the description of the agent token.

description string

This is the description of the agent token.

description str

This is the description of the agent token.

description String

This is the description of the agent token.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Token string

The value of the created agent token.

Uuid string

The UUID of the token.

Id string

The provider-assigned unique ID for this managed resource.

Token string

The value of the created agent token.

Uuid string

The UUID of the token.

id String

The provider-assigned unique ID for this managed resource.

token String

The value of the created agent token.

uuid String

The UUID of the token.

id string

The provider-assigned unique ID for this managed resource.

token string

The value of the created agent token.

uuid string

The UUID of the token.

id str

The provider-assigned unique ID for this managed resource.

token str

The value of the created agent token.

uuid str

The UUID of the token.

id String

The provider-assigned unique ID for this managed resource.

token String

The value of the created agent token.

uuid String

The UUID of the token.

Look up Existing AgentToken Resource

Get an existing AgentToken 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?: AgentTokenState, opts?: CustomResourceOptions): AgentToken
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        token: Optional[str] = None,
        uuid: Optional[str] = None) -> AgentToken
func GetAgentToken(ctx *Context, name string, id IDInput, state *AgentTokenState, opts ...ResourceOption) (*AgentToken, error)
public static AgentToken Get(string name, Input<string> id, AgentTokenState? state, CustomResourceOptions? opts = null)
public static AgentToken get(String name, Output<String> id, AgentTokenState 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:
Description string

This is the description of the agent token.

Token string

The value of the created agent token.

Uuid string

The UUID of the token.

Description string

This is the description of the agent token.

Token string

The value of the created agent token.

Uuid string

The UUID of the token.

description String

This is the description of the agent token.

token String

The value of the created agent token.

uuid String

The UUID of the token.

description string

This is the description of the agent token.

token string

The value of the created agent token.

uuid string

The UUID of the token.

description str

This is the description of the agent token.

token str

The value of the created agent token.

uuid str

The UUID of the token.

description String

This is the description of the agent token.

token String

The value of the created agent token.

uuid String

The UUID of the token.

Import

Tokens can be imported using the GraphQL ID (not UUID), e.g.

 $ pulumi import buildkite:index/agentToken:AgentToken fleet QWdlbnRUb2tlbi0tLTQzNWNhZDU4LWU4MWQtNDVhZi04NjM3LWIxY2Y4MDcwMjM4ZA==

Package Details

Repository
buildkite grapl-security/pulumi-buildkite
License
Apache-2.0
Notes

This Pulumi package is based on the buildkite Terraform Provider.