{"action":"created","comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/comments/188140808","pull_request_review_id":120058851,"id":188140808,"diff_hunk":"@@ -195,20 +211,37 @@ func setOrganizationPolicy(d *schema.ResourceData, meta interface{}) error {\n \tconfig := meta.(*Config)\n \torg := \"organizations/\" + d.Get(\"org_id\").(string)\n \n-\tlistPolicy, err := expandListOrganizationPolicy(d.Get(\"list_policy\").([]interface{}))\n+\trestore_default, err := checkRestoreDefault(d.Get(\"restore_policy\").([]interface{}))\n \tif err != nil {\n \t\treturn err\n \t}\n \n-\t_, err = config.clientResourceManager.Organizations.SetOrgPolicy(org, &cloudresourcemanager.SetOrgPolicyRequest{\n-\t\tPolicy: &cloudresourcemanager.OrgPolicy{\n-\t\t\tConstraint:    canonicalOrgPolicyConstraint(d.Get(\"constraint\").(string)),\n-\t\t\tBooleanPolicy: expandBooleanOrganizationPolicy(d.Get(\"boolean_policy\").([]interface{})),\n-\t\t\tListPolicy:    listPolicy,\n-\t\t\tVersion:       int64(d.Get(\"version\").(int)),\n-\t\t\tEtag:          d.Get(\"etag\").(string),\n-\t\t},\n-\t}).Do()\n+\tif restore_default != nil {\n+","path":"google/resource_google_organization_policy.go","position":null,"original_position":68,"commit_id":"739251ab26ce79e6ffdfe6c961c6648eb8aafdf3","original_commit_id":"b49b6ec0d52811523ae127bad0a0134090c2be1b","user":{"login":"ortaman","id":10294130,"avatar_url":"https://avatars1.githubusercontent.com/u/10294130?v=4","gravatar_id":"","url":"https://api.github.com/users/ortaman","html_url":"https://github.com/ortaman","followers_url":"https://api.github.com/users/ortaman/followers","following_url":"https://api.github.com/users/ortaman/following{/other_user}","gists_url":"https://api.github.com/users/ortaman/gists{/gist_id}","starred_url":"https://api.github.com/users/ortaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ortaman/subscriptions","organizations_url":"https://api.github.com/users/ortaman/orgs","repos_url":"https://api.github.com/users/ortaman/repos","events_url":"https://api.github.com/users/ortaman/events{/privacy}","received_events_url":"https://api.github.com/users/ortaman/received_events","type":"User","site_admin":false},"body":"refactored code","created_at":"2018-05-15T01:05:55Z","updated_at":"2018-05-15T01:05:56Z","html_url":"https://github.com/terraform-providers/terraform-provider-google/pull/1477#discussion_r188140808","pull_request_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1477","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/comments/188140808"},"html":{"href":"https://github.com/terraform-providers/terraform-provider-google/pull/1477#discussion_r188140808"},"pull_request":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1477"}},"in_reply_to_id":188114235},"pull_request":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1477","id":187521721,"html_url":"https://github.com/terraform-providers/terraform-provider-google/pull/1477","diff_url":"https://github.com/terraform-providers/terraform-provider-google/pull/1477.diff","patch_url":"https://github.com/terraform-providers/terraform-provider-google/pull/1477.patch","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/1477","number":1477,"state":"open","locked":false,"title":"Added support for restoring default organization policies","user":{"login":"ortaman","id":10294130,"avatar_url":"https://avatars1.githubusercontent.com/u/10294130?v=4","gravatar_id":"","url":"https://api.github.com/users/ortaman","html_url":"https://github.com/ortaman","followers_url":"https://api.github.com/users/ortaman/followers","following_url":"https://api.github.com/users/ortaman/following{/other_user}","gists_url":"https://api.github.com/users/ortaman/gists{/gist_id}","starred_url":"https://api.github.com/users/ortaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ortaman/subscriptions","organizations_url":"https://api.github.com/users/ortaman/orgs","repos_url":"https://api.github.com/users/ortaman/repos","events_url":"https://api.github.com/users/ortaman/events{/privacy}","received_events_url":"https://api.github.com/users/ortaman/received_events","type":"User","site_admin":false},"body":"To the enhancement: https://github.com/terraform-providers/terraform-provider-google/issues/1239","created_at":"2018-05-11T17:17:53Z","updated_at":"2018-05-15T01:05:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"597fc89f669c22277e2ce899bb537cab3e2bd90f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1477/commits","review_comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1477/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/1477/comments","statuses_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/statuses/739251ab26ce79e6ffdfe6c961c6648eb8aafdf3","head":{"label":"ortaman:master","ref":"master","sha":"739251ab26ce79e6ffdfe6c961c6648eb8aafdf3","user":{"login":"ortaman","id":10294130,"avatar_url":"https://avatars1.githubusercontent.com/u/10294130?v=4","gravatar_id":"","url":"https://api.github.com/users/ortaman","html_url":"https://github.com/ortaman","followers_url":"https://api.github.com/users/ortaman/followers","following_url":"https://api.github.com/users/ortaman/following{/other_user}","gists_url":"https://api.github.com/users/ortaman/gists{/gist_id}","starred_url":"https://api.github.com/users/ortaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ortaman/subscriptions","organizations_url":"https://api.github.com/users/ortaman/orgs","repos_url":"https://api.github.com/users/ortaman/repos","events_url":"https://api.github.com/users/ortaman/events{/privacy}","received_events_url":"https://api.github.com/users/ortaman/received_events","type":"User","site_admin":false},"repo":{"id":132866113,"name":"terraform-provider-google","full_name":"ortaman/terraform-provider-google","owner":{"login":"ortaman","id":10294130,"avatar_url":"https://avatars1.githubusercontent.com/u/10294130?v=4","gravatar_id":"","url":"https://api.github.com/users/ortaman","html_url":"https://github.com/ortaman","followers_url":"https://api.github.com/users/ortaman/followers","following_url":"https://api.github.com/users/ortaman/following{/other_user}","gists_url":"https://api.github.com/users/ortaman/gists{/gist_id}","starred_url":"https://api.github.com/users/ortaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ortaman/subscriptions","organizations_url":"https://api.github.com/users/ortaman/orgs","repos_url":"https://api.github.com/users/ortaman/repos","events_url":"https://api.github.com/users/ortaman/events{/privacy}","received_events_url":"https://api.github.com/users/ortaman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ortaman/terraform-provider-google","description":"Terraform Google Cloud provider","fork":true,"url":"https://api.github.com/repos/ortaman/terraform-provider-google","forks_url":"https://api.github.com/repos/ortaman/terraform-provider-google/forks","keys_url":"https://api.github.com/repos/ortaman/terraform-provider-google/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ortaman/terraform-provider-google/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ortaman/terraform-provider-google/teams","hooks_url":"https://api.github.com/repos/ortaman/terraform-provider-google/hooks","issue_events_url":"https://api.github.com/repos/ortaman/terraform-provider-google/issues/events{/number}","events_url":"https://api.github.com/repos/ortaman/terraform-provider-google/events","assignees_url":"https://api.github.com/repos/ortaman/terraform-provider-google/assignees{/user}","branches_url":"https://api.github.com/repos/ortaman/terraform-provider-google/branches{/branch}","tags_url":"https://api.github.com/repos/ortaman/terraform-provider-google/tags","blobs_url":"https://api.github.com/repos/ortaman/terraform-provider-google/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ortaman/terraform-provider-google/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ortaman/terraform-provider-google/git/refs{/sha}","trees_url":"https://api.github.com/repos/ortaman/terraform-provider-google/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ortaman/terraform-provider-google/statuses/{sha}","languages_url":"https://api.github.com/repos/ortaman/terraform-provider-google/languages","stargazers_url":"https://api.github.com/repos/ortaman/terraform-provider-google/stargazers","contributors_url":"https://api.github.com/repos/ortaman/terraform-provider-google/contributors","subscribers_url":"https://api.github.com/repos/ortaman/terraform-provider-google/subscribers","subscription_url":"https://api.github.com/repos/ortaman/terraform-provider-google/subscription","commits_url":"https://api.github.com/repos/ortaman/terraform-provider-google/commits{/sha}","git_commits_url":"https://api.github.com/repos/ortaman/terraform-provider-google/git/commits{/sha}","comments_url":"https://api.github.com/repos/ortaman/terraform-provider-google/comments{/number}","issue_comment_url":"https://api.github.com/repos/ortaman/terraform-provider-google/issues/comments{/number}","contents_url":"https://api.github.com/repos/ortaman/terraform-provider-google/contents/{+path}","compare_url":"https://api.github.com/repos/ortaman/terraform-provider-google/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ortaman/terraform-provider-google/merges","archive_url":"https://api.github.com/repos/ortaman/terraform-provider-google/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ortaman/terraform-provider-google/downloads","issues_url":"https://api.github.com/repos/ortaman/terraform-provider-google/issues{/number}","pulls_url":"https://api.github.com/repos/ortaman/terraform-provider-google/pulls{/number}","milestones_url":"https://api.github.com/repos/ortaman/terraform-provider-google/milestones{/number}","notifications_url":"https://api.github.com/repos/ortaman/terraform-provider-google/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ortaman/terraform-provider-google/labels{/name}","releases_url":"https://api.github.com/repos/ortaman/terraform-provider-google/releases{/id}","deployments_url":"https://api.github.com/repos/ortaman/terraform-provider-google/deployments","created_at":"2018-05-10T07:42:01Z","updated_at":"2018-05-15T01:00:20Z","pushed_at":"2018-05-15T01:00:18Z","git_url":"git://github.com/ortaman/terraform-provider-google.git","ssh_url":"git@github.com:ortaman/terraform-provider-google.git","clone_url":"https://github.com/ortaman/terraform-provider-google.git","svn_url":"https://github.com/ortaman/terraform-provider-google","homepage":"https://www.terraform.io/docs/providers/google/","size":10835,"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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"terraform-providers:master","ref":"master","sha":"612be33ab94e103be23de3e850d0c2c98e386f75","user":{"login":"terraform-providers","id":29154831,"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,"name":"terraform-provider-google","full_name":"terraform-providers/terraform-provider-google","owner":{"login":"terraform-providers","id":29154831,"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-05-14T23:59:58Z","pushed_at":"2018-05-15T01:00:19Z","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":10909,"stargazers_count":244,"watchers_count":244,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":205,"mirror_url":null,"archived":false,"open_issues_count":151,"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"},"forks":205,"open_issues":151,"watchers":244,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1477"},"html":{"href":"https://github.com/terraform-providers/terraform-provider-google/pull/1477"},"issue":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/1477"},"comments":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/1477/comments"},"review_comments":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1477/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/1477/commits"},"statuses":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/statuses/739251ab26ce79e6ffdfe6c961c6648eb8aafdf3"}},"author_association":"NONE"}}
{"actor":{"display_login":"ortaman"}}