1. Packages
  2. Buildkite
  3. API Docs
  4. Pipeline
  5. Team
Buildkite v2.3.1 published on Monday, Sep 11, 2023 by Pulumiverse

buildkite.Pipeline.Team

Explore with Pulumi AI

buildkite logo
Buildkite v2.3.1 published on Monday, Sep 11, 2023 by Pulumiverse

    # Resource: pipeline_team

    This resource allows you to create and manage team configuration in a pipeline.

    Buildkite Documentation: https://buildkite.com/docs/pipelines/permissions#permissions-with-teams-pipeline-level-permissions

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Buildkite = Pulumiverse.Buildkite;
    
    return await Deployment.RunAsync(() => 
    {
        var developers = new Buildkite.Pipeline.Team("developers", new()
        {
            PipelineId = buildkite_pipeline.Repo2,
            TeamId = buildkite_team.Test.Id,
            AccessLevel = "MANAGE_BUILD_AND_READ",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-buildkite/sdk/v2/go/buildkite/Pipeline"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Pipeline.NewTeam(ctx, "developers", &Pipeline.TeamArgs{
    			PipelineId:  pulumi.Any(buildkite_pipeline.Repo2),
    			TeamId:      pulumi.Any(buildkite_team.Test.Id),
    			AccessLevel: pulumi.String("MANAGE_BUILD_AND_READ"),
    		})
    		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.Pipeline.Team;
    import com.pulumi.buildkite.Pipeline.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 developers = new Team("developers", TeamArgs.builder()        
                .pipelineId(buildkite_pipeline.repo2())
                .teamId(buildkite_team.test().id())
                .accessLevel("MANAGE_BUILD_AND_READ")
                .build());
    
        }
    }
    
    import pulumi
    import pulumiverse_buildkite as buildkite
    
    developers = buildkite.pipeline.Team("developers",
        pipeline_id=buildkite_pipeline["repo2"],
        team_id=buildkite_team["test"]["id"],
        access_level="MANAGE_BUILD_AND_READ")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as buildkite from "@pulumiverse/buildkite";
    
    const developers = new buildkite.pipeline.Team("developers", {
        pipelineId: buildkite_pipeline.repo2,
        teamId: buildkite_team.test.id,
        accessLevel: "MANAGE_BUILD_AND_READ",
    });
    
    resources:
      developers:
        type: buildkite:Pipeline:Team
        properties:
          pipelineId: ${buildkite_pipeline.repo2}
          teamId: ${buildkite_team.test.id}
          accessLevel: MANAGE_BUILD_AND_READ
    

    Create Team Resource

    new Team(name: string, args: TeamArgs, opts?: CustomResourceOptions);
    @overload
    def Team(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             access_level: Optional[str] = None,
             pipeline_id: Optional[str] = None,
             team_id: Optional[str] = None)
    @overload
    def Team(resource_name: str,
             args: TeamArgs,
             opts: Optional[ResourceOptions] = 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:Pipeline:Team
    properties: # The arguments to resource properties.
    options: # 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.
    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.

    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:

    AccessLevel string
    The level of access to grant. Must be one of READ_ONLY, BUILD_AND_READ or MANAGE_BUILD_AND_READ.
    PipelineId string
    The GraphQL ID of the pipeline.
    TeamId string
    The GraphQL ID of the team to add to/remove from.
    AccessLevel string
    The level of access to grant. Must be one of READ_ONLY, BUILD_AND_READ or MANAGE_BUILD_AND_READ.
    PipelineId string
    The GraphQL ID of the pipeline.
    TeamId string
    The GraphQL ID of the team to add to/remove from.
    accessLevel String
    The level of access to grant. Must be one of READ_ONLY, BUILD_AND_READ or MANAGE_BUILD_AND_READ.
    pipelineId String
    The GraphQL ID of the pipeline.
    teamId String
    The GraphQL ID of the team to add to/remove from.
    accessLevel string
    The level of access to grant. Must be one of READ_ONLY, BUILD_AND_READ or MANAGE_BUILD_AND_READ.
    pipelineId string
    The GraphQL ID of the pipeline.
    teamId string
    The GraphQL ID of the team to add to/remove from.
    access_level str
    The level of access to grant. Must be one of READ_ONLY, BUILD_AND_READ or MANAGE_BUILD_AND_READ.
    pipeline_id str
    The GraphQL ID of the pipeline.
    team_id str
    The GraphQL ID of the team to add to/remove from.
    accessLevel String
    The level of access to grant. Must be one of READ_ONLY, BUILD_AND_READ or MANAGE_BUILD_AND_READ.
    pipelineId String
    The GraphQL ID of the pipeline.
    teamId String
    The GraphQL ID of the team to add to/remove from.

    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 pipeline schedule
    Id string
    The provider-assigned unique ID for this managed resource.
    Uuid string
    The UUID of the pipeline schedule
    id String
    The provider-assigned unique ID for this managed resource.
    uuid String
    The UUID of the pipeline schedule
    id string
    The provider-assigned unique ID for this managed resource.
    uuid string
    The UUID of the pipeline schedule
    id str
    The provider-assigned unique ID for this managed resource.
    uuid str
    The UUID of the pipeline schedule
    id String
    The provider-assigned unique ID for this managed resource.
    uuid String
    The UUID of the pipeline schedule

    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,
            pipeline_id: Optional[str] = None,
            team_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.
    The following state arguments are supported:
    AccessLevel string
    The level of access to grant. Must be one of READ_ONLY, BUILD_AND_READ or MANAGE_BUILD_AND_READ.
    PipelineId string
    The GraphQL ID of the pipeline.
    TeamId string
    The GraphQL ID of the team to add to/remove from.
    Uuid string
    The UUID of the pipeline schedule
    AccessLevel string
    The level of access to grant. Must be one of READ_ONLY, BUILD_AND_READ or MANAGE_BUILD_AND_READ.
    PipelineId string
    The GraphQL ID of the pipeline.
    TeamId string
    The GraphQL ID of the team to add to/remove from.
    Uuid string
    The UUID of the pipeline schedule
    accessLevel String
    The level of access to grant. Must be one of READ_ONLY, BUILD_AND_READ or MANAGE_BUILD_AND_READ.
    pipelineId String
    The GraphQL ID of the pipeline.
    teamId String
    The GraphQL ID of the team to add to/remove from.
    uuid String
    The UUID of the pipeline schedule
    accessLevel string
    The level of access to grant. Must be one of READ_ONLY, BUILD_AND_READ or MANAGE_BUILD_AND_READ.
    pipelineId string
    The GraphQL ID of the pipeline.
    teamId string
    The GraphQL ID of the team to add to/remove from.
    uuid string
    The UUID of the pipeline schedule
    access_level str
    The level of access to grant. Must be one of READ_ONLY, BUILD_AND_READ or MANAGE_BUILD_AND_READ.
    pipeline_id str
    The GraphQL ID of the pipeline.
    team_id str
    The GraphQL ID of the team to add to/remove from.
    uuid str
    The UUID of the pipeline schedule
    accessLevel String
    The level of access to grant. Must be one of READ_ONLY, BUILD_AND_READ or MANAGE_BUILD_AND_READ.
    pipelineId String
    The GraphQL ID of the pipeline.
    teamId String
    The GraphQL ID of the team to add to/remove from.
    uuid String
    The UUID of the pipeline schedule

    Import

    Pipeline teams can be imported using their GraphQL ID, e.g.

     $ pulumi import buildkite:Pipeline/team:Team guests VGVhbS0tLWU1YjQyMDQyLTUzN2QtNDZjNi04MjY0LTliZjFkMzkyYjZkNQ==
    

    Your pipeline team’s GraphQL ID can be found with the below GraphQL query below.

    graphql query getPipelineTeamId {

    pipeline(slug"ORGANIZATION_SLUG/PIPELINE_SLUG") { teams(first5, search"PIPELINE_SEARCH_TERM") {

    edges{

    node{

    id

    }

    }

    }

    } }

    Package Details

    Repository
    buildkite pulumiverse/pulumi-buildkite
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the buildkite Terraform Provider.
    buildkite logo
    Buildkite v2.3.1 published on Monday, Sep 11, 2023 by Pulumiverse