Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform 0.7.3 - crash with disallowed AWS account #8729

Closed
elblivion opened this issue Sep 8, 2016 · 4 comments · Fixed by #8731
Closed

Terraform 0.7.3 - crash with disallowed AWS account #8729

elblivion opened this issue Sep 8, 2016 · 4 comments · Fixed by #8731

Comments

@elblivion
Copy link
Contributor

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.

Terraform Version

0.7.3

Affected Resource(s)

AWS Provider: Terraform crashes when using an account which is not in allowed_account_ids attribute of the AWS provider.

Terraform Configuration Files

Configuration is not an issue; my config works when I have the API keys for the correct AWS account in my environment.

Debug Output

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.

Panic Output

https://gist.github.com/anonymous/188b284fe43c5747c1b1f13418e7a078

Expected Behavior

Terraform should give an "Account not allowed" error message as it did until 0.7.2 (I think, 0.6.16 for sure).

Actual Behavior

Crash

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. set AWS keys for an account not in allowed_account_ids in the AWS provider config
  2. terraform plan

Important Factoids

N/A

References

Not to my knowledge.

@radeksimko
Copy link
Member

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, ...)

@radeksimko
Copy link
Member

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 #8638 may be the root cause.

@radeksimko
Copy link
Member

PR fixing this bug in #8731

@ghost
Copy link

ghost commented Apr 22, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants