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",
});
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")
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
})
}
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",
});
});
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());
}
}
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
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)
type: buildkite:TestSuite:Team
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 TeamArgs
- 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 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 string
- The unique name of the resource.
- args TeamArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TeamArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
example, err := TestSuite.NewTeam(ctx, "exampleteamResourceResourceFromTestSuiteteam", &TestSuite.TeamArgs{
AccessLevel: pulumi.String("string"),
TeamId: pulumi.String("string"),
TestSuiteId: pulumi.String("string"),
})
var exampleteamResourceResourceFromTestSuiteteam = new Team("exampleteamResourceResourceFromTestSuiteteam", TeamArgs.builder()
.accessLevel("string")
.teamId("string")
.testSuiteId("string")
.build());
exampleteam_resource_resource_from_test_suiteteam = buildkite.test_suite.Team("exampleteamResourceResourceFromTestSuiteteam",
access_level="string",
team_id="string",
test_suite_id="string")
const exampleteamResourceResourceFromTestSuiteteam = new buildkite.testsuite.Team("exampleteamResourceResourceFromTestSuiteteam", {
accessLevel: "string",
teamId: "string",
testSuiteId: "string",
});
type: buildkite:TestSuite:Team
properties:
accessLevel: string
teamId: string
testSuiteId: string
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
The Team resource accepts the following input properties:
- Access
Level string - The access level the team has on the test suite. Either
READ_ONLY
orMANAGE_AND_READ
. - Team
Id string - The GraphQL ID of the team.
- Test
Suite stringId - The GraphQL ID of the test suite.
- Access
Level string - The access level the team has on the test suite. Either
READ_ONLY
orMANAGE_AND_READ
. - Team
Id string - The GraphQL ID of the team.
- Test
Suite stringId - The GraphQL ID of the test suite.
- access
Level String - The access level the team has on the test suite. Either
READ_ONLY
orMANAGE_AND_READ
. - team
Id String - The GraphQL ID of the team.
- test
Suite StringId - The GraphQL ID of the test suite.
- access
Level string - The access level the team has on the test suite. Either
READ_ONLY
orMANAGE_AND_READ
. - team
Id string - The GraphQL ID of the team.
- test
Suite stringId - The GraphQL ID of the test suite.
- access_
level str - The access level the team has on the test suite. Either
READ_ONLY
orMANAGE_AND_READ
. - team_
id str - The GraphQL ID of the team.
- test_
suite_ strid - The GraphQL ID of the test suite.
- access
Level String - The access level the team has on the test suite. Either
READ_ONLY
orMANAGE_AND_READ
. - team
Id String - The GraphQL ID of the team.
- test
Suite StringId - 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:
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)
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.
- Access
Level string - The access level the team has on the test suite. Either
READ_ONLY
orMANAGE_AND_READ
. - Team
Id string - The GraphQL ID of the team.
- Test
Suite stringId - The GraphQL ID of the test suite.
- Uuid string
- The UUID of the test suite-team relationship.
- Access
Level string - The access level the team has on the test suite. Either
READ_ONLY
orMANAGE_AND_READ
. - Team
Id string - The GraphQL ID of the team.
- Test
Suite stringId - The GraphQL ID of the test suite.
- Uuid string
- The UUID of the test suite-team relationship.
- access
Level String - The access level the team has on the test suite. Either
READ_ONLY
orMANAGE_AND_READ
. - team
Id String - The GraphQL ID of the team.
- test
Suite StringId - The GraphQL ID of the test suite.
- uuid String
- The UUID of the test suite-team relationship.
- access
Level string - The access level the team has on the test suite. Either
READ_ONLY
orMANAGE_AND_READ
. - team
Id string - The GraphQL ID of the team.
- test
Suite stringId - 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
orMANAGE_AND_READ
. - team_
id str - The GraphQL ID of the team.
- test_
suite_ strid - The GraphQL ID of the test suite.
- uuid str
- The UUID of the test suite-team relationship.
- access
Level String - The access level the team has on the test suite. Either
READ_ONLY
orMANAGE_AND_READ
. - team
Id String - The GraphQL ID of the team.
- test
Suite StringId - 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
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.