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]: Error: The terraform-provider-aws_v5.65.0_x5 plugin crashed! #39343

Closed
rahul-aryan opened this issue Sep 16, 2024 · 5 comments · Fixed by #39427
Closed

[Bug]: Error: The terraform-provider-aws_v5.65.0_x5 plugin crashed! #39343

rahul-aryan opened this issue Sep 16, 2024 · 5 comments · Fixed by #39427
Assignees
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/vpc Issues and PRs that pertain to the vpc service.
Milestone

Comments

@rahul-aryan
Copy link

rahul-aryan commented Sep 16, 2024

Terraform Core Version

1.9.5

AWS Provider Version

5.65

Affected Resource(s)

aws_vpc_dhcp_options

Expected Behavior

the plan is getting successfull, so ideally the resource should have been created but insted it threw me error

Actual Behavior

Plugin crashed on apply while creating the resource aws vpc dhcp options.

Relevant Error/Panic Output Snippet

Error: Plugin did not respond
│
│   with module.vpc["vpc_1"].aws_vpc_dhcp_options.dhcp_options["config1"],
│   on terraform-aws-vpc/main.tf line 13, in resource "aws_vpc_dhcp_options" "dhcp_options":
│   13: resource "aws_vpc_dhcp_options" "dhcp_options" {
│
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.
╵
╷
│ Error: Plugin did not respond
│
│   with module.vpc["vpc_1"].aws_vpc.vpc,
│   on terraform-aws-vpc/main.tf line 1, in resource "aws_vpc" "vpc":
│    1: resource "aws_vpc" "vpc" {
│
│ 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.65.0_x5 plugin:

panic: interface conversion: interface {} is nil, not string

goroutine 90 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/ec2.(*dhcpOptionsMap).resourceDataToDHCPConfigurations(0xc003135110?, 0xc002001580)
        github.com/hashicorp/terraform-provider-aws/internal/service/ec2/vpc_dhcp_options.go:301 +0x657
github.com/hashicorp/terraform-provider-aws/internal/service/ec2.resourceVPCDHCPOptionsCreate({0x17dffe88, 0xc0028348a0}, 0xc002001580, {0x15d3bce0, 0xc003135110})
        github.com/hashicorp/terraform-provider-aws/internal/service/ec2/vpc_dhcp_options.go:113 +0xa5
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func8(0xc002001580?, {0x15d3bce0?, 0xc003135110})
        github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:113 +0x283
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x17dffe88?, {0x17dffe88?, 0xc00281d4d0?}, 0xd?, {0x15d3bce0?, 0xc003135110?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/resource.go:801 +0x7a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc00102e2a0, {0x17dffe88, 0xc00281d4d0}, 0xc0028265b0, 0xc002001400, {0x15d3bce0, 0xc003135110})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/resource.go:937 +0xa69
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc004317140, {0x17dffe88?, 0xc00281d410?}, 0xc001e8c500)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/grpc_provider.go:1153 +0xd5c
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0xc000dd17a0, {0x17dffe88?, 0xc00281d140?}, 0xc001e8c500)
        github.com/hashicorp/terraform-plugin-mux@v0.16.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x193
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc001d40be0, {0x17dffe88?, 0xc00281c780?}, 0xc001b61730)
        github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/tf5server/server.go:865 +0x3bc
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x15b56640, 0xc001d40be0}, {0x17dffe88, 0xc00281c780}, 0xc002000c00, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003c5600, {0x17dffe88, 0xc00281c6f0}, {0x17e6e0a0, 0xc003244000}, 0xc002824b40, 0xc0031df4a0, 0x217cb5b8, 0x0)
        google.golang.org/grpc@v1.66.0/server.go:1393 +0xe11
google.golang.org/grpc.(*Server).handleStream(0xc0003c5600, {0x17e6e0a0, 0xc003244000}, 0xc002824b40)
        google.golang.org/grpc@v1.66.0/server.go:1804 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/grpc@v1.66.0/server.go:1029 +0x7f
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 23
        google.golang.org/grpc@v1.66.0/server.go:1040 +0x125


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

Operation failed: failed running terraform apply (exit 1)

Terraform Configuration Files

 terraform {
   required_providers {
     aws = {
       source  = "hashicorp/aws"
       version = "~> 5"
     }
   }
 
   cloud {
     organization = "Planview"
     workspaces {
       name = "<workspace_name>"
     }
   }
 }

Steps to Reproduce

terraform init
terraform plan
terraform apply

Debug Output

Error: Plugin did not respond
│
│   with module.vpc["vpc_1"].aws_vpc_dhcp_options.dhcp_options["config1"],
│   on terraform-aws-vpc/main.tf line 13, in resource "aws_vpc_dhcp_options" "dhcp_options":
│   13: resource "aws_vpc_dhcp_options" "dhcp_options" {
│
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.
╵
╷
│ Error: Plugin did not respond
│
│   with module.vpc["vpc_1"].aws_vpc.vpc,
│   on terraform-aws-vpc/main.tf line 1, in resource "aws_vpc" "vpc":
│    1: resource "aws_vpc" "vpc" {
│
│ 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.65.0_x5 plugin:

panic: interface conversion: interface {} is nil, not string

goroutine 90 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/ec2.(*dhcpOptionsMap).resourceDataToDHCPConfigurations(0xc003135110?, 0xc002001580)
        github.com/hashicorp/terraform-provider-aws/internal/service/ec2/vpc_dhcp_options.go:301 +0x657
github.com/hashicorp/terraform-provider-aws/internal/service/ec2.resourceVPCDHCPOptionsCreate({0x17dffe88, 0xc0028348a0}, 0xc002001580, {0x15d3bce0, 0xc003135110})
        github.com/hashicorp/terraform-provider-aws/internal/service/ec2/vpc_dhcp_options.go:113 +0xa5
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func8(0xc002001580?, {0x15d3bce0?, 0xc003135110})
        github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:113 +0x283
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x17dffe88?, {0x17dffe88?, 0xc00281d4d0?}, 0xd?, {0x15d3bce0?, 0xc003135110?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/resource.go:801 +0x7a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc00102e2a0, {0x17dffe88, 0xc00281d4d0}, 0xc0028265b0, 0xc002001400, {0x15d3bce0, 0xc003135110})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/resource.go:937 +0xa69
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc004317140, {0x17dffe88?, 0xc00281d410?}, 0xc001e8c500)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/grpc_provider.go:1153 +0xd5c
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0xc000dd17a0, {0x17dffe88?, 0xc00281d140?}, 0xc001e8c500)
        github.com/hashicorp/terraform-plugin-mux@v0.16.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x193
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc001d40be0, {0x17dffe88?, 0xc00281c780?}, 0xc001b61730)
        github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/tf5server/server.go:865 +0x3bc
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x15b56640, 0xc001d40be0}, {0x17dffe88, 0xc00281c780}, 0xc002000c00, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003c5600, {0x17dffe88, 0xc00281c6f0}, {0x17e6e0a0, 0xc003244000}, 0xc002824b40, 0xc0031df4a0, 0x217cb5b8, 0x0)
        google.golang.org/grpc@v1.66.0/server.go:1393 +0xe11
google.golang.org/grpc.(*Server).handleStream(0xc0003c5600, {0x17e6e0a0, 0xc003244000}, 0xc002824b40)
        google.golang.org/grpc@v1.66.0/server.go:1804 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/grpc@v1.66.0/server.go:1029 +0x7f
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 23
        google.golang.org/grpc@v1.66.0/server.go:1040 +0x125


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

Operation failed: failed running terraform apply (exit 1)

### Panic Output

Error: Plugin did not respond
│
│   with module.vpc["vpc_1"].aws_vpc_dhcp_options.dhcp_options["config1"],
│   on terraform-aws-vpc/main.tf line 13, in resource "aws_vpc_dhcp_options" "dhcp_options":
│   13: resource "aws_vpc_dhcp_options" "dhcp_options" {
│
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.
╵
╷
│ Error: Plugin did not respond
│
│   with module.vpc["vpc_1"].aws_vpc.vpc,
│   on terraform-aws-vpc/main.tf line 1, in resource "aws_vpc" "vpc":
│    1: resource "aws_vpc" "vpc" {
│
│ 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.65.0_x5 plugin:

panic: interface conversion: interface {} is nil, not string

goroutine 90 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/ec2.(*dhcpOptionsMap).resourceDataToDHCPConfigurations(0xc003135110?, 0xc002001580)
        github.com/hashicorp/terraform-provider-aws/internal/service/ec2/vpc_dhcp_options.go:301 +0x657
github.com/hashicorp/terraform-provider-aws/internal/service/ec2.resourceVPCDHCPOptionsCreate({0x17dffe88, 0xc0028348a0}, 0xc002001580, {0x15d3bce0, 0xc003135110})
        github.com/hashicorp/terraform-provider-aws/internal/service/ec2/vpc_dhcp_options.go:113 +0xa5
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func8(0xc002001580?, {0x15d3bce0?, 0xc003135110})
        github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:113 +0x283
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x17dffe88?, {0x17dffe88?, 0xc00281d4d0?}, 0xd?, {0x15d3bce0?, 0xc003135110?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/resource.go:801 +0x7a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc00102e2a0, {0x17dffe88, 0xc00281d4d0}, 0xc0028265b0, 0xc002001400, {0x15d3bce0, 0xc003135110})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/resource.go:937 +0xa69
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc004317140, {0x17dffe88?, 0xc00281d410?}, 0xc001e8c500)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/grpc_provider.go:1153 +0xd5c
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0xc000dd17a0, {0x17dffe88?, 0xc00281d140?}, 0xc001e8c500)
        github.com/hashicorp/terraform-plugin-mux@v0.16.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x193
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc001d40be0, {0x17dffe88?, 0xc00281c780?}, 0xc001b61730)
        github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/tf5server/server.go:865 +0x3bc
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x15b56640, 0xc001d40be0}, {0x17dffe88, 0xc00281c780}, 0xc002000c00, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003c5600, {0x17dffe88, 0xc00281c6f0}, {0x17e6e0a0, 0xc003244000}, 0xc002824b40, 0xc0031df4a0, 0x217cb5b8, 0x0)
        google.golang.org/grpc@v1.66.0/server.go:1393 +0xe11
google.golang.org/grpc.(*Server).handleStream(0xc0003c5600, {0x17e6e0a0, 0xc003244000}, 0xc002824b40)
        google.golang.org/grpc@v1.66.0/server.go:1804 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/grpc@v1.66.0/server.go:1029 +0x7f
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 23
        google.golang.org/grpc@v1.66.0/server.go:1040 +0x125


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

Operation failed: failed running terraform apply (exit 1)

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@rahul-aryan rahul-aryan added the bug Addresses a defect in current functionality. label Sep 16, 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/vpc Issues and PRs that pertain to the vpc service. needs-triage Waiting for first response or review from a maintainer. labels Sep 16, 2024
@ewbankkit
Copy link
Contributor

case []interface{}:
var values []string
for _, v := range v {
v := v.(string)
if v != "" {
values = append(values, v)
}
}

@breathingdust breathingdust removed the needs-triage Waiting for first response or review from a maintainer. label Sep 16, 2024
@YakDriver YakDriver self-assigned this Sep 16, 2024
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Sep 16, 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.69.0 milestone Sep 20, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Sep 26, 2024
Copy link

This functionality has been released in v5.69.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 Oct 28, 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/vpc Issues and PRs that pertain to the vpc service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants