From 0d0c31d962061eb9aba4d76a3ffc41e47ac60bc6 Mon Sep 17 00:00:00 2001 From: Matt Long Date: Thu, 15 Dec 2016 00:01:19 +0100 Subject: [PATCH] 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 --- builtin/providers/pagerduty/resource_pagerduty_user.go | 1 + builtin/providers/pagerduty/resource_pagerduty_user_test.go | 4 ++-- website/source/docs/providers/pagerduty/r/user.html.markdown | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/builtin/providers/pagerduty/resource_pagerduty_user.go b/builtin/providers/pagerduty/resource_pagerduty_user.go index b88681b19..744523d93 100644 --- a/builtin/providers/pagerduty/resource_pagerduty_user.go +++ b/builtin/providers/pagerduty/resource_pagerduty_user.go @@ -39,6 +39,7 @@ func resourcePagerDutyUser() *schema.Resource { "limited_user", "owner", "read_only_user", + "team_responder", "user", }), }, diff --git a/builtin/providers/pagerduty/resource_pagerduty_user_test.go b/builtin/providers/pagerduty/resource_pagerduty_user_test.go index d407ae4b1..5df51f3c2 100644 --- a/builtin/providers/pagerduty/resource_pagerduty_user_test.go +++ b/builtin/providers/pagerduty/resource_pagerduty_user_test.go @@ -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" } diff --git a/website/source/docs/providers/pagerduty/r/user.html.markdown b/website/source/docs/providers/pagerduty/r/user.html.markdown index 10cbb9f5f..ab2cd4a0d 100644 --- a/website/source/docs/providers/pagerduty/r/user.html.markdown +++ b/website/source/docs/providers/pagerduty/r/user.html.markdown @@ -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.