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

buildkite.TestSuite.Team

Explore with Pulumi AI

Manage team access to a test suite.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as buildkite from "@pulumiverse/buildkite";

// create a test suite
const main = new buildkite.testsuite.TestSuite("main", {
    defaultBranch: "main",
    teamOwnerId: "VGVhbU1lbWJlci0tLTVlZDEyMmY2LTM2NjQtNDI1MS04YzMwLTc4NjRiMDdiZDQ4Zg==",
});
// give the "everyone" team manage access to the "main" test suite
const mainEveryone = new buildkite.testsuite.Team("mainEveryone", {
    testSuiteId: main.id,
    teamId: "VGVhbS0tLWU1YjQyMDQyLTUzN2QtNDZjNi04MjY0LTliZjFkMzkyYjZkNQ==",
    accessLevel: "MANAGE_AND_READ",
});
Copy
import pulumi
import pulumiverse_buildkite as buildkite

# create a test suite
main = buildkite.test_suite.TestSuite("main",
    default_branch="main",
    team_owner_id="VGVhbU1lbWJlci0tLTVlZDEyMmY2LTM2NjQtNDI1MS04YzMwLTc4NjRiMDdiZDQ4Zg==")
# give the "everyone" team manage access to the "main" test suite
main_everyone = buildkite.test_suite.Team("mainEveryone",
    test_suite_id=main.id,
    team_id="VGVhbS0tLWU1YjQyMDQyLTUzN2QtNDZjNi04MjY0LTliZjFkMzkyYjZkNQ==",
    access_level="MANAGE_AND_READ")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-buildkite/sdk/v3/go/buildkite/TestSuite"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// create a test suite
		main, err := TestSuite.NewTestSuite(ctx, "main", &TestSuite.TestSuiteArgs{
			DefaultBranch: pulumi.String("main"),
			TeamOwnerId:   pulumi.String("VGVhbU1lbWJlci0tLTVlZDEyMmY2LTM2NjQtNDI1MS04YzMwLTc4NjRiMDdiZDQ4Zg=="),
		})
		if err != nil {
			return err
		}
		// give the "everyone" team manage access to the "main" test suite
		_, err = TestSuite.NewTeam(ctx, "mainEveryone", &TestSuite.TeamArgs{
			TestSuiteId: main.ID(),
			TeamId:      pulumi.String("VGVhbS0tLWU1YjQyMDQyLTUzN2QtNDZjNi04MjY0LTliZjFkMzkyYjZkNQ=="),
			AccessLevel: pulumi.String("MANAGE_AND_READ"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Buildkite = Pulumiverse.Buildkite;

return await Deployment.RunAsync(() => 
{
    // create a test suite
    var main = new Buildkite.TestSuite.TestSuite("main", new()
    {
        DefaultBranch = "main",
        TeamOwnerId = "VGVhbU1lbWJlci0tLTVlZDEyMmY2LTM2NjQtNDI1MS04YzMwLTc4NjRiMDdiZDQ4Zg==",
    });

    // give the "everyone" team manage access to the "main" test suite
    var mainEveryone = new Buildkite.TestSuite.Team("mainEveryone", new()
    {
        TestSuiteId = main.Id,
        TeamId = "VGVhbS0tLWU1YjQyMDQyLTUzN2QtNDZjNi04MjY0LTliZjFkMzkyYjZkNQ==",
        AccessLevel = "MANAGE_AND_READ",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.buildkite.TestSuite.TestSuite;
import com.pulumi.buildkite.TestSuite.TestSuiteArgs;
import com.pulumi.buildkite.TestSuite.Team;
import com.pulumi.buildkite.TestSuite.TeamArgs;
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 main = new TestSuite("main", TestSuiteArgs.builder()        
            .defaultBranch("main")
            .teamOwnerId("VGVhbU1lbWJlci0tLTVlZDEyMmY2LTM2NjQtNDI1MS04YzMwLTc4NjRiMDdiZDQ4Zg==")
            .build());

        var mainEveryone = new Team("mainEveryone", TeamArgs.builder()        
            .testSuiteId(main.id())
            .teamId("VGVhbS0tLWU1YjQyMDQyLTUzN2QtNDZjNi04MjY0LTliZjFkMzkyYjZkNQ==")
            .accessLevel("MANAGE_AND_READ")
            .build());

    }
}
Copy
resources:
  # create a test suite
  main:
    type: buildkite:TestSuite:TestSuite
    properties:
      defaultBranch: main
      teamOwnerId: VGVhbU1lbWJlci0tLTVlZDEyMmY2LTM2NjQtNDI1MS04YzMwLTc4NjRiMDdiZDQ4Zg==
  # give the "everyone" team manage access to the "main" test suite
  mainEveryone:
    type: buildkite:TestSuite:Team
    properties:
      testSuiteId: ${main.id}
      teamId: VGVhbS0tLWU1YjQyMDQyLTUzN2QtNDZjNi04MjY0LTliZjFkMzkyYjZkNQ==
      accessLevel: MANAGE_AND_READ
Copy

Create Team Resource

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

Constructor syntax

new Team(name: string, args: TeamArgs, opts?: CustomResourceOptions);
@overload
def Team(resource_name: str,
         args: TeamArgs,
         opts: Optional[ResourceOptions] = None)

@overload
def Team(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         access_level: Optional[str] = None,
         team_id: Optional[str] = None,
         test_suite_id: Optional[str] = None)
func NewTeam(ctx *Context, name string, args TeamArgs, opts ...ResourceOption) (*Team, error)
public Team(string name, TeamArgs args, CustomResourceOptions? opts = null)
public Team(String name, TeamArgs args)
public Team(String name, TeamArgs args, CustomResourceOptions options)
type: buildkite:TestSuite:Team
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. TeamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. TeamArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. TeamArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. TeamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TeamArgs
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 exampleteamResourceResourceFromTestSuiteteam = new Buildkite.TestSuite.Team("exampleteamResourceResourceFromTestSuiteteam", new()
{
    AccessLevel = "string",
    TeamId = "string",
    TestSuiteId = "string",
});
Copy
example, err := TestSuite.NewTeam(ctx, "exampleteamResourceResourceFromTestSuiteteam", &TestSuite.TeamArgs{
	AccessLevel: pulumi.String("string"),
	TeamId:      pulumi.String("string"),
	TestSuiteId: pulumi.String("string"),
})
Copy
var exampleteamResourceResourceFromTestSuiteteam = new Team("exampleteamResourceResourceFromTestSuiteteam", TeamArgs.builder()
    .accessLevel("string")
    .teamId("string")
    .testSuiteId("string")
    .build());
Copy
exampleteam_resource_resource_from_test_suiteteam = buildkite.test_suite.Team("exampleteamResourceResourceFromTestSuiteteam",
    access_level="string",
    team_id="string",
    test_suite_id="string")
Copy
const exampleteamResourceResourceFromTestSuiteteam = new buildkite.testsuite.Team("exampleteamResourceResourceFromTestSuiteteam", {
    accessLevel: "string",
    teamId: "string",
    testSuiteId: "string",
});
Copy
type: buildkite:TestSuite:Team
properties:
    accessLevel: string
    teamId: string
    testSuiteId: string
Copy

Team Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Team resource accepts the following input properties:

AccessLevel This property is required. string
The access level the team has on the test suite. Either READ_ONLY or MANAGE_AND_READ.
TeamId This property is required. string
The GraphQL ID of the team.
TestSuiteId This property is required. string
The GraphQL ID of the test suite.
AccessLevel This property is required. string
The access level the team has on the test suite. Either READ_ONLY or MANAGE_AND_READ.
TeamId This property is required. string
The GraphQL ID of the team.
TestSuiteId This property is required. string
The GraphQL ID of the test suite.
accessLevel This property is required. String
The access level the team has on the test suite. Either READ_ONLY or MANAGE_AND_READ.
teamId This property is required. String
The GraphQL ID of the team.
testSuiteId This property is required. String
The GraphQL ID of the test suite.
accessLevel This property is required. string
The access level the team has on the test suite. Either READ_ONLY or MANAGE_AND_READ.
teamId This property is required. string
The GraphQL ID of the team.
testSuiteId This property is required. string
The GraphQL ID of the test suite.
access_level This property is required. str
The access level the team has on the test suite. Either READ_ONLY or MANAGE_AND_READ.
team_id This property is required. str
The GraphQL ID of the team.
test_suite_id This property is required. str
The GraphQL ID of the test suite.
accessLevel This property is required. String
The access level the team has on the test suite. Either READ_ONLY or MANAGE_AND_READ.
teamId This property is required. String
The GraphQL ID of the team.
testSuiteId This property is required. String
The GraphQL ID of the test suite.

Outputs

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

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

Look up Existing Team Resource

Get an existing Team 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?: TeamState, opts?: CustomResourceOptions): Team
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_level: Optional[str] = None,
        team_id: Optional[str] = None,
        test_suite_id: Optional[str] = None,
        uuid: Optional[str] = None) -> Team
func GetTeam(ctx *Context, name string, id IDInput, state *TeamState, opts ...ResourceOption) (*Team, error)
public static Team Get(string name, Input<string> id, TeamState? state, CustomResourceOptions? opts = null)
public static Team get(String name, Output<String> id, TeamState state, CustomResourceOptions options)
resources:  _:    type: buildkite:TestSuite:Team    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AccessLevel string
The access level the team has on the test suite. Either READ_ONLY or MANAGE_AND_READ.
TeamId string
The GraphQL ID of the team.
TestSuiteId string
The GraphQL ID of the test suite.
Uuid string
The UUID of the test suite-team relationship.
AccessLevel string
The access level the team has on the test suite. Either READ_ONLY or MANAGE_AND_READ.
TeamId string
The GraphQL ID of the team.
TestSuiteId string
The GraphQL ID of the test suite.
Uuid string
The UUID of the test suite-team relationship.
accessLevel String
The access level the team has on the test suite. Either READ_ONLY or MANAGE_AND_READ.
teamId String
The GraphQL ID of the team.
testSuiteId String
The GraphQL ID of the test suite.
uuid String
The UUID of the test suite-team relationship.
accessLevel string
The access level the team has on the test suite. Either READ_ONLY or MANAGE_AND_READ.
teamId string
The GraphQL ID of the team.
testSuiteId string
The GraphQL ID of the test suite.
uuid string
The UUID of the test suite-team relationship.
access_level str
The access level the team has on the test suite. Either READ_ONLY or MANAGE_AND_READ.
team_id str
The GraphQL ID of the team.
test_suite_id str
The GraphQL ID of the test suite.
uuid str
The UUID of the test suite-team relationship.
accessLevel String
The access level the team has on the test suite. Either READ_ONLY or MANAGE_AND_READ.
teamId String
The GraphQL ID of the team.
testSuiteId String
The GraphQL ID of the test suite.
uuid String
The UUID of the test suite-team relationship.

Import

import a test suite team resource using the GraphQL ID

you can use this query to find the ID:

query getTeamSuiteIds {

organization(slug: “ORGANIZATION_SLUG”) {

suites(first: 1, search:"SUITE_SEARCH_TERM") {

  edges {

    node {

      id

      name

      teams(first: 10){

        edges {

          node {

            id

            accessLevel

            team{

              name

            }

          }

        }

      }

    }

  }

}

}

}

$ pulumi import buildkite:TestSuite/team:Team main_everyone VGVhbvDf4eRef20tMzIxMGEfYTctNzEF5g00M8f5s6E2YjYtODNlOGNlZgD6HcBi
Copy

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.