{"action":"created","issue":{"url":"https://api.github.com/repos/gruntwork-io/terragrunt/issues/540","repository_url":"https://api.github.com/repos/gruntwork-io/terragrunt","labels_url":"https://api.github.com/repos/gruntwork-io/terragrunt/issues/540/labels{/name}","comments_url":"https://api.github.com/repos/gruntwork-io/terragrunt/issues/540/comments","events_url":"https://api.github.com/repos/gruntwork-io/terragrunt/issues/540/events","html_url":"https://github.com/gruntwork-io/terragrunt/pull/540","id":349813804,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3ODIxOTc3","number":540,"title":"Adds options attribute to track state of the terraform command","user":{"login":"lorengordon","id":8457307,"node_id":"MDQ6VXNlcjg0NTczMDc=","avatar_url":"https://avatars3.githubusercontent.com/u/8457307?v=4","gravatar_id":"","url":"https://api.github.com/users/lorengordon","html_url":"https://github.com/lorengordon","followers_url":"https://api.github.com/users/lorengordon/followers","following_url":"https://api.github.com/users/lorengordon/following{/other_user}","gists_url":"https://api.github.com/users/lorengordon/gists{/gist_id}","starred_url":"https://api.github.com/users/lorengordon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorengordon/subscriptions","organizations_url":"https://api.github.com/users/lorengordon/orgs","repos_url":"https://api.github.com/users/lorengordon/repos","events_url":"https://api.github.com/users/lorengordon/events{/privacy}","received_events_url":"https://api.github.com/users/lorengordon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-08-12T13:44:04Z","updated_at":"2018-08-13T15:07:43Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/gruntwork-io/terragrunt/pulls/540","html_url":"https://github.com/gruntwork-io/terragrunt/pull/540","diff_url":"https://github.com/gruntwork-io/terragrunt/pull/540.diff","patch_url":"https://github.com/gruntwork-io/terragrunt/pull/540.patch"},"body":"The \"init\" hook command was previously overloaded, and would execute\r\nhooks twice. Once when retrieving source using -from-module, and once\r\nto configure the backend, modules, and plugins.\r\n\r\nThe new options attribute, `TerraformCommand`, is first set to the\r\nterraform command when the `TerragruntOptions` are parsed from the\r\nCLI arguments.\r\n\r\nThe `TerraformCommand` attribute is updated when `runTerraformInit`\r\ndetermines that it needs to retrieve the source using `-from-module`.\r\n\r\nFinally, the `TerraformCommand` is now used to determine whether a\r\nhook should execute.\r\n\r\nThere are now two \"init\" commands that execute hooks:\r\n\r\n* `init-from-module`: executes when the source is retrieved\r\n* `init`: executes for any other init invocation, to configure\r\nthe backend, modules, and plugins\r\n\r\nFixes #539"},"comment":{"url":"https://api.github.com/repos/gruntwork-io/terragrunt/issues/comments/412551600","html_url":"https://github.com/gruntwork-io/terragrunt/pull/540#issuecomment-412551600","issue_url":"https://api.github.com/repos/gruntwork-io/terragrunt/issues/540","id":412551600,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjU1MTYwMA==","user":{"login":"brikis98","id":711908,"node_id":"MDQ6VXNlcjcxMTkwOA==","avatar_url":"https://avatars1.githubusercontent.com/u/711908?v=4","gravatar_id":"","url":"https://api.github.com/users/brikis98","html_url":"https://github.com/brikis98","followers_url":"https://api.github.com/users/brikis98/followers","following_url":"https://api.github.com/users/brikis98/following{/other_user}","gists_url":"https://api.github.com/users/brikis98/gists{/gist_id}","starred_url":"https://api.github.com/users/brikis98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brikis98/subscriptions","organizations_url":"https://api.github.com/users/brikis98/orgs","repos_url":"https://api.github.com/users/brikis98/repos","events_url":"https://api.github.com/users/brikis98/events{/privacy}","received_events_url":"https://api.github.com/users/brikis98/received_events","type":"User","site_admin":false},"created_at":"2018-08-13T15:07:43Z","updated_at":"2018-08-13T15:07:43Z","author_association":"CONTRIBUTOR","body":"> I think the best approach to better align with how terragrunt works will actually be to rework this so that instead of an init-from-module command, we implement an init-backend command...\r\n> This way, the command remains as init throughout, and where the backend is configured it would be set to init-backend.\r\n\r\nNot sure I follow. The `init-from-module` and `init` workflow made sense to me. What is the distinction with `init` and `init-backend`? "}}
{"actor":{"display_login":"brikis98"}}