Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
0.7.3
AWS Provider: Terraform crashes when using an account which is not in allowed_account_ids attribute of the AWS provider.
Configuration is not an issue; my config works when I have the API keys for the correct AWS account in my environment.
Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.
https://gist.github.com/anonymous/188b284fe43c5747c1b1f13418e7a078
Terraform should give an "Account not allowed" error message as it did until 0.7.2 (I think, 0.6.16 for sure).
Crash
Please list the steps required to reproduce the issue, for example:
allowed_account_ids in the AWS provider configterraform planN/A
Not to my knowledge.
Thanks for the report @elblivion .
Just cutting out the important part of crash log:
2016/09/08 07:49:20 [DEBUG] plugin: terraform: panic: interface conversion: interface {} is nil, not *aws.AWSClient
2016/09/08 07:49:20 [DEBUG] plugin: terraform:
2016/09/08 07:49:20 [DEBUG] plugin: terraform: goroutine 760 [running]:
2016/09/08 07:49:20 [DEBUG] plugin: terraform: panic(0x28d0ae0, 0xc424e2b340)
2016/09/08 07:49:20 [DEBUG] plugin: terraform: /opt/go/src/runtime/panic.go:500 +0x1a1
2016/09/08 07:49:20 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/builtin/providers/aws.resourceAwsElasticacheParameterGroupRead(0xc424efe360, 0x0, 0x0, 0x0, 0x1f)
2016/09/08 07:49:20 [DEBUG] plugin: terraform: /opt/gopath/src/github.com/hashicorp/terraform/builtin/providers/aws/resource_aws_elasticache_parameter_group.go:94 +0x6bb
2016/09/08 07:49:20 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/helper/schema.(*Resource).Refresh(0xc423c20d80, 0xc424bc2eb0, 0x0, 0x0, 0xc4234d6b10, 0x1, 0x0)
2016/09/08 07:49:20 [DEBUG] plugin: terraform: /opt/gopath/src/github.com/hashicorp/terraform/helper/schema/resource.go:259 +0x131
2016/09/08 07:49:20 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/helper/schema.(*Provider).Refresh(0xc423c5bef0, 0xc424e2b040, 0xc424bc2eb0, 0x0, 0x18, 0x18)
2016/09/08 07:49:20 [DEBUG] plugin: terraform: /opt/gopath/src/github.com/hashicorp/terraform/helper/schema/provider.go:203 +0x91
2016/09/08 07:49:20 [DEBUG] plugin: terraform: github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Refresh(0xc423bd74e0, 0xc424e2dcc0, 0xc424e2ddc0, 0x0, 0x0)
2016/09/08 07:49:20 [DEBUG] plugin: terraform: /opt/gopath/src/github.com/hashicorp/terraform/plugin/resource_provider.go:482 +0x4e
2016/09/08 07:49:20 [DEBUG] plugin: terraform: reflect.Value.call(0xc420017260, 0xc423910f80, 0x13, 0x2e04768, 0x4, 0xc424a94ef0, 0x3, 0x3, 0x268c900, 0xc424ab6ae0, ...)
2016/09/08 07:49:20 [DEBUG] plugin: terraform: /opt/go/src/reflect/value.go:434 +0x5c8
2016/09/08 07:49:20 [DEBUG] plugin: terraform: reflect.Value.Call(0xc420017260, 0xc423910f80, 0x13, 0xc424a94ef0, 0x3, 0x3, 0xc424ac2394, 0x100000000, 0xc42453ff01)
2016/09/08 07:49:20 [DEBUG] plugin: terraform: /opt/go/src/reflect/value.go:302 +0xa4
2016/09/08 07:49:20 [DEBUG] plugin: terraform: net/rpc.(*service).call(0xc423bdfa40, 0xc423bdfa00, 0xc423bee508, 0xc422c34880, 0xc424e4e8a0, 0x25b5960, 0xc424e2dcc0, 0x16, 0x25b59a0, 0xc424e2ddc0, ...)
I was able to reproduce this and I can also confirm this bug didn't exist in 0.7.2 which leads me to a thought that https://github.com/hashicorp/terraform/pull/8638 may be the root cause.
PR fixing this bug in https://github.com/hashicorp/terraform/pull/8731
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
PR fixing this bug in https://github.com/hashicorp/terraform/pull/8731