-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Issues creating tables: panic: assignment to entry in nil map #8214
Comments
Amplifying this: any endpoint customization blows up under 2.5.0, because we're not initializing the new Endpoints map before using it. Probably just needs a make(map[string]string) in the Config initialization block? https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/provider.go#L1010 |
Reference: #8214 Output from acceptance testing before code change: ``` === CONT TestAccAWSProvider_Endpoints panic: assignment to entry in nil map goroutine 614 [running]: github.com/terraform-providers/terraform-provider-aws/aws.providerConfigure(0xc000c2fd50, 0x0, 0xc00098e300, 0xc000c2fd50, 0x0) /Users/bflad/src/github.com/terraform-providers/terraform-provider-aws/aws/provider.go:1011 +0xde1 github.com/hashicorp/terraform/helper/schema.(*Provider).Configure(0xc000af7650, 0xc0006de000, 0xc, 0x653dec0) /Users/bflad/go/pkg/mod/github.com/hashicorp/terraform@v0.11.14-0.20190329073242-44702fa6c163/helper/schema/provider.go:264 +0xcd github.com/hashicorp/terraform/terraform.(*BuiltinEvalContext).ConfigureProvider(0xc000a31860, 0xc00142c880, 0xc, 0xc0006de000, 0x0, 0x31) /Users/bflad/go/pkg/mod/github.com/hashicorp/terraform@v0.11.14-0.20190329073242-44702fa6c163/terraform/eval_context_builtin.go:136 +0x14a github.com/hashicorp/terraform/terraform.(*EvalConfigProvider).Eval(0xc0009a4b40, 0x6543da0, 0xc000a31860, 0x2, 0x2, 0x59a0521, 0x4) /Users/bflad/go/pkg/mod/github.com/hashicorp/terraform@v0.11.14-0.20190329073242-44702fa6c163/terraform/eval_provider.go:48 +0x53 github.com/hashicorp/terraform/terraform.EvalRaw(0x645b160, 0xc0009a4b40, 0x6543da0, 0xc000a31860, 0xc000114000, 0x2, 0xc000660150, 0x2b) /Users/bflad/go/pkg/mod/github.com/hashicorp/terraform@v0.11.14-0.20190329073242-44702fa6c163/terraform/eval.go:53 +0x11a github.com/hashicorp/terraform/terraform.(*EvalSequence).Eval(0xc0009a4b60, 0x6543da0, 0xc000a31860, 0x2, 0x2, 0x59a0521, 0x4) /Users/bflad/go/pkg/mod/github.com/hashicorp/terraform@v0.11.14-0.20190329073242-44702fa6c163/terraform/eval_sequence.go:14 +0x9c github.com/hashicorp/terraform/terraform.EvalRaw(0x645b560, 0xc0009a4b60, 0x6543da0, 0xc000a31860, 0x2b, 0x0, 0x0, 0x2b) /Users/bflad/go/pkg/mod/github.com/hashicorp/terraform@v0.11.14-0.20190329073242-44702fa6c163/terraform/eval.go:53 +0x11a github.com/hashicorp/terraform/terraform.(*EvalOpFilter).Eval(0xc00142f560, 0x6543da0, 0xc000a31860, 0x2, 0x2, 0x59a0521, 0x4) /Users/bflad/go/pkg/mod/github.com/hashicorp/terraform@v0.11.14-0.20190329073242-44702fa6c163/terraform/eval_filter_operation.go:37 +0x4c github.com/hashicorp/terraform/terraform.EvalRaw(0x645b440, 0xc00142f560, 0x6543da0, 0xc000a31860, 0x0, 0x0, 0x0, 0x0) /Users/bflad/go/pkg/mod/github.com/hashicorp/terraform@v0.11.14-0.20190329073242-44702fa6c163/terraform/eval.go:53 +0x11a github.com/hashicorp/terraform/terraform.(*EvalSequence).Eval(0xc0009a4b80, 0x6543da0, 0xc000a31860, 0x2, 0x2, 0x59a0521, 0x4) /Users/bflad/go/pkg/mod/github.com/hashicorp/terraform@v0.11.14-0.20190329073242-44702fa6c163/terraform/eval_sequence.go:14 +0x9c github.com/hashicorp/terraform/terraform.EvalRaw(0x645b560, 0xc0009a4b80, 0x6543da0, 0xc000a31860, 0x50696e0, 0x9b05605, 0x4c8c7a0, 0xc00142b700) /Users/bflad/go/pkg/mod/github.com/hashicorp/terraform@v0.11.14-0.20190329073242-44702fa6c163/terraform/eval.go:53 +0x11a github.com/hashicorp/terraform/terraform.Eval(0x645b560, 0xc0009a4b80, 0x6543da0, 0xc000a31860, 0xc0009a4b80, 0x645b560, 0xc0009a4b80, 0xc000075db0) /Users/bflad/go/pkg/mod/github.com/hashicorp/terraform@v0.11.14-0.20190329073242-44702fa6c163/terraform/eval.go:34 +0x4d github.com/hashicorp/terraform/terraform.(*Graph).walk.func1(0x571f240, 0xc00143e098, 0x0, 0x0) /Users/bflad/go/pkg/mod/github.com/hashicorp/terraform@v0.11.14-0.20190329073242-44702fa6c163/terraform/graph.go:126 +0xbc2 github.com/hashicorp/terraform/dag.(*Walker).walkVertex(0xc001431810, 0x571f240, 0xc00143e098, 0xc00063c180) /Users/bflad/go/pkg/mod/github.com/hashicorp/terraform@v0.11.14-0.20190329073242-44702fa6c163/dag/walk.go:387 +0x33b created by github.com/hashicorp/terraform/dag.(*Walker).Update /Users/bflad/go/pkg/mod/github.com/hashicorp/terraform@v0.11.14-0.20190329073242-44702fa6c163/dag/walk.go:310 +0xa4f FAIL github.com/terraform-providers/terraform-provider-aws/aws 3.940s ``` Output from acceptance testing after code change: ``` --- PASS: TestAccAWSProvider_Endpoints (1.68s) ```
Hi Folks 👋 Apologies for the unexpected behavior with the last release. I have submitted a fix with a covering test here, which we will release early next week: #8226 |
The fix for this has been merged and will release with version 2.6.0 of the Terraform AWS Provider later today 👍 |
The fix for this has been released in version 2.6.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Terraform Version
(Also tried with 0.11.13, same behaviour)
Affected Resource(s)
aws_dynamodb_table
Terraform Configuration Files
Debug Output
https://gist.github.com/textbook/74ae81de86d1a4d9f19a4c89ff637d2c
Panic Output
Expected Behavior
Table gets created as required (and as works fine in 2.4.0).
Actual Behavior
Steps to Reproduce
terraform apply -auto-approve
Important Factoids
Running this against the
amazon/dynamodb-local
container image in a network defined by Docker Compose.References
The text was updated successfully, but these errors were encountered: