-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Bug]: crash when importing aws_datazone_project #38923
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
The import method is not properly returning when the provided identifier has the improper number of parts: terraform-provider-aws/internal/service/datazone/project.go Lines 319 to 321 in b93f0a6
@awsandy - I'll get this bug patched (and the incorrect registry documentation updated), but this resource requires a multi-part key for import ( |
Thank you - and confirm it imported without error when using multi-part key as you described. |
Warning This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
This functionality has been released in v5.63.1 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
Terraform Core Version
1.9.3
AWS Provider Version
5.63
Affected Resource(s)
aws_datazone_project
When importing the provider crashed (see below)
import_aws_datazone_project.tf:
import {
to = aws_datazone_project.cdsvp6st8l82lj
id = "cdsvp6st8l82lj"
}
$ terraform plan -generate-config-out=resources.out
Stack trace from the terraform-provider-aws_v5.63.0_x5 plugin:
panic: runtime error: index out of range [1] with length 1
goroutine 81 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/datazone.(*resourceProject).ImportState(0x1161aea28?, {0x1161aea28, 0x140021716b0}, {{0x1400186f230?, 0x0?}, {0x0?}}, 0x14001226180)
github.com/hashicorp/terraform-provider-aws/internal/service/datazone/project.go:323 +0x278
github.com/hashicorp/terraform-provider-aws/internal/provider/fwprovider.(*wrappedResource).ImportState(0x14002dbc780?, {0x1161aea28?, 0x140009eb9e0?}, {{0x1400186f230?, 0x110fbf96a?}, {0x2d?}}, 0x14001226180)
github.com/hashicorp/terraform-provider-aws/internal/provider/fwprovider/intercept.go:329 +0xb4
github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).ImportResourceState(0x14000fce960, {0x1161aea28, 0x140009eb9e0}, 0x14000fe9730, 0x140021d95d0)
github.com/hashicorp/[email protected]/internal/fwserver/server_importresourcestate.go:136 +0x678
github.com/hashicorp/terraform-plugin-framework/internal/proto5server.(*Server).ImportResourceState(0x14000fce960, {0x1161aea28?, 0x140009eb8f0?}, 0x14000abc9f0)
github.com/hashicorp/[email protected]/internal/proto5server/server_importresourcestate.go:47 +0x248
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ImportResourceState(0x14000f9ba40, {0x1161aea28?, 0x14000abca50?}, 0x14000abc9f0)
github.com/hashicorp/[email protected]/tf5muxserver/mux_server_ImportResourceState.go:36 +0x184
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ImportResourceState(0x140010ca320, {0x1161aea28?, 0x14000a51ec0?}, 0x14000d7c190)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:896 +0x1e8
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ImportResourceState_Handler({0x115cddd20, 0x140010ca320}, {0x1161aea28, 0x14000a51ec0}, 0x14004cbe000, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:536 +0x1c0
google.golang.org/grpc.(*Server).processUnaryRPC(0x14000f2e200, {0x1161aea28, 0x14000a50ae0}, {0x116219aa0, 0x140002aa300}, 0x140009b8000, 0x1400214b350, 0x11f92f010, 0x0)
google.golang.org/[email protected]/server.go:1369 +0xb58
google.golang.org/grpc.(*Server).handleStream(0x14000f2e200, {0x116219aa0, 0x140002aa300}, 0x140009b8000)
google.golang.org/[email protected]/server.go:1780 +0xb20
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/[email protected]/server.go:1019 +0x8c
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 43
google.golang.org/[email protected]/server.go:1030 +0x13c
panic: runtime error: index out of range [1] with length 1
goroutine 84 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/datazone.(*resourceProject).ImportState(0x1161aea28?, {0x1161aea28, 0x1400224a600}, {{0x1400186fca0?, 0x0?}, {0x0?}}, 0x14001e004e0)
github.com/hashicorp/terraform-provider-aws/internal/service/datazone/project.go:323 +0x278
github.com/hashicorp/terraform-provider-aws/internal/provider/fwprovider.(*wrappedResource).ImportState(0x14004c78380?, {0x1161aea28?, 0x14001174d80?}, {{0x1400186fca0?, 0x110fbf96a?}, {0x2d?}}, 0x14001e004e0)
github.com/hashicorp/terraform-provider-aws/internal/provider/fwprovider/intercept.go:329 +0xb4
github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).ImportResourceState(0x14000fce960, {0x1161aea28, 0x14001174d80}, 0x14001025ea0, 0x140021e95d0)
github.com/hashicorp/[email protected]/internal/fwserver/server_importresourcestate.go:136 +0x678
github.com/hashicorp/terraform-plugin-framework/internal/proto5server.(*Server).ImportResourceState(0x14000fce960, {0x1161aea28?, 0x14001174c90?}, 0x14000daea50)
github.com/hashicorp/[email protected]/internal/proto5server/server_importresourcestate.go:47 +0x248
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ImportResourceState(0x14000f9ba40, {0x1161aea28?, 0x14000daeab0?}, 0x14000daea50)
github.com/hashicorp/[email protected]/tf5muxserver/mux_server_ImportResourceState.go:36 +0x184
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ImportResourceState(0x140010ca320, {0x1161aea28?, 0x14000abd020?}, 0x14000d7cbe0)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:896 +0x1e8
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ImportResourceState_Handler({0x115cddd20, 0x140010ca320}, {0x1161aea28, 0x14000abd020}, 0x14004cbe780, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:536 +0x1c0
google.golang.org/grpc.(*Server).processUnaryRPC(0x14000f2e200, {0x1161aea28, 0x14000abcf60}, {0x116219aa0, 0x140002aa300}, 0x14000a44c60, 0x1400214b350, 0x11f92f010, 0x0)
google.golang.org/[email protected]/server.go:1369 +0xb58
google.golang.org/grpc.(*Server).handleStream(0x14000f2e200, {0x116219aa0, 0x140002aa300}, 0x14000a44c60)
google.golang.org/[email protected]/server.go:1780 +0xb20
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/[email protected]/server.go:1019 +0x8c
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 43
google.golang.org/[email protected]/server.go:1030 +0x13c
Error: The terraform-provider-aws_v5.63.0_x5 plugin crashed!
This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.
Expected Behavior
Import the resource without a crash
Actual Behavior
Provider crashes - see below
Relevant Error/Panic Output Snippet
Terraform Configuration Files
import {
to = aws_datazone_project.cdsvp6st8l82lj
id = "cdsvp6st8l82lj"
}
Steps to Reproduce
terraform plan -generate-config-out=resources.out
Debug Output
No response
Panic Output
Stack trace from the terraform-provider-aws_v5.63.0_x5 plugin:
panic: runtime error: index out of range [1] with length 1
goroutine 81 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/datazone.(*resourceProject).ImportState(0x1161aea28?, {0x1161aea28, 0x140021716b0}, {{0x1400186f230?, 0x0?}, {0x0?}}, 0x14001226180)
github.com/hashicorp/terraform-provider-aws/internal/service/datazone/project.go:323 +0x278
github.com/hashicorp/terraform-provider-aws/internal/provider/fwprovider.(*wrappedResource).ImportState(0x14002dbc780?, {0x1161aea28?, 0x140009eb9e0?}, {{0x1400186f230?, 0x110fbf96a?}, {0x2d?}}, 0x14001226180)
github.com/hashicorp/terraform-provider-aws/internal/provider/fwprovider/intercept.go:329 +0xb4
github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).ImportResourceState(0x14000fce960, {0x1161aea28, 0x140009eb9e0}, 0x14000fe9730, 0x140021d95d0)
github.com/hashicorp/[email protected]/internal/fwserver/server_importresourcestate.go:136 +0x678
github.com/hashicorp/terraform-plugin-framework/internal/proto5server.(*Server).ImportResourceState(0x14000fce960, {0x1161aea28?, 0x140009eb8f0?}, 0x14000abc9f0)
github.com/hashicorp/[email protected]/internal/proto5server/server_importresourcestate.go:47 +0x248
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ImportResourceState(0x14000f9ba40, {0x1161aea28?, 0x14000abca50?}, 0x14000abc9f0)
github.com/hashicorp/[email protected]/tf5muxserver/mux_server_ImportResourceState.go:36 +0x184
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ImportResourceState(0x140010ca320, {0x1161aea28?, 0x14000a51ec0?}, 0x14000d7c190)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:896 +0x1e8
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ImportResourceState_Handler({0x115cddd20, 0x140010ca320}, {0x1161aea28, 0x14000a51ec0}, 0x14004cbe000, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:536 +0x1c0
google.golang.org/grpc.(*Server).processUnaryRPC(0x14000f2e200, {0x1161aea28, 0x14000a50ae0}, {0x116219aa0, 0x140002aa300}, 0x140009b8000, 0x1400214b350, 0x11f92f010, 0x0)
google.golang.org/[email protected]/server.go:1369 +0xb58
google.golang.org/grpc.(*Server).handleStream(0x14000f2e200, {0x116219aa0, 0x140002aa300}, 0x140009b8000)
google.golang.org/[email protected]/server.go:1780 +0xb20
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/[email protected]/server.go:1019 +0x8c
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 43
google.golang.org/[email protected]/server.go:1030 +0x13c
panic: runtime error: index out of range [1] with length 1
goroutine 84 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/datazone.(*resourceProject).ImportState(0x1161aea28?, {0x1161aea28, 0x1400224a600}, {{0x1400186fca0?, 0x0?}, {0x0?}}, 0x14001e004e0)
github.com/hashicorp/terraform-provider-aws/internal/service/datazone/project.go:323 +0x278
github.com/hashicorp/terraform-provider-aws/internal/provider/fwprovider.(*wrappedResource).ImportState(0x14004c78380?, {0x1161aea28?, 0x14001174d80?}, {{0x1400186fca0?, 0x110fbf96a?}, {0x2d?}}, 0x14001e004e0)
github.com/hashicorp/terraform-provider-aws/internal/provider/fwprovider/intercept.go:329 +0xb4
github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).ImportResourceState(0x14000fce960, {0x1161aea28, 0x14001174d80}, 0x14001025ea0, 0x140021e95d0)
github.com/hashicorp/[email protected]/internal/fwserver/server_importresourcestate.go:136 +0x678
github.com/hashicorp/terraform-plugin-framework/internal/proto5server.(*Server).ImportResourceState(0x14000fce960, {0x1161aea28?, 0x14001174c90?}, 0x14000daea50)
github.com/hashicorp/[email protected]/internal/proto5server/server_importresourcestate.go:47 +0x248
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ImportResourceState(0x14000f9ba40, {0x1161aea28?, 0x14000daeab0?}, 0x14000daea50)
github.com/hashicorp/[email protected]/tf5muxserver/mux_server_ImportResourceState.go:36 +0x184
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ImportResourceState(0x140010ca320, {0x1161aea28?, 0x14000abd020?}, 0x14000d7cbe0)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:896 +0x1e8
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ImportResourceState_Handler({0x115cddd20, 0x140010ca320}, {0x1161aea28, 0x14000abd020}, 0x14004cbe780, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:536 +0x1c0
google.golang.org/grpc.(*Server).processUnaryRPC(0x14000f2e200, {0x1161aea28, 0x14000abcf60}, {0x116219aa0, 0x140002aa300}, 0x14000a44c60, 0x1400214b350, 0x11f92f010, 0x0)
google.golang.org/[email protected]/server.go:1369 +0xb58
google.golang.org/grpc.(*Server).handleStream(0x14000f2e200, {0x116219aa0, 0x140002aa300}, 0x14000a44c60)
google.golang.org/[email protected]/server.go:1780 +0xb20
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/[email protected]/server.go:1019 +0x8c
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 43
google.golang.org/[email protected]/server.go:1030 +0x13c
Error: The terraform-provider-aws_v5.63.0_x5 plugin crashed!
This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.
Important Factoids
No response
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: