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

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

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

Comments

@sangarole
Copy link

sangarole commented May 7, 2024

Terraform Core Version

1.6.6

AWS Provider Version

5.48.0

Affected Resource(s)

glue

Expected Behavior

It should create the glue job.

Actual Behavior

│ 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.48.0_x5.exe plugin:

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

goroutine 58 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/glue.expandNotificationProperty(...)
        github.com/hashicorp/terraform-provider-aws/internal/service/glue/job.go:455
github.com/hashicorp/terraform-provider-aws/internal/service/glue.resourceJobCreate({0x130c98e8, 0x1e0c6ee8}, 0x1d7f0e10, {0x11322ec0, 0x1e8439d0})
        github.com/hashicorp/terraform-provider-aws/internal/service/glue/job.go:239 +0xf47
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func8(0x1d7f0e10, {0x11322ec0, 0x1e8439d0})
        github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:113 +0x28d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x1ddaa4d0, {0x130c98e8, 0x1e0c6468}, 0x1d7f0e10, {0x11322ec0, 0x1e8439d0})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:773 +0x7e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x1ddaa4d0, {0x130c98e8, 0x1e0c6468}, 0x1e0d03f0, 0x1d7f0d20, {0x11322ec0, 0x1e8439d0})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:909 +0xac3
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x1e83e6f0, {0x130c98e8, 0x1e0c6438}, 0x1d7f5d10)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/grpc_provider.go:1078 +0xeb1
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0x1d7f14a0, {0x130c98e8, 0x1e0c6378}, 0x1d7f5d10)
        github.com/hashicorp/terraform-plugin-mux@v0.15.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x1d6
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x1d1885a0, {0x130c98e8, 0x1e0c60a8}, 0x1d868880)
        github.com/hashicorp/terraform-plugin-go@v0.22.2/tfprotov5/tf5server/server.go:846 +0x439
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x11231980, 0x1d1885a0}, {0x130c98e8, 0x1e0c60a8}, 0x1d868840, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.22.2/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x98
google.golang.org/grpc.(*Server).processUnaryRPC(0x1d16af08, {0x130c98e8, 0x1e0c6078}, {0x130e66f4, 0x1d1b0a28}, 0x1e8a8798, 0x1e3d4b10, 0x1b376ecc, 0x0)
        google.golang.org/grpc@v1.63.2/server.go:1369 +0xf44
google.golang.org/grpc.(*Server).handleStream(0x1d16af08, {0x130e66f4, 0x1d1b0a28}, 0x1e8a8798)
        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 29
        google.golang.org/grpc@v1.63.2/server.go:1030 +0x12f

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

Relevant Error/Panic Output Snippet

│ 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.48.0_x5.exe plugin:

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

goroutine 58 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/glue.expandNotificationProperty(...)
        github.com/hashicorp/terraform-provider-aws/internal/service/glue/job.go:455
github.com/hashicorp/terraform-provider-aws/internal/service/glue.resourceJobCreate({0x130c98e8, 0x1e0c6ee8}, 0x1d7f0e10, {0x11322ec0, 0x1e8439d0})
        github.com/hashicorp/terraform-provider-aws/internal/service/glue/job.go:239 +0xf47
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func8(0x1d7f0e10, {0x11322ec0, 0x1e8439d0})
        github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:113 +0x28d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x1ddaa4d0, {0x130c98e8, 0x1e0c6468}, 0x1d7f0e10, {0x11322ec0, 0x1e8439d0})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:773 +0x7e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x1ddaa4d0, {0x130c98e8, 0x1e0c6468}, 0x1e0d03f0, 0x1d7f0d20, {0x11322ec0, 0x1e8439d0})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:909 +0xac3
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x1e83e6f0, {0x130c98e8, 0x1e0c6438}, 0x1d7f5d10)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/grpc_provider.go:1078 +0xeb1
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0x1d7f14a0, {0x130c98e8, 0x1e0c6378}, 0x1d7f5d10)
        github.com/hashicorp/terraform-plugin-mux@v0.15.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x1d6
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x1d1885a0, {0x130c98e8, 0x1e0c60a8}, 0x1d868880)
        github.com/hashicorp/terraform-plugin-go@v0.22.2/tfprotov5/tf5server/server.go:846 +0x439
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x11231980, 0x1d1885a0}, {0x130c98e8, 0x1e0c60a8}, 0x1d868840, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.22.2/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x98
google.golang.org/grpc.(*Server).processUnaryRPC(0x1d16af08, {0x130c98e8, 0x1e0c6078}, {0x130e66f4, 0x1d1b0a28}, 0x1e8a8798, 0x1e3d4b10, 0x1b376ecc, 0x0)
        google.golang.org/grpc@v1.63.2/server.go:1369 +0xf44
