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]: The plugin encountered an error, and failed to respond to the │ plugin.(*GRPCProvider).ApplyResourceChange call. Plugin did not respond #38093

Closed
utk231 opened this issue Jun 24, 2024 · 5 comments · Fixed by #38776
Assignees
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/iot Issues and PRs that pertain to the iot service.
Milestone

Comments

@utk231
Copy link

utk231 commented Jun 24, 2024

Terraform Core Version

1.8.5

AWS Provider Version

5.54.0

Affected Resource(s)

  • aws_iot_thing

Expected Behavior

IOT thing Successful creation

Actual Behavior


│ Error: Plugin did not respond

│   with aws_iot_thing.this["thing2"],
│   on main.tf line 2, in resource "aws_iot_thing" "this":
│    2: resource "aws_iot_thing" "this" {

│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.


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

panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 60 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/iot.expandThingGroupProperties(0xc0033e9ec0)
        github.com/hashicorp/terraform-provider-aws/internal/service/iot/thing_group.go:277 +0x17e
github.com/hashicorp/terraform-provider-aws/internal/service/iot.resourceThingGroupCreate({0x15778028, 0xc0033e9b00}, 0xc0033b6780, {0x137ca7e0, 0xc0025745b0})
        github.com/hashicorp/terraform-provider-aws/internal/service/iot/thing_group.go:146 +0x27e
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func8(0xc0033b6780?, {0x137ca7e0?, 0xc0025745b0})
        github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:113 +0x283
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x15778028?, {0x15778028?, 0xc0033a77d0?}, 0xd?, {0x137ca7e0?, 0xc0025745b0?})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:801 +0x7a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc0010bf6c0, {0x15778028, 0xc0033a77d0}, 0xc0031f6f70, 0xc0033b6600, {0x137ca7e0, 0xc0025745b0})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:937 +0xa89
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc002821d70, {0x15778028?, 0xc0033a7710?}, 0xc0033dc140)
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1153 +0xd5c
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0xc000b78770, {0x15778028?, 0xc0033a7440?}, 0xc0033dc140)
        github.com/hashicorp/[email protected]/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x193
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc000672f00, {0x15778028?, 0xc0033a6c60?}, 0xc0008e2850)
        github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:865 +0x3d0
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x13594e60, 0xc000672f00}, {0x15778028, 0xc0033a6c60}, 0xc0033b6280, 0x0)
        github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc001066000, {0x15778028, 0xc0033a6bd0}, {0x157c9300, 0xc00144d500}, 0xc0033a5e60, 0xc00264dad0, 0x1e864378, 0x0)
        google.golang.org/[email protected]/server.go:1369 +0xdf8
google.golang.org/grpc.(*Server).handleStream(0xc001066000, {0x157c9300, 0xc00144d500}, 0xc0033a5e60)
        google.golang.org/[email protected]/server.go:1780 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/[email protected]/server.go:1019 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 27
        google.golang.org/[email protected]/server.go:1030 +0x125

Error: The terraform-provider-aws_v5.54.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.

Relevant Error/Panic Output Snippet


│ Error: Plugin did not respond

│   with aws_iot_thing.this["thing2"],
│   on main.tf line 2, in resource "aws_iot_thing" "this":
│    2: resource "aws_iot_thing" "this" {

│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.



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

panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 60 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/iot.expandThingGroupProperties(0xc0033e9ec0)
        github.com/hashicorp/terraform-provider-aws/internal/service/iot/thing_group.go:277 +0x17e
github.com/hashicorp/terraform-provider-aws/internal/service/iot.resourceThingGroupCreate({0x15778028, 0xc0033e9b00}, 0xc0033b6780, {0x137ca7e0, 0xc0025745b0})
        github.com/hashicorp/terraform-provider-aws/internal/service/iot/thing_group.go:146 +0x27e
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func8(0xc0033b6780?, {0x137ca7e0?, 0xc0025745b0})
        github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:113 +0x283
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x15778028?, {0x15778028?, 0xc0033a77d0?}, 0xd?, {0x137ca7e0?, 0xc0025745b0?})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:801 +0x7a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc0010bf6c0, {0x15778028, 0xc0033a77d0}, 0xc0031f6f70, 0xc0033b6600, {0x137ca7e0, 0xc0025745b0})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:937 +0xa89
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc002821d70, {0x15778028?, 0xc0033a7710?}, 0xc0033dc140)
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1153 +0xd5c
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0xc000b78770, {0x15778028?, 0xc0033a7440?}, 0xc0033dc140)
        github.com/hashicorp/[email protected]/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x193
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc000672f00, {0x15778028?, 0xc0033a6c60?}, 0xc0008e2850)
        github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:865 +0x3d0
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x13594e60, 0xc000672f00}, {0x15778028, 0xc0033a6c60}, 0xc0033b6280, 0x0)
        github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc001066000, {0x15778028, 0xc0033a6bd0}, {0x157c9300, 0xc00144d500}, 0xc0033a5e60, 0xc00264dad0, 0x1e864378, 0x0)
        google.golang.org/[email protected]/server.go:1369 +0xdf8
google.golang.org/grpc.(*Server).handleStream(0xc001066000, {0x157c9300, 0xc00144d500}, 0xc0033a5e60)
        google.golang.org/[email protected]/server.go:1780 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/[email protected]/server.go:1019 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 27
        google.golang.org/[email protected]/server.go:1030 +0x125

Error: The terraform-provider-aws_v5.54.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.

Terraform Configuration Files

terraform { 
  required_providers { 
    aws = { 
      source = "hashicorp/aws" 
      version = "~> 5.0" 
    } 
  } 
}

