pagerduty_license

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.

Example Usage

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"
}

Argument Reference

The following arguments are supported:

Attributes Reference