{"action":"created","comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/comments/197312975","pull_request_review_id":131035390,"id":197312975,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzMxMjk3NQ==","diff_hunk":"@@ -118,12 +133,23 @@ func resourceGoogleOrganizationIamCustomRoleUpdate(d *schema.ResourceData, meta\n \t\t\tif err := resourceGoogleOrganizationIamCustomRoleDelete(d, meta); err != nil {\n \t\t\t\treturn err\n \t\t\t}\n-\t\t} else {\n+\t\t\td.SetPartial(\"deleted\")\n+\t\t}\n+\t}\n+\n+\t// If role is not deleted, make sure it exists and undelete if needed.","path":"google/resource_google_organization_iam_custom_role.go","position":31,"original_position":31,"commit_id":"efae49955208dc77aff51784ca9494697a96ea6b","original_commit_id":"efae49955208dc77aff51784ca9494697a96ea6b","user":{"login":"danawillow","id":1130694,"node_id":"MDQ6VXNlcjExMzA2OTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1130694?v=4","gravatar_id":"","url":"https://api.github.com/users/danawillow","html_url":"https://github.com/danawillow","followers_url":"https://api.github.com/users/danawillow/followers","following_url":"https://api.github.com/users/danawillow/following{/other_user}","gists_url":"https://api.github.com/users/danawillow/gists{/gist_id}","starred_url":"https://api.github.com/users/danawillow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danawillow/subscriptions","organizations_url":"https://api.github.com/users/danawillow/orgs","repos_url":"https://api.github.com/users/danawillow/repos","events_url":"https://api.github.com/users/danawillow/events{/privacy}","received_events_url":"https://api.github.com/users/danawillow/received_events","type":"User","site_admin":false},"body":"Because this gets called on create, the next bit about d.HasChange will actually return true and send a patch request. It's not a huge deal, but it's still an extra API call that we don't really need. If it's not hard, I think the Undelete should probably just get called straight from Create.","created_at":"2018-06-22T00:28:38Z","updated_at":"2018-06-22T00:28:38Z","html_url":"https://github.com/terraform-providers/terraform-provider-google/pull/1681#discussion_r197312975","pull_request_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1681","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/comments/197312975"},"html":{"href":"https://github.com/terraform-providers/terraform-provider-google/pull/1681#discussion_r197312975"},"pull_request":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1681"}}},"pull_request":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1681","id":195989667,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1OTg5NjY3","html_url":"https://github.com/terraform-providers/terraform-provider-google/pull/1681","diff_url":"https://github.com/terraform-providers/terraform-provider-google/pull/1681.diff","patch_url":"https://github.com/terraform-providers/terraform-provider-google/pull/1681.patch","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/1681","number":1681,"state":"open","locked":false,"title":"Allow recreation of recently deleted project and org custom roles","user":{"login":"emilymye","id":3684614,"node_id":"MDQ6VXNlcjM2ODQ2MTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3684614?v=4","gravatar_id":"","url":"https://api.github.com/users/emilymye","html_url":"https://github.com/emilymye","followers_url":"https://api.github.com/users/emilymye/followers","following_url":"https://api.github.com/users/emilymye/following{/other_user}","gists_url":"https://api.github.com/users/emilymye/gists{/gist_id}","starred_url":"https://api.github.com/users/emilymye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emilymye/subscriptions","organizations_url":"https://api.github.com/users/emilymye/orgs","repos_url":"https://api.github.com/users/emilymye/repos","events_url":"https://api.github.com/users/emilymye/events{/privacy}","received_events_url":"https://api.github.com/users/emilymye/received_events","type":"User","site_admin":false},"body":"* Undelete-update recently soft-deleted roles instead of giving error\r\n\r\nFixes #1668","created_at":"2018-06-20T00:02:28Z","updated_at":"2018-06-22T00:28:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e7aeac27a4350c1d0966265a4d77c02b2dda1344","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ndmckinley","id":605324,"node_id":"MDQ6VXNlcjYwNTMyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/605324?v=4","gravatar_id":"","url":"https://api.github.com/users/ndmckinley","html_url":"https://github.com/ndmckinley","followers_url":"https://api.github.com/users/ndmckinley/followers","following_url":"https://api.github.com/users/ndmckinley/following{/other_user}","gists_url":"https://api.github.com/users/ndmckinley/gists{/gist_id}","starred_url":"https://api.github.com/users/ndmckinley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndmckinley/subscriptions","organizations_url":"https://api.github.com/users/ndmckinley/orgs","repos_url":"https://api.github.com/users/ndmckinley/repos","events_url":"https://api.github.com/users/ndmckinley/events{/privacy}","received_events_url":"https://api.github.com/users/ndmckinley/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1681/commits","review_comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1681/comments","review_comment_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/comments{/number}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/1681/comments","statuses_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/statuses/efae49955208dc77aff51784ca9494697a96ea6b","head":{"label":"emilymye:custom_roles","ref":"custom_roles","sha":"efae49955208dc77aff51784ca9494697a96ea6b","user":{"login":"emilymye","id":3684614,"node_id":"MDQ6VXNlcjM2ODQ2MTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3684614?v=4","gravatar_id":"","url":"https://api.github.com/users/emilymye","html_url":"https://github.com/emilymye","followers_url":"https://api.github.com/users/emilymye/followers","following_url":"https://api.github.com/users/emilymye/following{/other_user}","gists_url":"https://api.github.com/users/emilymye/gists{/gist_id}","starred_url":"https://api.github.com/users/emilymye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emilymye/subscriptions","organizations_url":"https://api.github.com/users/emilymye/orgs","repos_url":"https://api.github.com/users/emilymye/repos","events_url":"https://api.github.com/users/emilymye/events{/privacy}","received_events_url":"https://api.github.com/users/emilymye/received_events","type":"User","site_admin":false},"repo":{"id":107441836,"node_id":"MDEwOlJlcG9zaXRvcnkxMDc0NDE4MzY=","name":"terraform-provider-google","full_name":"emilymye/terraform-provider-google","owner":{"login":"emilymye","id":3684614,"node_id":"MDQ6VXNlcjM2ODQ2MTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3684614?v=4","gravatar_id":"","url":"https://api.github.com/users/emilymye","html_url":"https://github.com/emilymye","followers_url":"https://api.github.com/users/emilymye/followers","following_url":"https://api.github.com/users/emilymye/following{/other_user}","gists_url":"https://api.github.com/users/emilymye/gists{/gist_id}","starred_url":"https://api.github.com/users/emilymye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emilymye/subscriptions","organizations_url":"https://api.github.com/users/emilymye/orgs","repos_url":"https://api.github.com/users/emilymye/repos","events_url":"https://api.github.com/users/emilymye/events{/privacy}","received_events_url":"https://api.github.com/users/emilymye/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/emilymye/terraform-provider-google","description":"Terraform google provider","fork":true,"url":"https://api.github.com/repos/emilymye/terraform-provider-google","forks_url":"https://api.github.com/repos/emilymye/terraform-provider-google/forks","keys_url":"https://api.github.com/repos/emilymye/terraform-provider-google/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emilymye/terraform-provider-google/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emilymye/terraform-provider-google/teams","hooks_url":"https://api.github.com/repos/emilymye/terraform-provider-google/hooks","issue_events_url":"https://api.github.com/repos/emilymye/terraform-provider-google/issues/events{/number}","events_url":"https://api.github.com/repos/emilymye/terraform-provider-google/events","assignees_url":"https://api.github.com/repos/emilymye/terraform-provider-google/assignees{/user}","branches_url":"https://api.github.com/repos/emilymye/terraform-provider-google/branches{/branch}","tags_url":"https://api.github.com/repos/emilymye/terraform-provider-google/tags","blobs_url":"https://api.github.com/repos/emilymye/terraform-provider-google/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emilymye/terraform-provider-google/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emilymye/terraform-provider-google/git/refs{/sha}","trees_url":"https://api.github.com/repos/emilymye/terraform-provider-google/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emilymye/terraform-provider-google/statuses/{sha}","languages_url":"https://api.github.com/repos/emilymye/terraform-provider-google/languages","stargazers_url":"https://api.github.com/repos/emilymye/terraform-provider-google/stargazers","contributors_url":"https://api.github.com/repos/emilymye/terraform-provider-google/contributors","subscribers_url":"https://api.github.com/repos/emilymye/terraform-provider-google/subscribers","subscription_url":"https://api.github.com/repos/emilymye/terraform-provider-google/subscription","commits_url":"https://api.github.com/repos/emilymye/terraform-provider-google/commits{/sha}","git_commits_url":"https://api.github.com/repos/emilymye/terraform-provider-google/git/commits{/sha}","comments_url":"https://api.github.com/repos/emilymye/terraform-provider-google/comments{/number}","issue_comment_url":"https://api.github.com/repos/emilymye/terraform-provider-google/issues/comments{/number}","contents_url":"https://api.github.com/repos/emilymye/terraform-provider-google/contents/{+path}","compare_url":"https://api.github.com/repos/emilymye/terraform-provider-google/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emilymye/terraform-provider-google/merges","archive_url":"https://api.github.com/repos/emilymye/terraform-provider-google/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emilymye/terraform-provider-google/downloads","issues_url":"https://api.github.com/repos/emilymye/terraform-provider-google/issues{/number}","pulls_url":"https://api.github.com/repos/emilymye/terraform-provider-google/pulls{/number}","milestones_url":"https://api.github.com/repos/emilymye/terraform-provider-google/milestones{/number}","notifications_url":"https://api.github.com/repos/emilymye/terraform-provider-google/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emilymye/terraform-provider-google/labels{/name}","releases_url":"https://api.github.com/repos/emilymye/terraform-provider-google/releases{/id}","deployments_url":"https://api.github.com/repos/emilymye/terraform-provider-google/deployments","created_at":"2017-10-18T17:36:41Z","updated_at":"2018-06-20T23:14:32Z","pushed_at":"2018-06-21T22:53:46Z","git_url":"git://github.com/emilymye/terraform-provider-google.git","ssh_url":"git@github.com:emilymye/terraform-provider-google.git","clone_url":"https://github.com/emilymye/terraform-provider-google.git","svn_url":"https://github.com/emilymye/terraform-provider-google","homepage":"","size":11491,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"terraform-providers:master","ref":"master","sha":"a2b95e35e6cd760e6498b4cebacc29903503b16a","user":{"login":"terraform-providers","id":29154831,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5MTU0ODMx","avatar_url":"https://avatars0.githubusercontent.com/u/29154831?v=4","gravatar_id":"","url":"https://api.github.com/users/terraform-providers","html_url":"https://github.com/terraform-providers","followers_url":"https://api.github.com/users/terraform-providers/followers","following_url":"https://api.github.com/users/terraform-providers/following{/other_user}","gists_url":"https://api.github.com/users/terraform-providers/gists{/gist_id}","starred_url":"https://api.github.com/users/terraform-providers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terraform-providers/subscriptions","organizations_url":"https://api.github.com/users/terraform-providers/orgs","repos_url":"https://api.github.com/users/terraform-providers/repos","events_url":"https://api.github.com/users/terraform-providers/events{/privacy}","received_events_url":"https://api.github.com/users/terraform-providers/received_events","type":"Organization","site_admin":false},"repo":{"id":93446075,"node_id":"MDEwOlJlcG9zaXRvcnk5MzQ0NjA3NQ==","name":"terraform-provider-google","full_name":"terraform-providers/terraform-provider-google","owner":{"login":"terraform-providers","id":29154831,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5MTU0ODMx","avatar_url":"https://avatars0.githubusercontent.com/u/29154831?v=4","gravatar_id":"","url":"https://api.github.com/users/terraform-providers","html_url":"https://github.com/terraform-providers","followers_url":"https://api.github.com/users/terraform-providers/followers","following_url":"https://api.github.com/users/terraform-providers/following{/other_user}","gists_url":"https://api.github.com/users/terraform-providers/gists{/gist_id}","starred_url":"https://api.github.com/users/terraform-providers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terraform-providers/subscriptions","organizations_url":"https://api.github.com/users/terraform-providers/orgs","repos_url":"https://api.github.com/users/terraform-providers/repos","events_url":"https://api.github.com/users/terraform-providers/events{/privacy}","received_events_url":"https://api.github.com/users/terraform-providers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/terraform-providers/terraform-provider-google","description":"Terraform Google Cloud provider","fork":false,"url":"https://api.github.com/repos/terraform-providers/terraform-provider-google","forks_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/forks","keys_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/keys{/key_id}","collaborators_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/teams","hooks_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/hooks","issue_events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/events{/number}","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/events","assignees_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/assignees{/user}","branches_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/branches{/branch}","tags_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/tags","blobs_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/git/refs{/sha}","trees_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/git/trees{/sha}","statuses_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/statuses/{sha}","languages_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/languages","stargazers_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/stargazers","contributors_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/contributors","subscribers_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/subscribers","subscription_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/subscription","commits_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/commits{/sha}","git_commits_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/git/commits{/sha}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/comments{/number}","issue_comment_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/comments{/number}","contents_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/contents/{+path}","compare_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/compare/{base}...{head}","merges_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/merges","archive_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/downloads","issues_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues{/number}","pulls_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls{/number}","milestones_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/milestones{/number}","notifications_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/labels{/name}","releases_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/releases{/id}","deployments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/deployments","created_at":"2017-06-05T20:54:02Z","updated_at":"2018-06-21T22:50:14Z","pushed_at":"2018-06-22T00:21:28Z","git_url":"git://github.com/terraform-providers/terraform-provider-google.git","ssh_url":"git@github.com:terraform-providers/terraform-provider-google.git","clone_url":"https://github.com/terraform-providers/terraform-provider-google.git","svn_url":"https://github.com/terraform-providers/terraform-provider-google","homepage":"https://www.terraform.io/docs/providers/google/","size":11564,"stargazers_count":275,"watchers_count":275,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":239,"mirror_url":null,"archived":false,"open_issues_count":160,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":239,"open_issues":160,"watchers":275,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1681"},"html":{"href":"https://github.com/terraform-providers/terraform-provider-google/pull/1681"},"issue":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/1681"},"comments":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/1681/comments"},"review_comments":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1681/comments"},"review_comment":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1681/commits"},"statuses":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/statuses/efae49955208dc77aff51784ca9494697a96ea6b"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"danawillow"}}