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 terraform-provider-aws_v5.49.0_x5 plugin crashed! #37422

Open
vinay-20 opened this issue May 10, 2024 · 2 comments
Open

[Bug]: The terraform-provider-aws_v5.49.0_x5 plugin crashed! #37422

vinay-20 opened this issue May 10, 2024 · 2 comments
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/batch Issues and PRs that pertain to the batch service.

Comments

@vinay-20
Copy link

vinay-20 commented May 10, 2024

Terraform Core Version

1.6.0

AWS Provider Version

5.49.0

Affected Resource(s)

aws_batch

Expected Behavior

This behaviour is seen on terraform cloud, while we are running terraform plan against the current infrastructure the plan should have identified the drift and completed the terraform plan successfully.

Actual Behavior

The plugin crashed while computing changes for aws batch, and this is seen in those workspace which has aws batch resource in it.

Relevant Error/Panic Output Snippet

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

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

goroutine 625 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/batch.needsJobDefUpdate(0xc0045e4a40)
github.com/hashicorp/terraform-provider-aws/internal/service/batch/job_definition.go:557 +0x1074
github.com/hashicorp/terraform-provider-aws/internal/service/batch.jobDefinitionCustomizeDiff({0x11cc35c0?, 0x1d97b3e0?}, 0xc0045e4a40, {0xe?, 0xc0020eedd0?})
github.com/hashicorp/terraform-provider-aws/internal/service/batch/job_definition.go:452 +0x3a
github.com/hashicorp/terraform-provider-aws/internal/service/batch.ResourceJobDefinition.Sequence.func23({0x14b36808, 0xc004c1e060}, 0xc0045e4a40, {0x12caafa0, 0xc0020eedd0})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/customdiff/compose.go:69 +0x84
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).CustomizeDiff.func5({0x14b36808?, 0xc0045e7980?}, 0xc0045e4a40, {0x12caafa0, 0xc0020eedd0})
github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:186 +0x63
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.Diff(0xc0010f3a70, {0x14b36808, 0xc0045e7980}, 0xc0045ef5f0, 0xc004b9c190, 0xc000011740, {0x12caafa0, 0xc0020eedd0}, 0x0)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/schema.go:698 +0x4b4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).SimpleDiff(0x14b36c38?, {0x14b36808?, 0xc0045e7980?}, 0xc0045ef5f0, 0xc0045e79b0?, {0x12caafa0?, 0xc0020eedd0?})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:962 +0xdb
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).PlanResourceChange(0xc00356c768, {0x14b36808?, 0xc0045e7890?}, 0xc00458b720)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/grpc_provider.go:798 +0x996
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).PlanResourceChange(0xc0019eaaf0, {0x14b36808?, 0xc0045e75c0?}, 0xc00458b720)
github.com/hashicorp/terraform-plugin-mux@v0.15.0/tf5muxserver/mux_server_PlanResourceChange.go:73 +0x2ad
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).PlanResourceChange(0xc000033d60, {0x14b36808?, 0xc0045e6de0?}, 0xc000b86b60)
github.com/hashicorp/terraform-plugin-go@v0.22.2/tfprotov5/tf5server/server.go:811 +0x3d0
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_PlanResourceChange_Handler({0x12a6a520, 0xc000033d60}, {0x14b36808, 0xc0045e6de0}, 0xc0045ba200, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.22.2/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:500 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc001a8c200, {0x14b36808, 0xc0045e6d50}, {0x14b811c0, 0xc000340780}, 0xc0045eaa20, 0xc0021a05d0, 0x1d8f0580, 0x0)
google.golang.org/grpc@v1.63.2/server.go:1369 +0xdf8
google.golang.org/grpc.(*Server).handleStream(0xc001a8c200, {0x14b811c0, 0xc000340780}, 0xc0045eaa20)
google.golang.org/grpc@v1.63.2/server.go:1780 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/grpc@v1.63.2/server.go:1019 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 30
google.golang.org/grpc@v1.63.2/server.go:1030 +0x125

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

provider.tf

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

batch.tf

 module "app-batch" {
   source  = "app.terraform.io/Planview/batch-fargate/github"
   version = "0.2.6"
  
  # """rest of the code.."""
 }

Steps to Reproduce

  1. terraform init
  2. terraform plan

Debug Output

Error: Request cancelled with module.app-batch.module.fargate-batch.aws_batch_job_definition.this["app-batch"] on .terraform/modules/app-batch.fargate-batch/main.tf line 265, in resource "aws_batch_job_definition" "this": resource "aws_batch_job_definition" "this" { The plugin.(*GRPCProvider).PlanResourceChange request was cancelled.

Panic Output

 Stack trace from the terraform-provider-aws_v5.49.0_x5 plugin:
 
 panic: interface conversion: interface {} is nil, not map[string]interface {}
 
 goroutine 835 [running]:
 github.com/hashicorp/terraform-provider-aws/internal/service/batch.needsJobDefUpdate(0xc002f65e40)
 github.com/hashicorp/terraform-provider-aws/internal/service/batch/job_definition.go:557 +0x1074
 github.com/hashicorp/terraform-provider-aws/internal/service/batch.jobDefinitionCustomizeDiff({0x11cc35c0?, 0x1d97b3e0?}, 0xc002f65e40, {0xe?, 0xc0022b6dd0?})
 github.com/hashicorp/terraform-provider-aws/internal/service/batch/job_definition.go:452 +0x3a
 github.com/hashicorp/terraform-provider-aws/internal/service/batch.ResourceJobDefinition.Sequence.func23({0x14b36808, 0xc00303df20}, 0xc002f65e40, {0x12caafa0, 0xc0022b6dd0})
 github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/customdiff/compose.go:69 +0x84
 github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).CustomizeDiff.func5({0x14b36808?, 0xc002ff3920?}, 0xc002f65e40, {0x12caafa0, 0xc0022b6dd0})
 github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:186 +0x63
 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.Diff(0xc00110cbd0, {0x14b36808, 0xc002ff3920}, 0xc003028c30, 0xc00302a690, 0xc000010ac8, {0x12caafa0, 0xc0022b6dd0}, 0x0)
 github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/schema.go:698 +0x4b4
 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).SimpleDiff(0x14b36c38?, {0x14b36808?, 0xc002ff3920?}, 0xc003028c30, 0xc002ff3950?, {0x12caafa0?, 0xc0022b6dd0?})
 github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:962 +0xdb
 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).PlanResourceChange(0xc003505170, {0x14b36808?, 0xc002ff3830?}, 0xc002f99c20)
 github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/grpc_provider.go:798 +0x996
 github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).PlanResourceChange(0xc0003a1570, {0x14b36808?, 0xc002ff3560?}, 0xc002f99c20)
 github.com/hashicorp/terraform-plugin-mux@v0.15.0/tf5muxserver/mux_server_PlanResourceChange.go:73 +0x2ad
 github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).PlanResourceChange(0xc0002c9860, {0x14b36808?, 0xc002ff2d80?}, 0xc0016d15e0)
 github.com/hashicorp/terraform-plugin-go@v0.22.2/tfprotov5/tf5server/server.go:811 +0x3d0
 github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_PlanResourceChange_Handler({0x12a6a520, 0xc0002c9860}, {0x14b36808, 0xc002ff2d80}, 0xc002f60a80, 0x0)
 github.com/hashicorp/terraform-plugin-go@v0.22.2/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:500 +0x1a6
 google.golang.org/grpc.(*Server).processUnaryRPC(0xc000335200, {0x14b36808, 0xc002ff2cf0}, {0x14b811c0, 0xc0011ae600}, 0xc003009200, 0xc00235e450, 0x1d8f0580, 0x0)
 google.golang.org/grpc@v1.63.2/server.go:1369 +0xdf8
 google.golang.org/grpc.(*Server).handleStream(0xc000335200, {0x14b811c0, 0xc0011ae600}, 0xc003009200)
 google.golang.org/grpc@v1.63.2/server.go:1780 +0xe8b
 google.golang.org/grpc.(*Server).serveStreams.func2.1()
 google.golang.org/grpc@v1.63.2/server.go:1019 +0x8b
 created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 57
 google.golang.org/grpc@v1.63.2/server.go:1030 +0x125
 
 Error: The terraform-provider-aws_v5.49.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

@vinay-20 vinay-20 added the bug Addresses a defect in current functionality. label May 10, 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/batch Issues and PRs that pertain to the batch service. labels May 10, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label May 10, 2024
@flostadler
Copy link

Hey, I think this could be a duplicate of the error I'm facing here: #37349

@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/batch Issues and PRs that pertain to the batch service.
Projects
None yet
Development

No branches or pull requests

3 participants