-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Crash when importing aws_lambda_function with container #17565
Comments
It seems this is the fix: #17082 |
Relevant portion of crash log: 2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: panic: runtime error: invalid memory address or nil pointer dereference
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4877a02]
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5:
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: goroutine 102 [running]:
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: github.com/terraform-providers/terraform-provider-aws/aws.flattenLambdaImageConfig(...)
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-aws/aws/resource_aws_lambda_function.go:1322
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsLambdaFunctionRead(0xc001eb6d00, 0x5b279a0, 0xc001298580, 0xa6eecc0, 0x6955b08)
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-aws/aws/resource_aws_lambda_function.go:724 +0x2f62
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc0006946c0, 0x727d600, 0xc0015cce80, 0xc001eb6d00, 0x5b279a0, 0xc001298580, 0x0, 0x0, 0x0)
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.4.2/helper/schema/resource.go:290 +0x88
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0006946c0, 0x727d600, 0xc0015cce80, 0xc000a98930, 0x5b279a0, 0xc001298580, 0xc0018a8928, 0x0, 0x0, 0x0)
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.4.2/helper/schema/resource.go:564 +0x1cb
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc000f486c0, 0x727d600, 0xc0015cce80, 0xc0015ccec0, 0xc0015cce80, 0x637dde0, 0x661d2c0)
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.4.2/helper/schema/grpc_provider.go:575 +0x43b
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: github.com/hashicorp/terraform-plugin-go/tfprotov5/server.(*server).ReadResource(0xc000b852c0, 0x727d600, 0xc0015cce80, 0xc001d81c80, 0xc000b852c0, 0xc001edf470, 0xc00106cba0)
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.2.1/tfprotov5/server/server.go:298 +0x105
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler(0x661d2c0, 0xc000b852c0, 0x727d6c0, 0xc001edf470, 0xc001d81c20, 0x0, 0x727d6c0, 0xc001edf470, 0xc001ef4600, 0x2ef)
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.2.1/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:344 +0x214
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: google.golang.org/grpc.(*Server).processUnaryRPC(0xc00029ee00, 0x72a0660, 0xc0010d1b00, 0xc001e9e200, 0xc0005de4e0, 0xa6ad570, 0x0, 0x0, 0x0)
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:1194 +0x522
2021-02-11T10:04:32.520-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: google.golang.org/grpc.(*Server).handleStream(0xc00029ee00, 0x72a0660, 0xc0010d1b00, 0xc001e9e200, 0x0)
2021-02-11T10:04:32.521-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:1517 +0xd05
2021-02-11T10:04:32.521-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000b82b40, 0xc00029ee00, 0x72a0660, 0xc0010d1b00, 0xc001e9e200)
2021-02-11T10:04:32.521-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:859 +0xa5
2021-02-11T10:04:32.521-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: created by google.golang.org/grpc.(*Server).serveStreams.func1
2021-02-11T10:04:32.521-0300 [DEBUG] plugin.terraform-provider-aws_v3.27.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:857 +0x1fd |
@marcosdiez Thanks for raising this issue. |
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 CLI and Terraform AWS Provider Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
PLEASE NOTICE THE ISSUE IS WITH TERRAFORM IMPORT
https://gist.github.com/marcosdiez/fa6b88af92aaba21e3876b2b4490ad99
Panic Output
https://gist.github.com/marcosdiez/fa6b88af92aaba21e3876b2b4490ad99
Expected Behavior
it should have imported my resource
Actual Behavior
it crashed
Steps to Reproduce
terraform14 import aws_lambda_function.userapi arn:aws:lambda:us-east-1:123456789012:function:my-lambda-function
Important Factoids
this lambda function uses containers. Here is it's arn:
The text was updated successfully, but these errors were encountered: