{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/2022","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/2022/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/2022/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/2022/events","html_url":"https://github.com/hashicorp/terraform/pull/2022","id":78547308,"number":2022,"title":"Discussion Only: Terraform Import","user":{"login":"johnrengelman","id":1012772,"avatar_url":"https://avatars.githubusercontent.com/u/1012772?v=3","gravatar_id":"","url":"https://api.github.com/users/johnrengelman","html_url":"https://github.com/johnrengelman","followers_url":"https://api.github.com/users/johnrengelman/followers","following_url":"https://api.github.com/users/johnrengelman/following{/other_user}","gists_url":"https://api.github.com/users/johnrengelman/gists{/gist_id}","starred_url":"https://api.github.com/users/johnrengelman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnrengelman/subscriptions","organizations_url":"https://api.github.com/users/johnrengelman/orgs","repos_url":"https://api.github.com/users/johnrengelman/repos","events_url":"https://api.github.com/users/johnrengelman/events{/privacy}","received_events_url":"https://api.github.com/users/johnrengelman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-20T14:27:12Z","updated_at":"2015-05-20T14:53:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hashicorp/terraform/pulls/2022","html_url":"https://github.com/hashicorp/terraform/pull/2022","diff_url":"https://github.com/hashicorp/terraform/pull/2022.diff","patch_url":"https://github.com/hashicorp/terraform/pull/2022.patch"},"body":"This is a simple POC for discussion purposes only. It is missing automated tests and none of the command switches have been tested."},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/103916393","html_url":"https://github.com/hashicorp/terraform/pull/2022#issuecomment-103916393","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/2022","id":103916393,"user":{"login":"johnrengelman","id":1012772,"avatar_url":"https://avatars.githubusercontent.com/u/1012772?v=3","gravatar_id":"","url":"https://api.github.com/users/johnrengelman","html_url":"https://github.com/johnrengelman","followers_url":"https://api.github.com/users/johnrengelman/followers","following_url":"https://api.github.com/users/johnrengelman/following{/other_user}","gists_url":"https://api.github.com/users/johnrengelman/gists{/gist_id}","starred_url":"https://api.github.com/users/johnrengelman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnrengelman/subscriptions","organizations_url":"https://api.github.com/users/johnrengelman/orgs","repos_url":"https://api.github.com/users/johnrengelman/repos","events_url":"https://api.github.com/users/johnrengelman/events{/privacy}","received_events_url":"https://api.github.com/users/johnrengelman/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T14:53:50Z","updated_at":"2015-05-20T14:53:50Z","body":"This seems to work for the most part. I have noticed that some resources don't set all attributes during a `read`, so even after importing there are usually differences in the plan.\r\n\r\nSo to handle that, we could do the following:\r\n* Live with it and fix the various resources that are dropping the ball as they are reported.\r\n* Add an additional `import-attribute` command that directly sets an attribute to the supplied value for a resource\r\n* Somehow tie into the Resource schema and ensure that any \"default\" values exist in the state file during a 'refresh'.\r\n\r\nAlso, right now this command requires a `terraform refresh` after running `terraform import` to actually populate the state file. We should integrate this so the `import` executes a `refresh` on the resource immediately after importing."}}