Manages users in a team.
Basic usage:
resource "tfe_team" "test" {
name = "my-team-name"
organization = "my-org-name"
}
resource "tfe_team_members" "test" {
team_id = tfe_team.test.id
usernames = ["admin", "sander"]
}
With a set of usernames:
locals {
all_usernames = toset([
"user1",
"user2",
])
}
resource "tfe_team" "test" {
name = "my-team-name"
organization = "my-org-name"
}
resource "tfe_team_members" "test" {
team_id = tfe_team.test.id
usernames = [for user in local.all_usernames : user]
}
The following arguments are supported:
team_id
- (Required) ID of the team.usernames
- (Required) Names of the users to add.id
- The ID of the team.Team members can be imported; use <TEAM ID>
as the import ID. For example:
terraform import tfe_team_members.test team-47qC3LmA47piVan7