{"action":"opened","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/8923","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/8923/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/8923/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/8923/events","html_url":"https://github.com/hashicorp/terraform/issues/8923","id":177902135,"number":8923,"title":"Terraform crashes when the aws \"allowed_account_ids\" uses the wrong account id.","user":{"login":"josh-padnick","id":4295964,"avatar_url":"https://avatars.githubusercontent.com/u/4295964?v=3","gravatar_id":"","url":"https://api.github.com/users/josh-padnick","html_url":"https://github.com/josh-padnick","followers_url":"https://api.github.com/users/josh-padnick/followers","following_url":"https://api.github.com/users/josh-padnick/following{/other_user}","gists_url":"https://api.github.com/users/josh-padnick/gists{/gist_id}","starred_url":"https://api.github.com/users/josh-padnick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josh-padnick/subscriptions","organizations_url":"https://api.github.com/users/josh-padnick/orgs","repos_url":"https://api.github.com/users/josh-padnick/repos","events_url":"https://api.github.com/users/josh-padnick/events{/privacy}","received_events_url":"https://api.github.com/users/josh-padnick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-19T21:24:44Z","updated_at":"2016-09-19T21:24:44Z","closed_at":null,"body":"I discovered an issue where, when Terraform attempts to update an AWS account whose ID doesn't match the one listed in the `allows_account_ids` property of `provider.aws`, instead of giving a graceful error message about the problem, Terraform crashes.\r\n\r\n### Terraform Version\r\nTerraform v0.7.3\r\n\r\n### Affected Resource(s)\r\n- provider.aws\r\n- aws_iam_group\r\n\r\n### Terraform Configuration Files\r\n\r\n**main.tf**\r\n\r\n```hcl\r\nprovider \"aws\" {\r\n  region = \"${var.aws_region}\"\r\n  allowed_account_ids = [\"${var.aws_account_id}\"]\r\n}\r\n\r\nmodule \"iam_group\" {\r\n  source = \"./modules/iam-groups\"\r\n}\r\n```\r\n\r\n**modules/iam-group/main.tf**\r\n```hcl\r\nresource \"aws_iam_group\" \"admin\" {\r\n  name = \"admin-temp\"\r\n}\r\n```\r\n\r\n### Debug Output\r\nhttps://gist.github.com/josh-padnick/c6601137736758d63b84241be252c7ec\r\n\r\n### Panic Output\r\nhttps://gist.github.com/josh-padnick/a40d1a922684f8622b11b4ed0436cb26\r\n\r\n### Expected Behavior\r\nTerraform should have complained that I was attempting to updated Account A when my `provider.aws.allowed_account_ids` only permitted updates to Account B.\r\n\r\n### Actual Behavior\r\nTerraform crashed entirely.\r\n\r\n### Steps to Reproduce\r\n1. `terraform get` to load the `iam_group` module.\r\n1. `terraform apply`\r\n\r\n### Important Factoids\r\nI've previously gotten a valid error message here, so I'm not sure where the regression came from. It would be interesting to find out if this is specific to the `aws_iam_group` resource, or generic to all AWS resources."}}
{"actor":{"display_login":"josh-padnick"}}