{"action":"created","issue":{"url":"https://api.github.com/repos/gruntwork-io/terragrunt/issues/476","repository_url":"https://api.github.com/repos/gruntwork-io/terragrunt","labels_url":"https://api.github.com/repos/gruntwork-io/terragrunt/issues/476/labels{/name}","comments_url":"https://api.github.com/repos/gruntwork-io/terragrunt/issues/476/comments","events_url":"https://api.github.com/repos/gruntwork-io/terragrunt/issues/476/events","html_url":"https://github.com/gruntwork-io/terragrunt/issues/476","id":321599976,"number":476,"title":"Terragrunt checks for S3 bucket before Token expiration","user":{"login":"ddriddle","id":10728345,"avatar_url":"https://avatars2.githubusercontent.com/u/10728345?v=4","gravatar_id":"","url":"https://api.github.com/users/ddriddle","html_url":"https://github.com/ddriddle","followers_url":"https://api.github.com/users/ddriddle/followers","following_url":"https://api.github.com/users/ddriddle/following{/other_user}","gists_url":"https://api.github.com/users/ddriddle/gists{/gist_id}","starred_url":"https://api.github.com/users/ddriddle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddriddle/subscriptions","organizations_url":"https://api.github.com/users/ddriddle/orgs","repos_url":"https://api.github.com/users/ddriddle/repos","events_url":"https://api.github.com/users/ddriddle/events{/privacy}","received_events_url":"https://api.github.com/users/ddriddle/received_events","type":"User","site_admin":false},"labels":[{"id":381296948,"url":"https://api.github.com/repos/gruntwork-io/terragrunt/labels/bug","name":"bug","color":"ee0701","default":true},{"id":381296951,"url":"https://api.github.com/repos/gruntwork-io/terragrunt/labels/help%20wanted","name":"help wanted","color":"128A0C","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-05-09T14:44:08Z","updated_at":"2018-05-09T14:58:54Z","closed_at":null,"author_association":"NONE","body":"When I run `terragrunt plan` with an expired STS token I receive the following error message:\r\n```\r\n$ terragrunt plan\r\n...\r\n[terragrunt] [...] 2018/05/09 09:38:18 Initializing remote state for the s3 backend\r\n[terragrunt] [...] 2018/05/09 09:38:18 [terragrunt] [...]  Remote state S3 bucket uiuc-tech-services-as-test does not exist or you don't have permissions to access it. Would you like Terragrunt to create it? (y/n) \r\nn\r\n[terragrunt] 2018/05/09 09:38:21 ExpiredToken: The provided token has expired.\r\n\tstatus code: 400, request id: 63148D3B92835921, host id: U1iG0SOUCecHsMcvpd8KpvWtL3eZCF08kZX73xB9+w3yNmt9UYQJ2NMMXozjU+sOcrJzSasjniY=\r\n[terragrunt] 2018/05/09 09:38:21 Unable to determine underlying exit code, so Terragrunt will exit with error code 1\r\n```\r\nOf course I expect to receive an error message but I think it is a bug that Terragrunt first does a lookup for the s3 bucket before failing. Is there anyway to perform the s3 lookup after the ExpiredToken check?\r\n\r\nBTW I am running Terragrunt on Mac OS X 10.11.6:\r\n```\r\n$ terragrunt --version\r\nterragrunt version v0.14.7\r\n```"},"comment":{"url":"https://api.github.com/repos/gruntwork-io/terragrunt/issues/comments/387768361","html_url":"https://github.com/gruntwork-io/terragrunt/issues/476#issuecomment-387768361","issue_url":"https://api.github.com/repos/gruntwork-io/terragrunt/issues/476","id":387768361,"user":{"login":"brikis98","id":711908,"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-05-09T14:58:54Z","updated_at":"2018-05-09T14:58:54Z","author_association":"CONTRIBUTOR","body":"PRs to fix that welcome. Probably a matter of an extra if statement."}}
{"actor":{"display_login":"brikis98"}}