{"action":"created","comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/comments/168011870","pull_request_review_id":96312613,"id":168011870,"diff_hunk":"@@ -0,0 +1,131 @@\n+package google\n+\n+import (\n+\t\"fmt\"\n+\n+\t\"github.com/hashicorp/terraform/helper/schema\"\n+)\n+\n+func dataSourceGoogleComputeForwardingRule() *schema.Resource {\n+\treturn &schema.Resource{\n+\t\tRead: dataSourceGoogleComputeForwardingRuleRead,\n+\n+\t\tSchema: map[string]*schema.Schema{\n+\t\t\t\"name\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tRequired: true,\n+\t\t\t},\n+\n+\t\t\t\"region\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t\tComputed: true,\n+\t\t\t},\n+\n+\t\t\t\"project\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t\tComputed: true,\n+\t\t\t},\n+\n+\t\t\t\"target\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t},\n+\n+\t\t\t\"backend_service\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t},\n+\n+\t\t\t\"description\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t},\n+\n+\t\t\t\"ip_address\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t\tComputed: true,\n+\t\t\t},\n+\n+\t\t\t\"ip_protocol\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t\tComputed: true,\n+\t\t\t},\n+\n+\t\t\t\"load_balancing_scheme\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t},\n+\n+\t\t\t\"network\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t\tComputed: true,\n+\t\t\t},\n+\n+\t\t\t\"port_range\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t},\n+\n+\t\t\t\"ports\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeSet,\n+\t\t\t\tElem:     &schema.Schema{Type: schema.TypeString},\n+\t\t\t\tOptional: true,\n+\t\t\t},\n+\n+\t\t\t\"self_link\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tComputed: true,\n+\t\t\t},\n+\n+\t\t\t\"subnetwork\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t\tComputed: true,\n+\t\t\t},\n+\t\t},\n+\t}\n+}\n+\n+func dataSourceGoogleComputeForwardingRuleRead(d *schema.ResourceData, meta interface{}) error {\n+\tconfig := meta.(*Config)\n+\n+\tregion, err := getRegion(d, config)\n+\tif err != nil {\n+\t\treturn err\n+\t}\n+\n+\tproject, err := getProject(d, config)\n+\tif err != nil {\n+\t\treturn err\n+\t}\n+\n+\tname := d.Get(\"name\").(string)\n+\n+\tfrule, err := config.clientCompute.ForwardingRules.Get(\n+\t\tproject, region, name).Do()\n+\tif err != nil {\n+\t\treturn handleNotFoundError(err, d, fmt.Sprintf(\"Forwarding Rule Not Found : %s\", name))\n+\t}\n+\td.Set(\"self_link\", frule.SelfLink)\n+\td.Set(\"description\", frule.Description)\n+\td.Set(\"backend_service\", frule.BackendService)\n+\td.Set(\"ip_address\", frule.IPAddress)\n+\td.Set(\"ip_protocol\", frule.IPProtocol)\n+\td.Set(\"load_balancing_scheme\", frule.LoadBalancingScheme)\n+\td.Set(\"name\", frule.Name)\n+\td.Set(\"port_range\", frule.PortRange)\n+\td.Set(\"ports\", frule.Ports)\n+\td.Set(\"subnetwork\", frule.Subnetwork)\n+\td.Set(\"network\", frule.Network)\n+\td.Set(\"target\", frule.Target)\n+\td.Set(\"project\", project)\n+\td.Set(\"region\", region)\n+\n+\td.SetId(frule.Name)","path":"google/data_source_google_compute_forwarding_rule.go","position":null,"original_position":129,"commit_id":"08917c6aaf60e8d2347080e021c700f7ea0d5c7c","original_commit_id":"e1db7ea8debd377d7955b8a31885e8fec47d8319","user":{"login":"jphalip","id":68544,"avatar_url":"https://avatars0.githubusercontent.com/u/68544?v=4","gravatar_id":"","url":"https://api.github.com/users/jphalip","html_url":"https://github.com/jphalip","followers_url":"https://api.github.com/users/jphalip/followers","following_url":"https://api.github.com/users/jphalip/following{/other_user}","gists_url":"https://api.github.com/users/jphalip/gists{/gist_id}","starred_url":"https://api.github.com/users/jphalip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jphalip/subscriptions","organizations_url":"https://api.github.com/users/jphalip/orgs","repos_url":"https://api.github.com/users/jphalip/repos","events_url":"https://api.github.com/users/jphalip/events{/privacy}","received_events_url":"https://api.github.com/users/jphalip/received_events","type":"User","site_admin":false},"body":"Just pushed an update for that. Does that work?","created_at":"2018-02-13T21:47:31Z","updated_at":"2018-02-13T21:47:31Z","html_url":"https://github.com/terraform-providers/terraform-provider-google/pull/1078#discussion_r168011870","pull_request_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1078","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/comments/168011870"},"html":{"href":"https://github.com/terraform-providers/terraform-provider-google/pull/1078#discussion_r168011870"},"pull_request":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1078"}},"in_reply_to_id":167963134},"pull_request":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1078","id":168744230,"html_url":"https://github.com/terraform-providers/terraform-provider-google/pull/1078","diff_url":"https://github.com/terraform-providers/terraform-provider-google/pull/1078.diff","patch_url":"https://github.com/terraform-providers/terraform-provider-google/pull/1078.patch","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/1078","number":1078,"state":"open","locked":false,"title":"Add data source for forwarding rule","user":{"login":"jphalip","id":68544,"avatar_url":"https://avatars0.githubusercontent.com/u/68544?v=4","gravatar_id":"","url":"https://api.github.com/users/jphalip","html_url":"https://github.com/jphalip","followers_url":"https://api.github.com/users/jphalip/followers","following_url":"https://api.github.com/users/jphalip/following{/other_user}","gists_url":"https://api.github.com/users/jphalip/gists{/gist_id}","starred_url":"https://api.github.com/users/jphalip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jphalip/subscriptions","organizations_url":"https://api.github.com/users/jphalip/orgs","repos_url":"https://api.github.com/users/jphalip/repos","events_url":"https://api.github.com/users/jphalip/events{/privacy}","received_events_url":"https://api.github.com/users/jphalip/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-13T03:14:19Z","updated_at":"2018-02-13T21:47:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"745804fc36ea6dcf6d85252ab3fced60398bb9af","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1078/commits","review_comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1078/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/1078/comments","statuses_url":"https://api.github.com/repos/terraform-providers/terraform-provider-google/statuses/08917c6aaf60e8d2347080e021c700f7ea0d5c7c","head":{"label":"jphalip:data-source-forwarding-rule","ref":"data-source-forwarding-rule","sha":"08917c6aaf60e8d2347080e021c700f7ea0d5c7c","user":{"login":"jphalip","id":68544,"avatar_url":"https://avatars0.githubusercontent.com/u/68544?v=4","gravatar_id":"","url":"https://api.github.com/users/jphalip","html_url":"https://github.com/jphalip","followers_url":"https://api.github.com/users/jphalip/followers","following_url":"https://api.github.com/users/jphalip/following{/other_user}","gists_url":"https://api.github.com/users/jphalip/gists{/gist_id}","starred_url":"https://api.github.com/users/jphalip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jphalip/subscriptions","organizations_url":"https://api.github.com/users/jphalip/orgs","repos_url":"https://api.github.com/users/jphalip/repos","events_url":"https://api.github.com/users/jphalip/events{/privacy}","received_events_url":"https://api.github.com/users/jphalip/received_events","type":"User","site_admin":false},"repo":{"id":119011897,"name":"terraform-provider-google","full_name":"jphalip/terraform-provider-google","owner":{"login":"jphalip","id":68544,"avatar_url":"https://avatars0.githubusercontent.com/u/68544?v=4","gravatar_id":"","url":"https://api.github.com/users/jphalip","html_url":"https://github.com/jphalip","followers_url":"https://api.github.com/users/jphalip/followers","following_url":"https://api.github.com/users/jphalip/following{/other_user}","gists_url":"https://api.github.com/users/jphalip/gists{/gist_id}","starred_url":"https://api.github.com/users/jphalip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jphalip/subscriptions","organizations_url":"https://api.github.com/users/jphalip/orgs","repos_url":"https://api.github.com/users/jphalip/repos","events_url":"https://api.github.com/users/jphalip/events{/privacy}","received_events_url":"https://api.github.com/users/jphalip/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jphalip/terraform-provider-google","description":"Terraform Google Cloud provider","fork":true,"url":"https://api.github.com/repos/jphalip/terraform-provider-google","forks_url":"https://api.github.com/repos/jphalip/terraform-provider-google/forks","keys_url":"https://api.github.com/repos/jphalip/terraform-provider-google/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jphalip/terraform-provider-google/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jphalip/terraform-provider-google/teams","hooks_url":"https://api.github.com/repos/jphalip/terraform-provider-google/hooks","issue_events_url":"https://api.github.com/repos/jphalip/terraform-provider-google/issues/events{/number}","events_url":"https://api.github.com/repos/jphalip/terraform-provider-google/events","assignees_url":"https://api.github.com/repos/jphalip/terraform-provider-google/assignees{/user}","branches_url":"https://api.github.com/repos/jphalip/terraform-provider-google/branches{/branch}","tags_url":"https://api.github.com/repos/jphalip/terraform-provider-google/tags","blobs_url":"https://api.github.com/repos/jphalip/terraform-provider-google/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jphalip/terraform-provider-google/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jphalip/terraform-provider-google/git/refs{/sha}","trees_url":"https://api.github.com/repos/jphalip/terraform-provider-google/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jphalip/terraform-provider-google/statuses/{sha}","languages_url":"https://api.github.com/repos/jphalip/terraform-provider-google/languages","stargazers_url":"https://api.github.com/repos/jphalip/terraform-provider-google/stargazers","contributors_url":"https://api.github.com/repos/jphalip/terraform-provider-google/contributors","subscribers_url":"https://api.github.com/repos/jphalip/terraform-provider-google/subscribers","subscription_url":"https://api.github.com/repos/jphalip/terraform-provider-google/subscription","commits_url":"https://api.github.com/repos/jphalip/terraform-provider-google/commits{/sha}","git_commits_url":"https://api.github.com/repos/jphalip/terraform-provider-google/git/commits{/sha}","comments_url":"https://api.github.com/repos/jphalip/terraform-provider-google/comments{/number}","issue_comment_url":"https://api.github.com/repos/jphalip/terraform-provider-google/issues/comments{/number}","contents_url":"https://api.github.com/repos/jphalip/terraform-provider-google/contents/{+path}","compare_url":"https://api.github.com/repos/jphalip/terraform-provider-google/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jphalip/terraform-provider-google/merges","archive_url":"https://api.github.com/repos/jphalip/terraform-provider-google/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jphalip/terraform-provider-google/downloads","issues_url":"https://api.github.com/repos/jphalip/terraform-provider-google/issues{/number}","pulls_url":"https://api.github.com/repos/jphalip/terraform-provider-google/pulls{/number}","milestones_url":"https://api.github.com/repos/jphalip/terraform-provider-google/milestones{/number}","notifications_url":"https://api.github.com/repos/jphalip/terraform-provider-google/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jphalip/terraform-provider-google/labels{/name}","releases_url":"https://api.github.com/repos/jphalip/terraform-provider-google/releases{/id}","deployments_url":"https://api.github.com/repos/jphalip/terraform-provider-google/deployments","created_at":"2018-01-26T05:55:16Z","updated_at":"2018-01-26T05:55:19Z","pushed_at":"2018-02-13T21:47:10Z","git_url":"git://github.com/jphalip/terraform-provider-google.git","ssh_url":"git@github.com:jphalip/terraform-provider-google.git","clone_url":"https://github.com/jphalip/terraform-provider-google.git","svn_url":"https://github.com/jphalip/terraform-provider-google","homepage":"https://www.terraform.io/docs/providers/google/","size":9415,"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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"terraform-providers:master","ref":"master","sha":"65dd41826de6cdbf6f011315cfe1e3bcfb82b702","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-02-13T08:17:22Z","pushed_at":"2018-02-13T21:47:11Z","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":9407,"stargazers_count":167,"watchers_count":167,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":138,"mirror_url":null,"archived":false,"open_issues_count":116,"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":138,"open_issues":116,"watchers":167,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1078"},"html":{"href":"https://github.com/terraform-providers/terraform-provider-google/pull/1078"},"issue":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/1078"},"comments":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/issues/1078/comments"},"review_comments":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/pulls/1078/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/1078/commits"},"statuses":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-google/statuses/08917c6aaf60e8d2347080e021c700f7ea0d5c7c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jphalip"}}