{"action":"closed","number":7984,"pull_request":{"url":"https://api.github.com/repos/hashicorp/terraform/pulls/7984","id":80117302,"html_url":"https://github.com/hashicorp/terraform/pull/7984","diff_url":"https://github.com/hashicorp/terraform/pull/7984.diff","patch_url":"https://github.com/hashicorp/terraform/pull/7984.patch","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/7984","number":7984,"state":"closed","locked":false,"title":"Datasource for AWS and Fastly IP ranges","user":{"login":"yawn","id":18242,"avatar_url":"https://avatars.githubusercontent.com/u/18242?v=3","gravatar_id":"","url":"https://api.github.com/users/yawn","html_url":"https://github.com/yawn","followers_url":"https://api.github.com/users/yawn/followers","following_url":"https://api.github.com/users/yawn/following{/other_user}","gists_url":"https://api.github.com/users/yawn/gists{/gist_id}","starred_url":"https://api.github.com/users/yawn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yawn/subscriptions","organizations_url":"https://api.github.com/users/yawn/orgs","repos_url":"https://api.github.com/users/yawn/repos","events_url":"https://api.github.com/users/yawn/events{/privacy}","received_events_url":"https://api.github.com/users/yawn/received_events","type":"User","site_admin":false},"body":"This will allow the referencing of IP ranges like so:\r\n\r\n```\r\nprovider \"aws\" {\r\n  region = \"eu-west-1\"\r\n}\r\n\r\nprovider \"fastly\" {\r\n  api_key = \"test\"\r\n}\r\n\r\ndata \"fastly_ip_ranges\" \"fastly\" {\r\n}\r\n\r\ndata \"aws_ip_ranges\" \"cloudfront\" {\r\n  services = [ \"cloudfront\" ]\r\n}\r\n\r\ndata \"aws_ip_ranges\" \"healthchecks\" {\r\n  services = [ \"route53_healthchecks\" ]\r\n}\r\n\r\ndata \"aws_ip_ranges\" \"european_ec2\" {\r\n  services = [ \"ec2\" ]\r\n  regions = [ \"eu-west-1\", \"eu-central-1\" ]\r\n}\r\n\r\nresource \"aws_security_group\" \"from_cloudfront\" {\r\n\r\n  name = \"from_cf\"\r\n\r\n  ingress {\r\n    from_port = \"443\"\r\n    to_port = \"443\"\r\n    protocol = \"tcp\"\r\n    cidr_blocks = [ \"${data.aws_ip_ranges.cloudfront.cidr_blocks}\" ]\r\n  }\r\n\r\n  tags {\r\n    CreateDate = \"${data.aws_ip_ranges.cloudfront.create_date}\"\r\n    SyncToken = \"${data.aws_ip_ranges.cloudfront.sync_token}\"\r\n  }\r\n\r\n}\r\n\r\nresource \"aws_security_group\" \"from_europe\" {\r\n\r\n  name = \"from_europe\"\r\n\r\n  ingress {\r\n    from_port = \"443\"\r\n    to_port = \"443\"\r\n    protocol = \"tcp\"\r\n    cidr_blocks = [ \"${data.aws_ip_ranges.european_ec2.cidr_blocks}\" ]\r\n  }\r\n\r\n  tags {\r\n    CreateDate = \"${data.aws_ip_ranges.european_ec2.create_date}\"\r\n    SyncToken = \"${data.aws_ip_ranges.european_ec2.sync_token}\"\r\n  }\r\n\r\n}\r\n\r\nresource \"aws_security_group\" \"from_fastly\" {\r\n\r\n  name = \"from_fastly\"\r\n\r\n  ingress {\r\n    from_port = \"443\"\r\n    to_port = \"443\"\r\n    protocol = \"tcp\"\r\n    cidr_blocks = [ \"${data.fastly_ip_ranges.fastly.cidr_blocks}\" ]\r\n  }\r\n\r\n}\r\n\r\nresource \"aws_security_group\" \"from_r53\" {\r\n\r\n  name = \"from_r53\"\r\n\r\n  ingress {\r\n    from_port = \"443\"\r\n    to_port = \"443\"\r\n    protocol = \"tcp\"\r\n    cidr_blocks = [ \"${data.aws_ip_ranges.healthchecks.cidr_blocks}\" ]\r\n  }\r\n\r\n  tags {\r\n    CreateDate = \"${data.aws_ip_ranges.healthchecks.create_date}\"\r\n    SyncToken = \"${data.aws_ip_ranges.healthchecks.sync_token}\"\r\n  }\r\n\r\n}\r\n```\r\n\r\nIf you like this contribution, I'll\r\n\r\n* [X] add documentation\r\n* [x] add tests\r\n* [X] rename `blocks` to `cidr_blocks`\r\n\r\nThe `main.tf` referenced above should already be `apply`able.","created_at":"2016-08-04T17:25:00Z","updated_at":"2016-08-09T16:57:18Z","closed_at":"2016-08-09T16:57:17Z","merged_at":"2016-08-09T16:57:17Z","merge_commit_sha":"8ea400b442828bc1b461384f1babba118853ffd2","assignee":{"login":"apparentlymart","id":20180,"avatar_url":"https://avatars.githubusercontent.com/u/20180?v=3","gravatar_id":"","url":"https://api.github.com/users/apparentlymart","html_url":"https://github.com/apparentlymart","followers_url":"https://api.github.com/users/apparentlymart/followers","following_url":"https://api.github.com/users/apparentlymart/following{/other_user}","gists_url":"https://api.github.com/users/apparentlymart/gists{/gist_id}","starred_url":"https://api.github.com/users/apparentlymart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apparentlymart/subscriptions","organizations_url":"https://api.github.com/users/apparentlymart/orgs","repos_url":"https://api.github.com/users/apparentlymart/repos","events_url":"https://api.github.com/users/apparentlymart/events{/privacy}","received_events_url":"https://api.github.com/users/apparentlymart/received_events","type":"User","site_admin":false},"assignees":[{"login":"apparentlymart","id":20180,"avatar_url":"https://avatars.githubusercontent.com/u/20180?v=3","gravatar_id":"","url":"https://api.github.com/users/apparentlymart","html_url":"https://github.com/apparentlymart","followers_url":"https://api.github.com/users/apparentlymart/followers","following_url":"https://api.github.com/users/apparentlymart/following{/other_user}","gists_url":"https://api.github.com/users/apparentlymart/gists{/gist_id}","starred_url":"https://api.github.com/users/apparentlymart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apparentlymart/subscriptions","organizations_url":"https://api.github.com/users/apparentlymart/orgs","repos_url":"https://api.github.com/users/apparentlymart/repos","events_url":"https://api.github.com/users/apparentlymart/events{/privacy}","received_events_url":"https://api.github.com/users/apparentlymart/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/hashicorp/terraform/pulls/7984/commits","review_comments_url":"https://api.github.com/repos/hashicorp/terraform/pulls/7984/comments","review_comment_url":"https://api.github.com/repos/hashicorp/terraform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/7984/comments","statuses_url":"https://api.github.com/repos/hashicorp/terraform/statuses/8ea400b442828bc1b461384f1babba118853ffd2","head":{"label":"yawn:ips","ref":"ips","sha":"8ea400b442828bc1b461384f1babba118853ffd2","user":{"login":"yawn","id":18242,"avatar_url":"https://avatars.githubusercontent.com/u/18242?v=3","gravatar_id":"","url":"https://api.github.com/users/yawn","html_url":"https://github.com/yawn","followers_url":"https://api.github.com/users/yawn/followers","following_url":"https://api.github.com/users/yawn/following{/other_user}","gists_url":"https://api.github.com/users/yawn/gists{/gist_id}","starred_url":"https://api.github.com/users/yawn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yawn/subscriptions","organizations_url":"https://api.github.com/users/yawn/orgs","repos_url":"https://api.github.com/users/yawn/repos","events_url":"https://api.github.com/users/yawn/events{/privacy}","received_events_url":"https://api.github.com/users/yawn/received_events","type":"User","site_admin":false},"repo":{"id":64826113,"name":"terraform","full_name":"yawn/terraform","owner":{"login":"yawn","id":18242,"avatar_url":"https://avatars.githubusercontent.com/u/18242?v=3","gravatar_id":"","url":"https://api.github.com/users/yawn","html_url":"https://github.com/yawn","followers_url":"https://api.github.com/users/yawn/followers","following_url":"https://api.github.com/users/yawn/following{/other_user}","gists_url":"https://api.github.com/users/yawn/gists{/gist_id}","starred_url":"https://api.github.com/users/yawn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yawn/subscriptions","organizations_url":"https://api.github.com/users/yawn/orgs","repos_url":"https://api.github.com/users/yawn/repos","events_url":"https://api.github.com/users/yawn/events{/privacy}","received_events_url":"https://api.github.com/users/yawn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yawn/terraform","description":"Terraform is a tool for building, changing, and combining infrastructure safely and efficiently.","fork":true,"url":"https://api.github.com/repos/yawn/terraform","forks_url":"https://api.github.com/repos/yawn/terraform/forks","keys_url":"https://api.github.com/repos/yawn/terraform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yawn/terraform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yawn/terraform/teams","hooks_url":"https://api.github.com/repos/yawn/terraform/hooks","issue_events_url":"https://api.github.com/repos/yawn/terraform/issues/events{/number}","events_url":"https://api.github.com/repos/yawn/terraform/events","assignees_url":"https://api.github.com/repos/yawn/terraform/assignees{/user}","branches_url":"https://api.github.com/repos/yawn/terraform/branches{/branch}","tags_url":"https://api.github.com/repos/yawn/terraform/tags","blobs_url":"https://api.github.com/repos/yawn/terraform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yawn/terraform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yawn/terraform/git/refs{/sha}","trees_url":"https://api.github.com/repos/yawn/terraform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yawn/terraform/statuses/{sha}","languages_url":"https://api.github.com/repos/yawn/terraform/languages","stargazers_url":"https://api.github.com/repos/yawn/terraform/stargazers","contributors_url":"https://api.github.com/repos/yawn/terraform/contributors","subscribers_url":"https://api.github.com/repos/yawn/terraform/subscribers","subscription_url":"https://api.github.com/repos/yawn/terraform/subscription","commits_url":"https://api.github.com/repos/yawn/terraform/commits{/sha}","git_commits_url":"https://api.github.com/repos/yawn/terraform/git/commits{/sha}","comments_url":"https://api.github.com/repos/yawn/terraform/comments{/number}","issue_comment_url":"https://api.github.com/repos/yawn/terraform/issues/comments{/number}","contents_url":"https://api.github.com/repos/yawn/terraform/contents/{+path}","compare_url":"https://api.github.com/repos/yawn/terraform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yawn/terraform/merges","archive_url":"https://api.github.com/repos/yawn/terraform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yawn/terraform/downloads","issues_url":"https://api.github.com/repos/yawn/terraform/issues{/number}","pulls_url":"https://api.github.com/repos/yawn/terraform/pulls{/number}","milestones_url":"https://api.github.com/repos/yawn/terraform/milestones{/number}","notifications_url":"https://api.github.com/repos/yawn/terraform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yawn/terraform/labels{/name}","releases_url":"https://api.github.com/repos/yawn/terraform/releases{/id}","deployments_url":"https://api.github.com/repos/yawn/terraform/deployments","created_at":"2016-08-03T07:43:10Z","updated_at":"2016-08-03T07:43:19Z","pushed_at":"2016-08-09T12:42:30Z","git_url":"git://github.com/yawn/terraform.git","ssh_url":"git@github.com:yawn/terraform.git","clone_url":"https://github.com/yawn/terraform.git","svn_url":"https://github.com/yawn/terraform","homepage":"https://www.terraform.io/","size":51613,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hashicorp:master","ref":"master","sha":"de822d909c4013a99082918bc563262e3ef4ae89","user":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"repo":{"id":17728164,"name":"terraform","full_name":"hashicorp/terraform","owner":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hashicorp/terraform","description":"Terraform is a tool for building, changing, and combining infrastructure safely and efficiently.","fork":false,"url":"https://api.github.com/repos/hashicorp/terraform","forks_url":"https://api.github.com/repos/hashicorp/terraform/forks","keys_url":"https://api.github.com/repos/hashicorp/terraform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hashicorp/terraform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hashicorp/terraform/teams","hooks_url":"https://api.github.com/repos/hashicorp/terraform/hooks","issue_events_url":"https://api.github.com/repos/hashicorp/terraform/issues/events{/number}","events_url":"https://api.github.com/repos/hashicorp/terraform/events","assignees_url":"https://api.github.com/repos/hashicorp/terraform/assignees{/user}","branches_url":"https://api.github.com/repos/hashicorp/terraform/branches{/branch}","tags_url":"https://api.github.com/repos/hashicorp/terraform/tags","blobs_url":"https://api.github.com/repos/hashicorp/terraform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hashicorp/terraform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hashicorp/terraform/git/refs{/sha}","trees_url":"https://api.github.com/repos/hashicorp/terraform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hashicorp/terraform/statuses/{sha}","languages_url":"https://api.github.com/repos/hashicorp/terraform/languages","stargazers_url":"https://api.github.com/repos/hashicorp/terraform/stargazers","contributors_url":"https://api.github.com/repos/hashicorp/terraform/contributors","subscribers_url":"https://api.github.com/repos/hashicorp/terraform/subscribers","subscription_url":"https://api.github.com/repos/hashicorp/terraform/subscription","commits_url":"https://api.github.com/repos/hashicorp/terraform/commits{/sha}","git_commits_url":"https://api.github.com/repos/hashicorp/terraform/git/commits{/sha}","comments_url":"https://api.github.com/repos/hashicorp/terraform/comments{/number}","issue_comment_url":"https://api.github.com/repos/hashicorp/terraform/issues/comments{/number}","contents_url":"https://api.github.com/repos/hashicorp/terraform/contents/{+path}","compare_url":"https://api.github.com/repos/hashicorp/terraform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hashicorp/terraform/merges","archive_url":"https://api.github.com/repos/hashicorp/terraform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hashicorp/terraform/downloads","issues_url":"https://api.github.com/repos/hashicorp/terraform/issues{/number}","pulls_url":"https://api.github.com/repos/hashicorp/terraform/pulls{/number}","milestones_url":"https://api.github.com/repos/hashicorp/terraform/milestones{/number}","notifications_url":"https://api.github.com/repos/hashicorp/terraform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hashicorp/terraform/labels{/name}","releases_url":"https://api.github.com/repos/hashicorp/terraform/releases{/id}","deployments_url":"https://api.github.com/repos/hashicorp/terraform/deployments","created_at":"2014-03-13T22:25:48Z","updated_at":"2016-08-09T16:50:17Z","pushed_at":"2016-08-09T16:57:05Z","git_url":"git://github.com/hashicorp/terraform.git","ssh_url":"git@github.com:hashicorp/terraform.git","clone_url":"https://github.com/hashicorp/terraform.git","svn_url":"https://github.com/hashicorp/terraform","homepage":"https://www.terraform.io/","size":101549,"stargazers_count":5422,"watchers_count":5422,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1703,"mirror_url":null,"open_issues_count":1475,"forks":1703,"open_issues":1475,"watchers":5422,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/7984"},"html":{"href":"https://github.com/hashicorp/terraform/pull/7984"},"issue":{"href":"https://api.github.com/repos/hashicorp/terraform/issues/7984"},"comments":{"href":"https://api.github.com/repos/hashicorp/terraform/issues/7984/comments"},"review_comments":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/7984/comments"},"review_comment":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/7984/commits"},"statuses":{"href":"https://api.github.com/repos/hashicorp/terraform/statuses/8ea400b442828bc1b461384f1babba118853ffd2"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"apparentlymart","id":20180,"avatar_url":"https://avatars.githubusercontent.com/u/20180?v=3","gravatar_id":"","url":"https://api.github.com/users/apparentlymart","html_url":"https://github.com/apparentlymart","followers_url":"https://api.github.com/users/apparentlymart/followers","following_url":"https://api.github.com/users/apparentlymart/following{/other_user}","gists_url":"https://api.github.com/users/apparentlymart/gists{/gist_id}","starred_url":"https://api.github.com/users/apparentlymart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apparentlymart/subscriptions","organizations_url":"https://api.github.com/users/apparentlymart/orgs","repos_url":"https://api.github.com/users/apparentlymart/repos","events_url":"https://api.github.com/users/apparentlymart/events{/privacy}","received_events_url":"https://api.github.com/users/apparentlymart/received_events","type":"User","site_admin":false},"comments":6,"review_comments":5,"commits":9,"additions":534,"deletions":0,"changed_files":10}}
{"actor":{"display_login":"apparentlymart"}}