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

[Bug]: Plugin crashed when trying to import Lightsail Instances #37470

Closed
elliotrpage opened this issue May 13, 2024 · 5 comments · Fixed by #37587
Closed

[Bug]: Plugin crashed when trying to import Lightsail Instances #37470

elliotrpage opened this issue May 13, 2024 · 5 comments · Fixed by #37587
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/lightsail Issues and PRs that pertain to the lightsail service.
Milestone

Comments

@elliotrpage
Copy link

Terraform Core Version

1.8.3

AWS Provider Version

5.49.0

Affected Resource(s)

aws_lightsail_instance

Expected Behavior

A terraform file generated by the import process would have been created.

Actual Behavior

Plugin crashed, threw an error. Full error text below.

Relevant Error/Panic Output Snippet

aws_lightsail_instance.wordpress_dev: Preparing import... [id=WP_Lamp-Dev]
aws_lightsail_instance.wordpress_prod: Preparing import... [id=WP_Lamp-Prod]
aws_lightsail_instance.wordpress_uat: Preparing import... [id=WP_Lamp-UAT]
aws_lightsail_instance.wordpress_dev: Refreshing state... [id=WP_Lamp-Dev]
aws_lightsail_instance.wordpress_uat: Refreshing state... [id=WP_Lamp-UAT]
aws_lightsail_instance.wordpress_prod: Refreshing state... [id=WP_Lamp-Prod]

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Error: Plugin did not respond
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.
╵
╷
│ Error: Plugin did not respond
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.
╵
╷
│ Error: Plugin did not respond
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.
╵

Stack trace from the terraform-provider-aws_v5.49.0_x5.exe plugin:

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x8 pc=0x1453ea4]

goroutine 88 [running]:
github.com/hashicorp/terraform-provider-aws/internal/tags.(*TagData).ValueString(...)
        github.com/hashicorp/terraform-provider-aws/internal/tags/key_value_tags.go:629
github.com/hashicorp/terraform-provider-aws/internal/tags.KeyValueTags.ResolveDuplicates(0x1e58ece0, {0x1343abb8, 0x1f7a04e0}, 0x0, 0x0, {0x3eb92590, 0x1e764690})
        github.com/hashicorp/terraform-provider-aws/internal/tags/key_value_tags.go:738 +0x154
github.com/hashicorp/terraform-provider-aws/internal/provider.tagsResourceInterceptor.run({0x1db32d90, 0x119cb014, 0x119cb010}, {0x1343abb8, 0x1f7a04e0}, {0x13456ba8, 0x1e764690}, {0x1163af20, 0x1e5d82a0}, 0x2, ...)
        github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:365 +0xb47
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Read.interceptedHandler[...].func9(0x1e764690, {0x1163af20, 0x1e5d82a0})
        github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:122 +0x37c
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x1dfa2fc0, {0x1343abb8, 0x1f73bcc8}, 0x1e764690, {0x1163af20, 0x1e5d82a0})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:790 +0x7e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0x1dfa2fc0, {0x1343abb8, 0x1f73bcc8}, 0x1e75afc0, {0x1163af20, 0x1e5d82a0})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:1089 +0x538
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0x1e57dc00, {0x1343abb8, 0x1f73bc38}, 0x1e74b8c0)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/grpc_provider.go:667 +0x4e0
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ReadResource(0x1dc7e0f0, {0x1343abb8, 0x1f73b968}, 0x1e74b8c0)
        github.com/hashicorp/terraform-plugin-mux@v0.15.0/tf5muxserver/mux_server_ReadResource.go:35 +0x1d6
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0x1da7e190, {0x1343abb8, 0x1f73aff0}, 0x1de8e360)
        github.com/hashicorp/terraform-plugin-go@v0.22.2/tfprotov5/tf5server/server.go:775 +0x4c8
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x1154c360, 0x1da7e190}, {0x1343abb8, 0x1f73aff0}, 0x1d8c6800, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.22.2/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:482 +0x98
google.golang.org/grpc.(*Server).processUnaryRPC(0x1d5b3408, {0x1343abb8, 0x1f73af60}, {0x134583f4, 0x1d982368}, 0x1fadfa28, 0x1e682390, 0x1b7bbd74, 0x0)
        google.golang.org/grpc@v1.63.2/server.go:1369 +0xf44
google.golang.org/grpc.(*Server).handleStream(0x1d5b3408, {0x134583f4, 0x1d982368}, 0x1fadfa28)
        google.golang.org/grpc@v1.63.2/server.go:1780 +0x10cf
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/grpc@v1.63.2/server.go:1019 +0xaa
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 37
        google.golang.org/grpc@v1.63.2/server.go:1030 +0x12f

Error: The terraform-provider-aws_v5.49.0_x5.exe 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.

Terraform Configuration Files

import {
to = aws_lightsail_instance.wordpress_dev
id = "WP_Lamp-Dev"
}

import {
to = aws_lightsail_instance.wordpress_uat
id = "WP_Lamp-UAT"
}

import {
to = aws_lightsail_instance.wordpress_prod
id = "WP_Lamp-Prod"
}

Steps to Reproduce

Run terraform plan -generate-config-out=generated.tf
Error is thrown

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No

@elliotrpage elliotrpage added the bug Addresses a defect in current functionality. label May 13, 2024
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the crash Results from or addresses a Terraform crash or kernel panic. label May 13, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label May 13, 2024
@justinretzolk justinretzolk added service/lightsail Issues and PRs that pertain to the lightsail service. and removed needs-triage Waiting for first response or review from a maintainer. labels May 13, 2024
@acwwat
Copy link
Contributor

acwwat commented May 14, 2024

Duplicate of #32430.

Copy link

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.

@github-actions github-actions bot added this to the v5.52.0 milestone May 24, 2024
Copy link

This functionality has been released in v5.52.0 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!

Copy link

github-actions bot commented Jul 1, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/lightsail Issues and PRs that pertain to the lightsail service.
Projects
None yet
3 participants