buildkite.Team.Member
Explore with Pulumi AI
A team member resource allows for the management of team membership for existing organization users.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as buildkite from "@pulumiverse/buildkite";
const everyone = new buildkite.team.Team("everyone", {
privacy: "VISIBLE",
defaultTeam: false,
defaultMemberRole: "MEMBER",
});
const aSmith = new buildkite.team.Member("aSmith", {
teamId: everyone.id,
userId: "VGVhbU1lbWJlci0tLTVlZDEyMmY2LTM2NjQtNDI1MS04YzMwLTc4NjRiMDdiZDQ4Zg==",
role: "MEMBER",
});
import pulumi
import pulumiverse_buildkite as buildkite
everyone = buildkite.team.Team("everyone",
privacy="VISIBLE",
default_team=False,
default_member_role="MEMBER")
a_smith = buildkite.team.Member("aSmith",
team_id=everyone.id,
user_id="VGVhbU1lbWJlci0tLTVlZDEyMmY2LTM2NjQtNDI1MS04YzMwLTc4NjRiMDdiZDQ4Zg==",
role="MEMBER")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-buildkite/sdk/v3/go/buildkite/Team"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
everyone, err := Team.NewTeam(ctx, "everyone", &Team.TeamArgs{
Privacy: pulumi.String("VISIBLE"),
DefaultTeam: pulumi.Bool(false),
DefaultMemberRole: pulumi.String("MEMBER"),
})
if err != nil {
return err
}
_, err = Team.NewMember(ctx, "aSmith", &Team.MemberArgs{
TeamId: everyone.ID(),
UserId: pulumi.String("VGVhbU1lbWJlci0tLTVlZDEyMmY2LTM2NjQtNDI1MS04YzMwLTc4NjRiMDdiZDQ4Zg=="),
Role: pulumi.String("MEMBER"),
})
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 everyone = new Buildkite.Team.Team("everyone", new()
{
Privacy = "VISIBLE",
DefaultTeam = false,
DefaultMemberRole = "MEMBER",
});
var aSmith = new Buildkite.Team.Member("aSmith", new()
{
TeamId = everyone.Id,
UserId = "VGVhbU1lbWJlci0tLTVlZDEyMmY2LTM2NjQtNDI1MS04YzMwLTc4NjRiMDdiZDQ4Zg==",
Role = "MEMBER",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.buildkite.Team.Team;
import com.pulumi.buildkite.Team.TeamArgs;
import com.pulumi.buildkite.Team.Member;
import com.pulumi.buildkite.Team.MemberArgs;
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 everyone = new Team("everyone", TeamArgs.builder()
.privacy("VISIBLE")
.defaultTeam(false)
.defaultMemberRole("MEMBER")
.build());
var aSmith = new Member("aSmith", MemberArgs.builder()
.teamId(everyone.id())
.userId("VGVhbU1lbWJlci0tLTVlZDEyMmY2LTM2NjQtNDI1MS04YzMwLTc4NjRiMDdiZDQ4Zg==")
.role("MEMBER")
.build());
}
}
resources:
everyone:
type: buildkite:Team:Team
properties:
privacy: VISIBLE
defaultTeam: false
defaultMemberRole: MEMBER
aSmith:
type: buildkite:Team:Member
properties:
teamId: ${everyone.id}
userId: VGVhbU1lbWJlci0tLTVlZDEyMmY2LTM2NjQtNDI1MS04YzMwLTc4NjRiMDdiZDQ4Zg==
role: MEMBER
Create Member Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Member(name: string, args: MemberArgs, opts?: CustomResourceOptions);
@overload
def Member(resource_name: str,
args: MemberArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Member(resource_name: str,
opts: Optional[ResourceOptions] = None,
role: Optional[str] = None,
team_id: Optional[str] = None,
user_id: Optional[str] = None)
func NewMember(ctx *Context, name string, args MemberArgs, opts ...ResourceOption) (*Member, error)
public Member(string name, MemberArgs args, CustomResourceOptions? opts = null)
public Member(String name, MemberArgs args)
public Member(String name, MemberArgs args, CustomResourceOptions options)
type: buildkite:Team:Member
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 MemberArgs
- 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 MemberArgs
- 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 MemberArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MemberArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MemberArgs
- 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 memberResource = new Buildkite.Team.Member("memberResource", new()
{
Role = "string",
TeamId = "string",
UserId = "string",
});
example, err := Team.NewMember(ctx, "memberResource", &Team.MemberArgs{
Role: pulumi.String("string"),
TeamId: pulumi.String("string"),
UserId: pulumi.String("string"),
})
var memberResource = new Member("memberResource", MemberArgs.builder()
.role("string")
.teamId("string")
.userId("string")
.build());
member_resource = buildkite.team.Member("memberResource",
role="string",
team_id="string",
user_id="string")
const memberResource = new buildkite.team.Member("memberResource", {
role: "string",
teamId: "string",
userId: "string",
});
type: buildkite:Team:Member
properties:
role: string
teamId: string
userId: string
Member 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 Member resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the Member resource produces the following output properties:
Look up Existing Member Resource
Get an existing Member 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?: MemberState, opts?: CustomResourceOptions): Member
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
role: Optional[str] = None,
team_id: Optional[str] = None,
user_id: Optional[str] = None,
uuid: Optional[str] = None) -> Member
func GetMember(ctx *Context, name string, id IDInput, state *MemberState, opts ...ResourceOption) (*Member, error)
public static Member Get(string name, Input<string> id, MemberState? state, CustomResourceOptions? opts = null)
public static Member get(String name, Output<String> id, MemberState 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.
Import
import a team member resource using the GraphQL ID
you can use this query to find the ID:
query getTeamMemberId {
organization(slug: “ORGANIZATION_SLUG”) {
teams(first: 2, search: "TEAM_SEARCH_TERM") {
edges {
node {
members(first: 2, search: "TEAM_MEMBER_SEARCH_TERM") {
edges {
node {
id
}
}
}
}
}
}
}
}
$ pulumi import buildkite:Team/member:Member a_smith VGVhbU1lbWJlci0tLTVlZDEyMmY2LTM2NjQtNDI1MS04YzMwLTc4NjRiMDdiZDQ4Zg==
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.