provider "aws" {
  region = "us-west-2"
}

Steps to Reproduce

resource "aws_iot_thing" "example" {
  name = "example"

  attributes = {
    First = "examplevalue"
  }
}

Debug Output

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

panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 42 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/iot.expandThingGroupProperties(0xc002a8fa10)
        github.com/hashicorp/terraform-provider-aws/internal/service/iot/thing_group.go:277 +0x17e
github.com/hashicorp/terraform-provider-aws/internal/service/iot.resourceThingGroupCreate({0x15778028, 0xc002a8f650}, 0xc0009fed80, {0x137ca7e0, 0xc0023341a0})
        github.com/hashicorp/terraform-provider-aws/internal/service/iot/thing_group.go:146 +0x27e
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func8(0xc0009fed80?, {0x137ca7e0?, 0xc0023341a0})
        github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:113 +0x283
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x15778028?, {0x15778028?, 0xc0026cd290?}, 0xd?, {0x137ca7e0?, 0xc0023341a0?})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:801 +0x7a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc0012bfdc0, {0x15778028, 0xc0026cd290}, 0xc00268e8f0, 0xc0009fec00, {0x137ca7e0, 0xc0023341a0})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:937 +0xa89
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc00403cc78, {0x15778028?, 0xc0026cd1d0?}, 0xc0026a84b0)
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1153 +0xd5c
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0xc001657810, {0x15778028?, 0xc0026ccf00?}, 0xc0026a84b0)
        github.com/hashicorp/[email protected]/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x193
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc000210500, {0x15778028?, 0xc0026cc720?}, 0xc000250540)
        github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:865 +0x3d0
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x13594e60, 0xc000210500}, {0x15778028, 0xc0026cc720}, 0xc0009fe680, 0x0)
        github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0014a0200, {0x15778028, 0xc0026cc690}, {0x157c9300, 0xc0005d2000}, 0xc0026cad80, 0xc0048d7ad0, 0x1e864378, 0x0)
        google.golang.org/[email protected]/server.go:1369 +0xdf8
google.golang.org/grpc.(*Server).handleStream(0xc0014a0200, {0x157c9300, 0xc0005d2000}, 0xc0026cad80)
        google.golang.org/[email protected]/server.go:1780 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/[email protected]/server.go:1019 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 55
        google.golang.org/[email protected]/server.go:1030 +0x125

Error: The terraform-provider-aws_v5.54.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.

Panic Output

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

panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 42 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/iot.expandThingGroupProperties(0xc002a8fa10)
        github.com/hashicorp/terraform-provider-aws/internal/service/iot/thing_group.go:277 +0x17e
github.com/hashicorp/terraform-provider-aws/internal/service/iot.resourceThingGroupCreate({0x15778028, 0xc002a8f650}, 0xc0009fed80, {0x137ca7e0, 0xc0023341a0})
        github.com/hashicorp/terraform-provider-aws/internal/service/iot/thing_group.go:146 +0x27e
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func8(0xc0009fed80?, {0x137ca7e0?, 0xc0023341a0})
        github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:113 +0x283
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x15778028?, {0x15778028?, 0xc0026cd290?}, 0xd?, {0x137ca7e0?, 0xc0023341a0?})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:801 +0x7a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc0012bfdc0, {0x15778028, 0xc0026cd290}, 0xc00268e8f0, 0xc0009fec00, {0x137ca7e0, 0xc0023341a0})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:937 +0xa89
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc00403cc78, {0x15778028?, 0xc0026cd1d0?}, 0xc0026a84b0)
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1153 +0xd5c
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0xc001657810, {0x15778028?, 0xc0026ccf00?}, 0xc0026a84b0)
        github.com/hashicorp/[email protected]/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x193
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc000210500, {0x15778028?, 0xc0026cc720?}, 0xc000250540)
        github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:865 +0x3d0
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x13594e60, 0xc000210500}, {0x15778028, 0xc0026cc720}, 0xc0009fe680, 0x0)
        github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0014a0200, {0x15778028, 0xc0026cc690}, {0x157c9300, 0xc0005d2000}, 0xc0026cad80, 0xc0048d7ad0, 0x1e864378, 0x0)
        google.golang.org/[email protected]/server.go:1369 +0xdf8
google.golang.org/grpc.(*Server).handleStream(0xc0014a0200, {0x157c9300, 0xc0005d2000}, 0xc0026cad80)
        google.golang.org/[email protected]/server.go:1780 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/[email protected]/server.go:1019 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 55
        google.golang.org/[email protected]/server.go:1030 +0x125

Error: The terraform-provider-aws_v5.54.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

@utk231 utk231 added the bug Addresses a defect in current functionality. label Jun 24, 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 crash Results from or addresses a Terraform crash or kernel panic. service/iot Issues and PRs that pertain to the iot service. labels Jun 24, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Jun 24, 2024
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Jun 26, 2024
@acwwat
Copy link
Contributor

acwwat commented Jul 21, 2024

@utk231 The error you included does not seem to correspond to the aws_iot_thing resource. The stack trace is referring to the code for the aws_iot_thing_group resource instead. Maybe there's more to your configuration and the panic is somehow reported as related to the aws_iot_thing resource.

Meanwhile I am able to create the aws_iot_thing resource using your configuration without issues.

Please update the issue description with the correct configuration for reproducing the problem, and let us know whether you are still having issues.

@jar-b jar-b self-assigned this Aug 8, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 8, 2024
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.63.0 milestone Aug 12, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 15, 2024
Copy link

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

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 Sep 15, 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/iot Issues and PRs that pertain to the iot service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants