{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/16449","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/16449/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/16449/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/16449/events","html_url":"https://github.com/hashicorp/terraform/issues/16449","id":268406816,"node_id":"MDU6SXNzdWUyNjg0MDY4MTY=","number":16449,"title":"Failed to output path.root in \"terraform console\"","user":{"login":"eilgin","id":1125661,"node_id":"MDQ6VXNlcjExMjU2NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/1125661?v=4","gravatar_id":"","url":"https://api.github.com/users/eilgin","html_url":"https://github.com/eilgin","followers_url":"https://api.github.com/users/eilgin/followers","following_url":"https://api.github.com/users/eilgin/following{/other_user}","gists_url":"https://api.github.com/users/eilgin/gists{/gist_id}","starred_url":"https://api.github.com/users/eilgin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eilgin/subscriptions","organizations_url":"https://api.github.com/users/eilgin/orgs","repos_url":"https://api.github.com/users/eilgin/repos","events_url":"https://api.github.com/users/eilgin/events{/privacy}","received_events_url":"https://api.github.com/users/eilgin/received_events","type":"User","site_admin":false},"labels":[{"id":85946957,"node_id":"MDU6TGFiZWw4NTk0Njk1Nw==","url":"https://api.github.com/repos/hashicorp/terraform/labels/bug","name":"bug","color":"f7c6c7","default":true},{"id":587361671,"node_id":"MDU6TGFiZWw1ODczNjE2NzE=","url":"https://api.github.com/repos/hashicorp/terraform/labels/cli","name":"cli","color":"006b75","default":false},{"id":608979767,"node_id":"MDU6TGFiZWw2MDg5Nzk3Njc=","url":"https://api.github.com/repos/hashicorp/terraform/labels/config","name":"config","color":"0e8a16","default":false},{"id":157909373,"node_id":"MDU6TGFiZWwxNTc5MDkzNzM=","url":"https://api.github.com/repos/hashicorp/terraform/labels/crash","name":"crash","color":"e11d21","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-10-25T13:53:45Z","updated_at":"2018-10-30T00:19:37Z","closed_at":"2018-10-30T00:19:37Z","author_association":"NONE","body":"### Terraform Version\r\n_Using MacOS sierra 10.12.6._\r\n\r\nUsed version:\r\n```\r\n$ terraform --version\r\nTerraform v0.10.7\r\n```\r\n\r\n### Crash Output\r\nhttps://gist.github.com/eilgin/9110fc9755e0f2719d99c1c40ad76409\r\n\r\n### Expected Behavior\r\nI expect the console to return the value of `path.{cwd,root}`.\r\n\r\n### Actual Behavior\r\nIt crashes for `path.root` but **not** for `path.cwd`:\r\n```\r\n> path.cwd\r\n/Users/foo/bar\r\n> path.root\r\npanic: runtime error: invalid memory address or nil pointer dereference\r\n...\r\n```\r\n\r\n### Steps to Reproduce\r\nPlease list the full steps required to reproduce the issue, for example:\r\n1. `terraform console`\r\n2. `path.root`\r\n\r\n### Important Factoids\r\nø\r\n\r\n### References\r\nI didn't find anything relevant with the following filters: `is:issue is:open console path root`"},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/434127632","html_url":"https://github.com/hashicorp/terraform/issues/16449#issuecomment-434127632","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/16449","id":434127632,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDEyNzYzMg==","user":{"login":"apparentlymart","id":20180,"node_id":"MDQ6VXNlcjIwMTgw","avatar_url":"https://avatars1.githubusercontent.com/u/20180?v=4","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},"created_at":"2018-10-30T00:19:37Z","updated_at":"2018-10-30T00:19:37Z","author_association":"CONTRIBUTOR","body":"Hi again @eilgin!\r\n\r\nI'm pleased to report that this does indeed seem to be fixed in v0.12.0-alpha1, and so will be fixed in the forthcoming v0.12.0 final release:\r\n\r\n```\r\n> path.root\r\n/home/apparentlymart/test\r\n> path.cwd\r\n/home/apparentlymart/test\r\n> path.module\r\n/home/apparentlymart/test\r\n```\r\n\r\n`terraform console` now begins by performing the same preparation steps that are done during other commands like `terraform plan`, which means that all of the usual named objects should be available exactly as they would be in configuration files in the root module.\r\n\r\nSince this is now fixed in the master branch, I'm going to close this out. Thanks again for reporting this, and sorry for the delay in addressing it.\r\n"}}
{"actor":{"display_login":"apparentlymart"}}