{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/7238","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/7238/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/7238/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/7238/events","html_url":"https://github.com/hashicorp/terraform/issues/7238","id":161201488,"number":7238,"title":"terraform init blanks files","user":{"login":"agonzalezro","id":205176,"avatar_url":"https://avatars.githubusercontent.com/u/205176?v=3","gravatar_id":"","url":"https://api.github.com/users/agonzalezro","html_url":"https://github.com/agonzalezro","followers_url":"https://api.github.com/users/agonzalezro/followers","following_url":"https://api.github.com/users/agonzalezro/following{/other_user}","gists_url":"https://api.github.com/users/agonzalezro/gists{/gist_id}","starred_url":"https://api.github.com/users/agonzalezro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agonzalezro/subscriptions","organizations_url":"https://api.github.com/users/agonzalezro/orgs","repos_url":"https://api.github.com/users/agonzalezro/repos","events_url":"https://api.github.com/users/agonzalezro/events{/privacy}","received_events_url":"https://api.github.com/users/agonzalezro/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hashicorp/terraform/labels/bug","name":"bug","color":"f7c6c7"},{"url":"https://api.github.com/repos/hashicorp/terraform/labels/core","name":"core","color":"cccccc"},{"url":"https://api.github.com/repos/hashicorp/terraform/labels/release-0.7","name":"release-0.7","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-20T13:59:22Z","updated_at":"2016-06-21T08:27:46Z","closed_at":null,"body":"### Terraform Version\r\n\r\n    Terraform v0.7.0-dev (fe540b408f590ee2e410537672160598e300d056)\r\n\r\n### Affected Resource(s)\r\n\r\n- local files\r\n\r\n### Expected Behavior\r\n\r\nFrom `terraform init` documentation:\r\n\r\n> Init will download the module from SOURCE and copy it into the DIR (which defaults to the current working directory). Version control information from the module (such as Git history) will not be copied.\r\n\r\n> The directory being initialized must be empty of all Terraform configurations. If the module has other files which conflict with what is already in the directory, they will be overwritten.\r\n\r\n### Actual Behavior\r\n\r\nIf you check the second paragraph that I mentioned earlier it shouldn't blank any file that doesn't conflict. Or at least this is what I understand from reading it.\r\n\r\n### Steps to Reproduce\r\n\r\n```\r\n$ mkdir tf\r\n\r\n$ echo \"alex was here\" > tf/1\r\n\r\n$ ls -l tf\r\ntotal 8\r\n-rw-r--r--  1 alex  wheel  14 20 Jun 15:57 1\r\n\r\n$ terraform init tf\r\n\r\n$ ls -l tf\r\ntotal 8\r\n-rw-r--r--  1 alex  wheel  14 20 Jun 15:57 1\r\n\r\n$ cd tf\r\n\r\n$ terraform init .\r\n\r\n$ ls -l\r\ntotal 0\r\n-rw-r--r--  1 alex  wheel  0 20 Jun 15:57 1\r\n```\r\n\r\nIf I run the `init` from outside the folder it doesn't blank the files."},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/227374024","html_url":"https://github.com/hashicorp/terraform/issues/7238#issuecomment-227374024","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/7238","id":227374024,"user":{"login":"jen20","id":548524,"avatar_url":"https://avatars.githubusercontent.com/u/548524?v=3","gravatar_id":"","url":"https://api.github.com/users/jen20","html_url":"https://github.com/jen20","followers_url":"https://api.github.com/users/jen20/followers","following_url":"https://api.github.com/users/jen20/following{/other_user}","gists_url":"https://api.github.com/users/jen20/gists{/gist_id}","starred_url":"https://api.github.com/users/jen20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jen20/subscriptions","organizations_url":"https://api.github.com/users/jen20/orgs","repos_url":"https://api.github.com/users/jen20/repos","events_url":"https://api.github.com/users/jen20/events{/privacy}","received_events_url":"https://api.github.com/users/jen20/received_events","type":"User","site_admin":false},"created_at":"2016-06-21T08:27:46Z","updated_at":"2016-06-21T08:27:46Z","body":"Hi @agonzalezro! This sounds like a nasty bug or mismatched documentation. I'll need to look into how this is implemented, but I would tend to agree that the quoted paragraph implies that files which are not in conflict should remain untouched."}}
{"actor":{"display_login":"jen20"}}