{"action":"created","issue":{"url":"https://api.github.com/repos/dtan4/terraforming/issues/55","labels_url":"https://api.github.com/repos/dtan4/terraforming/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/dtan4/terraforming/issues/55/comments","events_url":"https://api.github.com/repos/dtan4/terraforming/issues/55/events","html_url":"https://github.com/dtan4/terraforming/issues/55","id":82207493,"number":55,"title":"When generating tfstate, modules should contain a list of hashes, not a hash","user":{"login":"endemics","id":174683,"avatar_url":"https://avatars.githubusercontent.com/u/174683?v=3","gravatar_id":"","url":"https://api.github.com/users/endemics","html_url":"https://github.com/endemics","followers_url":"https://api.github.com/users/endemics/followers","following_url":"https://api.github.com/users/endemics/following{/other_user}","gists_url":"https://api.github.com/users/endemics/gists{/gist_id}","starred_url":"https://api.github.com/users/endemics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endemics/subscriptions","organizations_url":"https://api.github.com/users/endemics/orgs","repos_url":"https://api.github.com/users/endemics/repos","events_url":"https://api.github.com/users/endemics/events{/privacy}","received_events_url":"https://api.github.com/users/endemics/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-29T01:41:36Z","updated_at":"2015-05-29T05:12:27Z","closed_at":"2015-05-29T05:06:10Z","body":"While trying to do a `terraform plan` on a generated tfstate for security groups, terraform exited with:\r\n```\r\nError reading local state: Decoding state file failed: json: cannot unmarshal object into Go value of type []*terraform.ModuleState\r\n```\r\n(terraform 0.5.2)\r\n\r\nIn terraform/state.go:42, we have indeed:\r\n```go\r\n    Modules []*ModuleState `json:\"modules\"`\r\n```\r\n\r\nSo `generate_tfstate` should have `\"modules\" => [ ... ]` instead of `\"modules\" => { ... }`\r\n"},"comment":{"url":"https://api.github.com/repos/dtan4/terraforming/issues/comments/106691232","html_url":"https://github.com/dtan4/terraforming/issues/55#issuecomment-106691232","issue_url":"https://api.github.com/repos/dtan4/terraforming/issues/55","id":106691232,"user":{"login":"dtan4","id":680124,"avatar_url":"https://avatars.githubusercontent.com/u/680124?v=3","gravatar_id":"","url":"https://api.github.com/users/dtan4","html_url":"https://github.com/dtan4","followers_url":"https://api.github.com/users/dtan4/followers","following_url":"https://api.github.com/users/dtan4/following{/other_user}","gists_url":"https://api.github.com/users/dtan4/gists{/gist_id}","starred_url":"https://api.github.com/users/dtan4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtan4/subscriptions","organizations_url":"https://api.github.com/users/dtan4/orgs","repos_url":"https://api.github.com/users/dtan4/repos","events_url":"https://api.github.com/users/dtan4/events{/privacy}","received_events_url":"https://api.github.com/users/dtan4/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T05:12:27Z","updated_at":"2015-05-29T05:12:27Z","body":"@endemics Thank you for reporting this issue :exclamation: \r\nDespite this is a very basic bug, I've never noticed this...\r\n\r\n(In fact I haven't use the entire generated tfstate with my usual work...)"}}