google.golang.org/grpc.(*Server).handleStream(0x1d16af08, {0x130e66f4, 0x1d1b0a28}, 0x1e8a8798)
        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 29
        google.golang.org/grpc@v1.63.2/server.go:1030 +0x12f

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

Glue.tf

resource "aws_glue_job" "glue_job" {
  name                               = "${var.application_prefix}-${var.Environment}-${var.glue_job_name}"
  role_arn                           = var.glue_job_role_arn
  glue_version                       = var.glue_job_version
  max_retries                        = var.glue_job_max_retries
  timeout                            = var.glue_job_timeout
  worker_type                        = var.glue_job_worker_type
  number_of_workers                  = var.glue_job_worker_count
  execution_property {
    max_concurrent_runs              = var.glue_job_max_concurrentruns
  }
  notification_property {
    notify_delay_after               = var.glue_job_delay_notificationtime
  }
  command {
    script_location                  = var.glue_job_script_location
    python_version                   = var.glue_job_python_version
  }
  default_arguments                  = var.glue_job_extra_args
}

provider.tf

provider "aws" {
  region           = var.region
  default_tags {
   tags            = var.global_tags
   }    
  assume_role {
    role_arn = "arn:aws:iam::${var.account_id}:role/xxxxxxxx"
  } 
}

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

Steps to Reproduce

terraform init
terraform plan
terraform apply

Debug Output

│ 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.48.0_x5.exe plugin:

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

goroutine 58 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/glue.expandNotificationProperty(...)
        github.com/hashicorp/terraform-provider-aws/internal/service/glue/job.go:455
github.com/hashicorp/terraform-provider-aws/internal/service/glue.resourceJobCreate({0x130c98e8, 0x1e0c6ee8}, 0x1d7f0e10, {0x11322ec0, 0x1e8439d0})
        github.com/hashicorp/terraform-provider-aws/internal/service/glue/job.go:239 +0xf47
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func8(0x1d7f0e10, {0x11322ec0, 0x1e8439d0})
        github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:113 +0x28d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x1ddaa4d0, {0x130c98e8, 0x1e0c6468}, 0x1d7f0e10, {0x11322ec0, 0x1e8439d0})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:773 +0x7e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x1ddaa4d0, {0x130c98e8, 0x1e0c6468}, 0x1e0d03f0, 0x1d7f0d20, {0x11322ec0, 0x1e8439d0})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:909 +0xac3
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x1e83e6f0, {0x130c98e8, 0x1e0c6438}, 0x1d7f5d10)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/grpc_provider.go:1078 +0xeb1
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0x1d7f14a0, {0x130c98e8, 0x1e0c6378}, 0x1d7f5d10)
        github.com/hashicorp/terraform-plugin-mux@v0.15.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x1d6
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x1d1885a0, {0x130c98e8, 0x1e0c60a8}, 0x1d868880)
        github.com/hashicorp/terraform-plugin-go@v0.22.2/tfprotov5/tf5server/server.go:846 +0x439
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x11231980, 0x1d1885a0}, {0x130c98e8, 0x1e0c60a8}, 0x1d868840, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.22.2/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x98
google.golang.org/grpc.(*Server).processUnaryRPC(0x1d16af08, {0x130c98e8, 0x1e0c6078}, {0x130e66f4, 0x1d1b0a28}, 0x1e8a8798, 0x1e3d4b10, 0x1b376ecc, 0x0)
        google.golang.org/grpc@v1.63.2/server.go:1369 +0xf44
