A team membership manages memberships within a team.
resource "pagerduty_user" "foo" {
name = "foo"
email = "foo@bar.com"
}
resource "pagerduty_team" "foo" {
name = "foo"
description = "foo"
}
resource "pagerduty_team_membership" "foo" {
user_id = pagerduty_user.foo.id
team_id = pagerduty_team.foo.id
role = "manager"
}
The following arguments are supported:
user_id
- (Required) The ID of the user to add to the team.team_id
- (Required) The ID of the team in which the user will belong.role
- (Optional) The role of the user in the team. One of observer
, responder
, or manager
. Defaults to manager
. user
is a Team role of manager
limited_user
is a Team role of responder
The following attributes are exported:
user_id
- The ID of the user belonging to the team.team_id
- The team ID the user belongs to.role
- The role of the user in the team.Team memberships can be imported using the user_id
and team_id
, e.g.
$ terraform import pagerduty_team_membership.main PLBP09X:PLB09Z