provider/pagerduty: Allow 'team_responder' role for pagerduty_user resource (#10728)

* provider/pagerduty: Allow 'team_responder' role for pagerduty_user resource

* Change unit test to exercise 'team_responder' and reformat

* Update the test fixture to use the 'team_responder' role
This commit is contained in:
Matt Long 2016-12-15 00:01:19 +01:00 committed by Paul Stack
parent ef471bd423
commit 0d0c31d962
3 changed files with 4 additions and 3 deletions

View File

@ -39,6 +39,7 @@ func resourcePagerDutyUser() *schema.Resource {
"limited_user",
"owner",
"read_only_user",
"team_responder",
"user",
}),
},

View File

@ -44,7 +44,7 @@ func TestAccPagerDutyUser_Basic(t *testing.T) {
resource.TestCheckResourceAttr(
"pagerduty_user.foo", "color", "red"),
resource.TestCheckResourceAttr(
"pagerduty_user.foo", "role", "user"),
"pagerduty_user.foo", "role", "team_responder"),
resource.TestCheckResourceAttr(
"pagerduty_user.foo", "job_title", "bar"),
resource.TestCheckResourceAttr(
@ -161,7 +161,7 @@ resource "pagerduty_user" "foo" {
name = "bar"
email = "bar@foo.com"
color = "red"
role = "user"
role = "team_responder"
job_title = "bar"
description = "bar"
}

View File

@ -33,7 +33,7 @@ The following arguments are supported:
* `name` - (Required) The name of the user.
* `email` - (Required) The user's email address.
* `color` - (Optional) The schedule color for the user.
* `role` - (Optional) The user role. Account must have the `read_only_users` ability to set a user as a `read_only_user`. Can be `admin`, `limited_user`, `owner`, `read_only_user` or `user`
* `role` - (Optional) The user role. Account must have the `read_only_users` ability to set a user as a `read_only_user`. Can be `admin`, `limited_user`, `owner`, `read_only_user`, `team_responder` or `user`
* `job_title` - (Optional) The user's title.
* `teams` - (Optional) A list of teams the user should belong to.
* `description` - (Optional) A human-friendly description of the user.