{"action":"opened","number":24,"pull_request":{"url":"https://api.github.com/repos/adammck/terraform-inventory/pulls/24","id":54513152,"html_url":"https://github.com/adammck/terraform-inventory/pull/24","diff_url":"https://github.com/adammck/terraform-inventory/pull/24.diff","patch_url":"https://github.com/adammck/terraform-inventory/pull/24.patch","issue_url":"https://api.github.com/repos/adammck/terraform-inventory/issues/24","number":24,"state":"open","locked":false,"title":"Added GCE support","user":{"login":"ldejager","id":6338147,"avatar_url":"https://avatars.githubusercontent.com/u/6338147?v=3","gravatar_id":"","url":"https://api.github.com/users/ldejager","html_url":"https://github.com/ldejager","followers_url":"https://api.github.com/users/ldejager/followers","following_url":"https://api.github.com/users/ldejager/following{/other_user}","gists_url":"https://api.github.com/users/ldejager/gists{/gist_id}","starred_url":"https://api.github.com/users/ldejager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldejager/subscriptions","organizations_url":"https://api.github.com/users/ldejager/orgs","repos_url":"https://api.github.com/users/ldejager/repos","events_url":"https://api.github.com/users/ldejager/events{/privacy}","received_events_url":"https://api.github.com/users/ldejager/received_events","type":"User","site_admin":false},"body":"Added GCE support based on the terraform state file example below.\r\n\r\n```\r\n{\r\n    \"version\": 1,\r\n    \"serial\": 1,\r\n    \"modules\": [\r\n        {\r\n            \"path\": [\r\n                \"root\"\r\n            ],\r\n            \"outputs\": {},\r\n            \"resources\": {}\r\n        },\r\n        {\r\n            \"path\": [\r\n                \"root\",\r\n                \"gce-dc\"\r\n            ],\r\n            \"outputs\": {\r\n                \"dbhost_ips\": \"1.1.1.1\"\r\n            },\r\n            \"resources\": {\r\n                \"google_compute_disk.dbcluster-lvm\": {\r\n                    \"type\": \"google_compute_disk\",\r\n                    \"primary\": {\r\n                        \"id\": \"db-lvm-01\",\r\n                        \"attributes\": {\r\n                            \"id\": \"db-lvm-01\",\r\n                            \"name\": \"db-lvm-01\",\r\n                            \"self_link\": \"https://www.googleapis.com/compute/v1/projects\",\r\n                            \"size\": \"20\",\r\n                            \"type\": \"pd-ssd\",\r\n                            \"zone\": \"europe-west1-b\"\r\n                        }\r\n                    }\r\n                },\r\n                \"google_compute_firewall.db-firewall-ext\": {\r\n                    \"type\": \"google_compute_firewall\",\r\n                    \"depends_on\": [\r\n                        \"google_compute_network.db-network\"\r\n                    ],\r\n                    \"primary\": {\r\n                        \"id\": \"db-firewall-ext\",\r\n                        \"attributes\": {\r\n                            \"allow.#\": \"2\",\r\n                            \"allow.1367131964.ports.#\": \"0\",\r\n                            \"allow.1367131964.protocol\": \"icmp\",\r\n                            \"allow.803338340.ports.#\": \"1\",\r\n                            \"allow.803338340.ports.1685985038\": \"22\",\r\n                            \"allow.803338340.protocol\": \"tcp\",\r\n                            \"id\": \"db-firewall-ext\",\r\n                            \"name\": \"db-firewall-ext\",\r\n                            \"network\": \"dbcluster\",\r\n                            \"self_link\": \"https://www.googleapis.com/compute/v1/projects\",\r\n                            \"source_ranges.#\": \"1\",\r\n                            \"source_ranges.1080289494\": \"0.0.0.0/0\"\r\n                        }\r\n                    }\r\n                },\r\n                \"google_compute_firewall.db-firewall-int\": {\r\n                    \"type\": \"google_compute_firewall\",\r\n                    \"depends_on\": [\r\n                        \"google_compute_network.db-network\",\r\n                        \"google_compute_network.db-network\"\r\n                    ],\r\n                    \"primary\": {\r\n                        \"id\": \"db-firewall-int\",\r\n                        \"attributes\": {\r\n                            \"allow.#\": \"2\",\r\n                            \"allow.1249999313.ports.#\": \"1\",\r\n                            \"allow.1249999313.ports.1101440173\": \"1-65535\",\r\n                            \"allow.1249999313.protocol\": \"tcp\",\r\n                            \"allow.4162789437.ports.#\": \"1\",\r\n                            \"allow.4162789437.ports.1101440173\": \"1-65535\",\r\n                            \"allow.4162789437.protocol\": \"udp\",\r\n                            \"id\": \"db-firewall-int\",\r\n                            \"name\": \"db-firewall-int\",\r\n                            \"network\": \"dbcluster\",\r\n                            \"self_link\": \"https://www.googleapis.com/compute/v1/projects\",\r\n                            \"source_ranges.#\": \"1\",\r\n                            \"source_ranges.179966490\": \"10.0.0.0/16\"\r\n                        }\r\n                    }\r\n                },\r\n                \"google_compute_instance.dbcluster-nodes\": {\r\n                    \"type\": \"google_compute_instance\",\r\n                    \"depends_on\": [\r\n                        \"google_compute_disk.dbcluster-lvm\",\r\n                        \"google_compute_network.db-network\"\r\n                    ],\r\n                    \"primary\": {\r\n                        \"id\": \"db-01\",\r\n                        \"attributes\": {\r\n                            \"can_ip_forward\": \"false\",\r\n                            \"description\": \"dbcluster node #01\",\r\n                            \"disk.#\": \"2\",\r\n                            \"disk.0.auto_delete\": \"true\",\r\n                            \"disk.0.device_name\": \"\",\r\n                            \"disk.0.disk\": \"\",\r\n                            \"disk.0.image\": \"centos-7-v20150526\",\r\n                            \"disk.0.scratch\": \"false\",\r\n                            \"disk.0.size\": \"20\",\r\n                            \"disk.0.type\": \"\",\r\n                            \"disk.1.auto_delete\": \"false\",\r\n                            \"disk.1.device_name\": \"lvm\",\r\n                            \"disk.1.disk\": \"db-lvm-01\",\r\n                            \"disk.1.image\": \"\",\r\n                            \"disk.1.scratch\": \"false\",\r\n                            \"disk.1.size\": \"0\",\r\n                            \"disk.1.type\": \"\",\r\n                            \"id\": \"db-01\",\r\n                            \"machine_type\": \"n1-standard-1\",\r\n                            \"metadata.#\": \"4\",\r\n                            \"metadata.dc\": \"gce-dc\",\r\n                            \"metadata.role\": \"dbhost\",\r\n                            \"metadata.sshKeys\": \"...\",\r\n                            \"metadata.ssh_user\": \"centos\",\r\n                            \"metadata_fingerprint\": \"...\",\r\n                            \"name\": \"db-01\",\r\n                            \"network.#\": \"0\",\r\n                            \"network_interface.#\": \"1\",\r\n                            \"network_interface.0.access_config.#\": \"1\",\r\n                            \"network_interface.0.access_config.0.nat_ip\": \"1.1.1.1\",\r\n                            \"network_interface.0.address\": \"10.0.0.2\",\r\n                            \"network_interface.0.name\": \"nic0\",\r\n                            \"network_interface.0.network\": \"dbcluster\",\r\n                            \"self_link\": \"https://www.googleapis.com/compute/v1/projects\",\r\n                            \"service_account.#\": \"0\",\r\n                            \"tags.#\": \"2\",\r\n                            \"tags.232903978\": \"dbcluster\",\r\n                            \"tags.3824466984\": \"db\",\r\n                            \"tags_fingerprint\": \"...\",\r\n                            \"zone\": \"europe-west1-b\"\r\n                        },\r\n                        \"meta\": {\r\n                            \"schema_version\": \"2\"\r\n                        }\r\n                    }\r\n                },\r\n                \"google_compute_network.db-network\": {\r\n                    \"type\": \"google_compute_network\",\r\n                    \"primary\": {\r\n                        \"id\": \"dbcluster\",\r\n                        \"attributes\": {\r\n                            \"gateway_ipv4\": \"10.0.0.1\",\r\n                            \"id\": \"dbcluster\",\r\n                            \"ipv4_range\": \"10.0.0.0/16\",\r\n                            \"name\": \"dbcluster\",\r\n                            \"self_link\": \"https://www.googleapis.com/compute/v1/projects\"\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    ]\r\n}\r\n\r\n```\r\n\r\nExample:\r\n```\r\n$ ./terraform-inventory --list\r\n{\"dbcluster-nodes\":[\"1.1.1.1\"]}\r\n```","created_at":"2015-12-23T22:45:26Z","updated_at":"2015-12-23T22:45:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/adammck/terraform-inventory/pulls/24/commits","review_comments_url":"https://api.github.com/repos/adammck/terraform-inventory/pulls/24/comments","review_comment_url":"https://api.github.com/repos/adammck/terraform-inventory/pulls/comments{/number}","comments_url":"https://api.github.com/repos/adammck/terraform-inventory/issues/24/comments","statuses_url":"https://api.github.com/repos/adammck/terraform-inventory/statuses/c4d37751eb58e7f19861361fa1998ffdfcb70133","head":{"label":"ldejager:feature/gce_support","ref":"feature/gce_support","sha":"c4d37751eb58e7f19861361fa1998ffdfcb70133","user":{"login":"ldejager","id":6338147,"avatar_url":"https://avatars.githubusercontent.com/u/6338147?v=3","gravatar_id":"","url":"https://api.github.com/users/ldejager","html_url":"https://github.com/ldejager","followers_url":"https://api.github.com/users/ldejager/followers","following_url":"https://api.github.com/users/ldejager/following{/other_user}","gists_url":"https://api.github.com/users/ldejager/gists{/gist_id}","starred_url":"https://api.github.com/users/ldejager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldejager/subscriptions","organizations_url":"https://api.github.com/users/ldejager/orgs","repos_url":"https://api.github.com/users/ldejager/repos","events_url":"https://api.github.com/users/ldejager/events{/privacy}","received_events_url":"https://api.github.com/users/ldejager/received_events","type":"User","site_admin":false},"repo":{"id":48513694,"name":"terraform-inventory","full_name":"ldejager/terraform-inventory","owner":{"login":"ldejager","id":6338147,"avatar_url":"https://avatars.githubusercontent.com/u/6338147?v=3","gravatar_id":"","url":"https://api.github.com/users/ldejager","html_url":"https://github.com/ldejager","followers_url":"https://api.github.com/users/ldejager/followers","following_url":"https://api.github.com/users/ldejager/following{/other_user}","gists_url":"https://api.github.com/users/ldejager/gists{/gist_id}","starred_url":"https://api.github.com/users/ldejager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldejager/subscriptions","organizations_url":"https://api.github.com/users/ldejager/orgs","repos_url":"https://api.github.com/users/ldejager/repos","events_url":"https://api.github.com/users/ldejager/events{/privacy}","received_events_url":"https://api.github.com/users/ldejager/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ldejager/terraform-inventory","description":"Terraform State → Ansible Dynamic Inventory","fork":true,"url":"https://api.github.com/repos/ldejager/terraform-inventory","forks_url":"https://api.github.com/repos/ldejager/terraform-inventory/forks","keys_url":"https://api.github.com/repos/ldejager/terraform-inventory/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ldejager/terraform-inventory/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ldejager/terraform-inventory/teams","hooks_url":"https://api.github.com/repos/ldejager/terraform-inventory/hooks","issue_events_url":"https://api.github.com/repos/ldejager/terraform-inventory/issues/events{/number}","events_url":"https://api.github.com/repos/ldejager/terraform-inventory/events","assignees_url":"https://api.github.com/repos/ldejager/terraform-inventory/assignees{/user}","branches_url":"https://api.github.com/repos/ldejager/terraform-inventory/branches{/branch}","tags_url":"https://api.github.com/repos/ldejager/terraform-inventory/tags","blobs_url":"https://api.github.com/repos/ldejager/terraform-inventory/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ldejager/terraform-inventory/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ldejager/terraform-inventory/git/refs{/sha}","trees_url":"https://api.github.com/repos/ldejager/terraform-inventory/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ldejager/terraform-inventory/statuses/{sha}","languages_url":"https://api.github.com/repos/ldejager/terraform-inventory/languages","stargazers_url":"https://api.github.com/repos/ldejager/terraform-inventory/stargazers","contributors_url":"https://api.github.com/repos/ldejager/terraform-inventory/contributors","subscribers_url":"https://api.github.com/repos/ldejager/terraform-inventory/subscribers","subscription_url":"https://api.github.com/repos/ldejager/terraform-inventory/subscription","commits_url":"https://api.github.com/repos/ldejager/terraform-inventory/commits{/sha}","git_commits_url":"https://api.github.com/repos/ldejager/terraform-inventory/git/commits{/sha}","comments_url":"https://api.github.com/repos/ldejager/terraform-inventory/comments{/number}","issue_comment_url":"https://api.github.com/repos/ldejager/terraform-inventory/issues/comments{/number}","contents_url":"https://api.github.com/repos/ldejager/terraform-inventory/contents/{+path}","compare_url":"https://api.github.com/repos/ldejager/terraform-inventory/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ldejager/terraform-inventory/merges","archive_url":"https://api.github.com/repos/ldejager/terraform-inventory/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ldejager/terraform-inventory/downloads","issues_url":"https://api.github.com/repos/ldejager/terraform-inventory/issues{/number}","pulls_url":"https://api.github.com/repos/ldejager/terraform-inventory/pulls{/number}","milestones_url":"https://api.github.com/repos/ldejager/terraform-inventory/milestones{/number}","notifications_url":"https://api.github.com/repos/ldejager/terraform-inventory/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ldejager/terraform-inventory/labels{/name}","releases_url":"https://api.github.com/repos/ldejager/terraform-inventory/releases{/id}","created_at":"2015-12-23T22:28:45Z","updated_at":"2015-12-23T22:28:45Z","pushed_at":"2015-12-23T22:39:00Z","git_url":"git://github.com/ldejager/terraform-inventory.git","ssh_url":"git@github.com:ldejager/terraform-inventory.git","clone_url":"https://github.com/ldejager/terraform-inventory.git","svn_url":"https://github.com/ldejager/terraform-inventory","homepage":"","size":45,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"adammck:master","ref":"master","sha":"1a3b5c180c9dc5c349a487d67b1eb7d0f861c939","user":{"login":"adammck","id":19543,"avatar_url":"https://avatars.githubusercontent.com/u/19543?v=3","gravatar_id":"","url":"https://api.github.com/users/adammck","html_url":"https://github.com/adammck","followers_url":"https://api.github.com/users/adammck/followers","following_url":"https://api.github.com/users/adammck/following{/other_user}","gists_url":"https://api.github.com/users/adammck/gists{/gist_id}","starred_url":"https://api.github.com/users/adammck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adammck/subscriptions","organizations_url":"https://api.github.com/users/adammck/orgs","repos_url":"https://api.github.com/users/adammck/repos","events_url":"https://api.github.com/users/adammck/events{/privacy}","received_events_url":"https://api.github.com/users/adammck/received_events","type":"User","site_admin":false},"repo":{"id":24246220,"name":"terraform-inventory","full_name":"adammck/terraform-inventory","owner":{"login":"adammck","id":19543,"avatar_url":"https://avatars.githubusercontent.com/u/19543?v=3","gravatar_id":"","url":"https://api.github.com/users/adammck","html_url":"https://github.com/adammck","followers_url":"https://api.github.com/users/adammck/followers","following_url":"https://api.github.com/users/adammck/following{/other_user}","gists_url":"https://api.github.com/users/adammck/gists{/gist_id}","starred_url":"https://api.github.com/users/adammck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adammck/subscriptions","organizations_url":"https://api.github.com/users/adammck/orgs","repos_url":"https://api.github.com/users/adammck/repos","events_url":"https://api.github.com/users/adammck/events{/privacy}","received_events_url":"https://api.github.com/users/adammck/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adammck/terraform-inventory","description":"Terraform State → Ansible Dynamic Inventory","fork":false,"url":"https://api.github.com/repos/adammck/terraform-inventory","forks_url":"https://api.github.com/repos/adammck/terraform-inventory/forks","keys_url":"https://api.github.com/repos/adammck/terraform-inventory/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adammck/terraform-inventory/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adammck/terraform-inventory/teams","hooks_url":"https://api.github.com/repos/adammck/terraform-inventory/hooks","issue_events_url":"https://api.github.com/repos/adammck/terraform-inventory/issues/events{/number}","events_url":"https://api.github.com/repos/adammck/terraform-inventory/events","assignees_url":"https://api.github.com/repos/adammck/terraform-inventory/assignees{/user}","branches_url":"https://api.github.com/repos/adammck/terraform-inventory/branches{/branch}","tags_url":"https://api.github.com/repos/adammck/terraform-inventory/tags","blobs_url":"https://api.github.com/repos/adammck/terraform-inventory/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adammck/terraform-inventory/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adammck/terraform-inventory/git/refs{/sha}","trees_url":"https://api.github.com/repos/adammck/terraform-inventory/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adammck/terraform-inventory/statuses/{sha}","languages_url":"https://api.github.com/repos/adammck/terraform-inventory/languages","stargazers_url":"https://api.github.com/repos/adammck/terraform-inventory/stargazers","contributors_url":"https://api.github.com/repos/adammck/terraform-inventory/contributors","subscribers_url":"https://api.github.com/repos/adammck/terraform-inventory/subscribers","subscription_url":"https://api.github.com/repos/adammck/terraform-inventory/subscription","commits_url":"https://api.github.com/repos/adammck/terraform-inventory/commits{/sha}","git_commits_url":"https://api.github.com/repos/adammck/terraform-inventory/git/commits{/sha}","comments_url":"https://api.github.com/repos/adammck/terraform-inventory/comments{/number}","issue_comment_url":"https://api.github.com/repos/adammck/terraform-inventory/issues/comments{/number}","contents_url":"https://api.github.com/repos/adammck/terraform-inventory/contents/{+path}","compare_url":"https://api.github.com/repos/adammck/terraform-inventory/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adammck/terraform-inventory/merges","archive_url":"https://api.github.com/repos/adammck/terraform-inventory/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adammck/terraform-inventory/downloads","issues_url":"https://api.github.com/repos/adammck/terraform-inventory/issues{/number}","pulls_url":"https://api.github.com/repos/adammck/terraform-inventory/pulls{/number}","milestones_url":"https://api.github.com/repos/adammck/terraform-inventory/milestones{/number}","notifications_url":"https://api.github.com/repos/adammck/terraform-inventory/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adammck/terraform-inventory/labels{/name}","releases_url":"https://api.github.com/repos/adammck/terraform-inventory/releases{/id}","created_at":"2014-09-19T21:34:58Z","updated_at":"2015-12-21T19:06:45Z","pushed_at":"2015-12-15T05:14:27Z","git_url":"git://github.com/adammck/terraform-inventory.git","ssh_url":"git@github.com:adammck/terraform-inventory.git","clone_url":"https://github.com/adammck/terraform-inventory.git","svn_url":"https://github.com/adammck/terraform-inventory","homepage":"","size":50,"stargazers_count":167,"watchers_count":167,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":4,"forks":19,"open_issues":4,"watchers":167,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/adammck/terraform-inventory/pulls/24"},"html":{"href":"https://github.com/adammck/terraform-inventory/pull/24"},"issue":{"href":"https://api.github.com/repos/adammck/terraform-inventory/issues/24"},"comments":{"href":"https://api.github.com/repos/adammck/terraform-inventory/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/adammck/terraform-inventory/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/adammck/terraform-inventory/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/adammck/terraform-inventory/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/adammck/terraform-inventory/statuses/c4d37751eb58e7f19861361fa1998ffdfcb70133"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":0,"changed_files":1}}