1. Packages
  2. Buildkite
  3. API Docs
  4. TestSuite
  5. getTestSuite
Viewing docs for Buildkite v3.2.0
published on Monday, Feb 23, 2026 by Pulumiverse
buildkite logo
Viewing docs for Buildkite v3.2.0
published on Monday, Feb 23, 2026 by Pulumiverse

    A test suite is a collection of tests. A run is to a suite what a build is to a Pipeline.Use this datasource to read attributes for a Test Suites on Buildkite.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as buildkite from "@pulumiverse/buildkite";
    
    const application = buildkite.TestSuite.getTestSuite({
        slug: "application",
    });
    const team = buildkite.Team.getTeam({
        slug: "Everyone",
    });
    const everyone = new buildkite.testsuite.Team("everyone", {
        teamId: team.then(team => team.id),
        suiteId: application.then(application => application.id),
        accessLevel: "MANAGE_AND_READ",
    });
    
    import pulumi
    import pulumi_buildkite as buildkite
    import pulumiverse_buildkite as buildkite
    
    application = buildkite.TestSuite.get_test_suite(slug="application")
    team = buildkite.Team.get_team(slug="Everyone")
    everyone = buildkite.testsuite.Team("everyone",
        team_id=team.id,
        suite_id=application.id,
        access_level="MANAGE_AND_READ")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-buildkite/sdk/v3/go/buildkite/team"
    	"github.com/pulumiverse/pulumi-buildkite/sdk/v3/go/buildkite/testsuite"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		application, err := testsuite.GetTestSuite(ctx, &testsuite.GetTestSuiteArgs{
    			Slug: "application",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		team, err := team.GetTeam(ctx, &team.GetTeamArgs{
    			Slug: pulumi.StringRef("Everyone"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = testsuite.NewTeam(ctx, "everyone", &testsuite.TeamArgs{
    			TeamId:      pulumi.String(team.Id),
    			SuiteId:     application.Id,
    			AccessLevel: pulumi.String("MANAGE_AND_READ"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Buildkite = Pulumiverse.Buildkite;
    
    return await Deployment.RunAsync(() => 
    {
        var application = Buildkite.TestSuite.GetTestSuite.Invoke(new()
        {
            Slug = "application",
        });
    
        var team = Buildkite.Team.GetTeam.Invoke(new()
        {
            Slug = "Everyone",
        });
    
        var everyone = new Buildkite.TestSuite.Team("everyone", new()
        {
            TeamId = team.Apply(getTeamResult => getTeamResult.Id),
            SuiteId = application.Apply(getTestSuiteResult => getTestSuiteResult.Id),
            AccessLevel = "MANAGE_AND_READ",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.buildkite.TestSuite.TestSuiteFunctions;
    import com.pulumi.buildkite.TestSuite.inputs.GetTestSuiteArgs;
    import com.pulumi.buildkite.Team.TeamFunctions;
    import com.pulumi.buildkite.Team.inputs.GetTeamArgs;
    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) {
            final var application = TestSuiteFunctions.getTestSuite(GetTestSuiteArgs.builder()
                .slug("application")
                .build());
    
            final var team = TeamFunctions.getTeam(GetTeamArgs.builder()
                .slug("Everyone")
                .build());
    
            var everyone = new Team("everyone", TeamArgs.builder()
                .teamId(team.id())
                .suiteId(application.id())
                .accessLevel("MANAGE_AND_READ")
                .build());
    
        }
    }
    
    resources:
      everyone:
        type: buildkite:TestSuite:Team
        properties:
          teamId: ${team.id}
          suiteId: ${application.id}
          accessLevel: MANAGE_AND_READ
    variables:
      application:
        fn::invoke:
          function: buildkite:TestSuite:getTestSuite
          arguments:
            slug: application
      team:
        fn::invoke:
          function: buildkite:Team:getTeam
          arguments:
            slug: Everyone
    

    Using getTestSuite

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getTestSuite(args: GetTestSuiteArgs, opts?: InvokeOptions): Promise<GetTestSuiteResult>
    function getTestSuiteOutput(args: GetTestSuiteOutputArgs, opts?: InvokeOptions): Output<GetTestSuiteResult>
    def get_test_suite(slug: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetTestSuiteResult
    def get_test_suite_output(slug: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetTestSuiteResult]
    func LookupTestSuite(ctx *Context, args *LookupTestSuiteArgs, opts ...InvokeOption) (*LookupTestSuiteResult, error)
    func LookupTestSuiteOutput(ctx *Context, args *LookupTestSuiteOutputArgs, opts ...InvokeOption) LookupTestSuiteResultOutput

    > Note: This function is named LookupTestSuite in the Go SDK.

    public static class GetTestSuite 
    {
        public static Task<GetTestSuiteResult> InvokeAsync(GetTestSuiteArgs args, InvokeOptions? opts = null)
        public static Output<GetTestSuiteResult> Invoke(GetTestSuiteInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTestSuiteResult> getTestSuite(GetTestSuiteArgs args, InvokeOptions options)
    public static Output<GetTestSuiteResult> getTestSuite(GetTestSuiteArgs args, InvokeOptions options)
    
    fn::invoke:
      function: buildkite:TestSuite/getTestSuite:getTestSuite
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Slug string
    The generated slug of the test suite.
    Slug string
    The generated slug of the test suite.
    slug String
    The generated slug of the test suite.
    slug string
    The generated slug of the test suite.
    slug str
    The generated slug of the test suite.
    slug String
    The generated slug of the test suite.

    getTestSuite Result

    The following output properties are available:

    DefaultBranch string
    The default branch for the repository this test suite is for.
    Id string
    The GraphQL ID of the test suite.
    Name string
    The name to give the test suite.
    Slug string
    The generated slug of the test suite.
    Uuid string
    The UUID of the test suite.
    DefaultBranch string
    The default branch for the repository this test suite is for.
    Id string
    The GraphQL ID of the test suite.
    Name string
    The name to give the test suite.
    Slug string
    The generated slug of the test suite.
    Uuid string
    The UUID of the test suite.
    defaultBranch String
    The default branch for the repository this test suite is for.
    id String
    The GraphQL ID of the test suite.
    name String
    The name to give the test suite.
    slug String
    The generated slug of the test suite.
    uuid String
    The UUID of the test suite.
    defaultBranch string
    The default branch for the repository this test suite is for.
    id string
    The GraphQL ID of the test suite.
    name string
    The name to give the test suite.
    slug string
    The generated slug of the test suite.
    uuid string
    The UUID of the test suite.
    default_branch str
    The default branch for the repository this test suite is for.
    id str
    The GraphQL ID of the test suite.
    name str
    The name to give the test suite.
    slug str
    The generated slug of the test suite.
    uuid str
    The UUID of the test suite.
    defaultBranch String
    The default branch for the repository this test suite is for.
    id String
    The GraphQL ID of the test suite.
    name String
    The name to give the test suite.
    slug String
    The generated slug of the test suite.
    uuid String
    The UUID of the test suite.

    Package Details

    Repository
    buildkite pulumiverse/pulumi-buildkite
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the buildkite Terraform Provider.
    buildkite logo
    Viewing docs for Buildkite v3.2.0
    published on Monday, Feb 23, 2026 by Pulumiverse
      Try Pulumi Cloud free. Your team will thank you.