Use this data source to use a single purchased license to manage PagerDuty user resources. After applying changes to users' licenses, the current_value
and allocations_available
attributes of licenses will change.
locals {
invalid_roles = ["owner"]
}
data "pagerduty_license" "full_user" {
name = "Full User"
description = ""
}
resource "pagerduty_user" "example" {
name = "Earline Greenholt"
email = "125.greenholt.earline@graham.name"
license = data.pagerduty_license.full_user.id
# Role must be included in the assigned license's allowed_roles list.
# Role may be dynamically referenced from data.pagerduty_license.full_user with the following:
# tolist(setsubtract(data.pagerduty_license.full_user.valid_roles, local.invalid_roles))[0]
role = "user"
}
The following arguments are supported:
id
- (Optional) Used to match the data config id with an exact match of a valid license ID assigned to the account.name
- (Optional) Used to determine if the data config name is a valid substring of a valid license name assigned to the account.description
- (Optional) Used to determine if the data config description is a valid substring of a valid license description assigned to the account.summary
- Summary of the licenserole_group
- The role group for the license that determines the available valid_roles
valid_roles
- List of allowed roles that may be assigned to a user with this licensecurrent_value
- The number of allocations already assigned to usersallocations_available
- Available allocations to assign to users