google.golang.org/grpc.(*Server).handleStream(0x1d16af08, {0x130e66f4, 0x1d1b0a28}, 0x1e8a8798)
        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 29
        google.golang.org/grpc@v1.63.2/server.go:1030 +0x12f

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

Panic Output

│ 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.48.0_x5.exe plugin:

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

goroutine 58 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/glue.expandNotificationProperty(...)
        github.com/hashicorp/terraform-provider-aws/internal/service/glue/job.go:455
github.com/hashicorp/terraform-provider-aws/internal/service/glue.resourceJobCreate({0x130c98e8, 0x1e0c6ee8}, 0x1d7f0e10, {0x11322ec0, 0x1e8439d0})
        github.com/hashicorp/terraform-provider-aws/internal/service/glue/job.go:239 +0xf47
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func8(0x1d7f0e10, {0x11322ec0, 0x1e8439d0})
        github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:113 +0x28d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x1ddaa4d0, {0x130c98e8, 0x1e0c6468}, 0x1d7f0e10, {0x11322ec0, 0x1e8439d0})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:773 +0x7e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x1ddaa4d0, {0x130c98e8, 0x1e0c6468}, 0x1e0d03f0, 0x1d7f0d20, {0x11322ec0, 0x1e8439d0})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:909 +0xac3
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x1e83e6f0, {0x130c98e8, 0x1e0c6438}, 0x1d7f5d10)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/grpc_provider.go:1078 +0xeb1
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0x1d7f14a0, {0x130c98e8, 0x1e0c6378}, 0x1d7f5d10)
        github.com/hashicorp/terraform-plugin-mux@v0.15.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x1d6
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x1d1885a0, {0x130c98e8, 0x1e0c60a8}, 0x1d868880)
        github.com/hashicorp/terraform-plugin-go@v0.22.2/tfprotov5/tf5server/server.go:846 +0x439
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x11231980, 0x1d1885a0}, {0x130c98e8, 0x1e0c60a8}, 0x1d868840, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.22.2/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x98
google.golang.org/grpc.(*Server).processUnaryRPC(0x1d16af08, {0x130c98e8, 0x1e0c6078}, {0x130e66f4, 0x1d1b0a28}, 0x1e8a8798, 0x1e3d4b10, 0x1b376ecc, 0x0)
        google.golang.org/grpc@v1.63.2/server.go:1369 +0xf44
google.golang.org/grpc.(*Server).handleStream(0x1d16af08, {0x130e66f4, 0x1d1b0a28}, 0x1e8a8798)
        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 29
        google.golang.org/grpc@v1.63.2/server.go:1030 +0x12f

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

Important Factoids

NA

References

No response

Would you like to implement a fix?

Yes

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

github-actions bot commented May 7, 2024

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/glue Issues and PRs that pertain to the glue service. labels May 7, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label May 7, 2024
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label May 7, 2024
@DanielRieske
Copy link
Contributor

Hi @sangarole 👋

This is most likely because the variable var.glue_job_delay_notificationtime was null.
I assume your variable probably looks like.

variable "glue_job_delay_notificationtime" {
	type        = number
	default     = null
}

I added a few checks to validate the value which should solve your issue.

@sangarole
Copy link
Author

Okay thanks @DanielRieske - Do you mean the null will work?

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.50.0 milestone May 10, 2024
Copy link

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

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/glue Issues and PRs that pertain to the glue service.
Projects
None yet
3 participants