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

Plugin did not respond #24168

Closed
SeamusMacRat opened this issue Apr 10, 2022 · 4 comments · Fixed by #24188
Closed

Plugin did not respond #24168

SeamusMacRat opened this issue Apr 10, 2022 · 4 comments · Fixed by #24188
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/ec2 Issues and PRs that pertain to the ec2 service.

Comments

@SeamusMacRat
Copy link

Terraform CLI and Terraform AWS Provider Version

Terraform v1.1.8
on darwin_amd64

  • provider registry.terraform.io/hashicorp/aws v4.9.0

Affected Resource(s)

  • aws_vpc_iam_scope

Terraform Configuration Files

A previously working module now fails with the error below. The change occurred after 4.9.0 was installed.

My provisioning code is:

module "scope" {
  source                         = "../../terraform-modules/terraform-aws-vpc-ipam-scope"
  aws_vpc_ipam_scope_description = "TerraformTesting"
  aws_vpc_ipam_scope_ipam_id     = "ipam-xxxxxxxxxxxxxxxxx"
}

The underlying module contains

resource "aws_vpc_ipam_scope" "vpc_ipam_scope" {
  ipam_id     = var.aws_vpc_ipam_scope_ipam_id
  description = var.aws_vpc_ipam_scope_description
}

NB: this worked until yesterday evening

Debug Output

╷
│ Error: Plugin did not respond
│ 
│   with module.scope.aws_vpc_ipam_scope.vpc_ipam_scope,
│   on ../../terraform-modules/terraform-aws-vpc-ipam-scope/main.tf line 12, in resource "aws_vpc_ipam_scope" "vpc_ipam_scope":
│   12: resource "aws_vpc_ipam_scope" "vpc_ipam_scope" {
│ 
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.
╵

Panic Output

Stack trace from the terraform-provider-aws_v4.9.0_x5 plugin:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x680ada0]

goroutine 100 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/ec2.ResourceVPCIpamScopeRead(0xc001e09c00, {0x851f980, 0xc001424000})
        github.com/hashicorp/terraform-provider-aws/internal/service/ec2/vpc_ipam_scope.go:112 +0x140
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xa862360, {0xa862360, 0xc001e27350}, 0xd, {0x851f980, 0xc001424000})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.13.0/helper/schema/resource.go:713 +0x178
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc001137500, {0xa862360, 0xc001e27350}, 0xc001d8fd40, {0x851f980, 0xc001424000})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.13.0/helper/schema/resource.go:1016 +0x47b
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc00000c810, {0xa8622b8, 0xc00067f880}, 0xc00067f900)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.13.0/helper/schema/grpc_provider.go:613 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc001d13220, {0xa862360, 0xc001e26ae0}, 0xc000d1af60)
        github.com/hashicorp/terraform-plugin-go@v0.8.0/tfprotov5/tf5server/server.go:746 +0x48c
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x9607380, 0xc001d13220}, {0xa862360, 0xc001e26ae0}, 0xc000d1af00, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.8.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:349 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00027cfc0, {0xa95ea20, 0xc000f08ea0}, 0xc001e257a0, 0xc001d1d170, 0x1005f530, 0x0)
        google.golang.org/grpc@v1.45.0/server.go:1282 +0xccf
google.golang.org/grpc.(*Server).handleStream(0xc00027cfc0, {0xa95ea20, 0xc000f08ea0}, 0xc001e257a0, 0x0)
        google.golang.org/grpc@v1.45.0/server.go:1619 +0xa2a
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        google.golang.org/grpc@v1.45.0/server.go:921 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/grpc@v1.45.0/server.go:919 +0x294

Error: The terraform-provider-aws_v4.9.0_x5 plugin crashed!

Expected Behaviour

Until yesterday, it created a scope in AWS

Actual Behaviour

It didn't get past the first stage

Steps to Reproduce

terraform init
terraform init -upgrade
terraform validate
terraform plan
bang head on desk (this step might not be required)

Notes

I'm an SDET cross-training on DevOps tools, so if I've made a complete eejit of myself, please be gentle ;)

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/ec2 Issues and PRs that pertain to the ec2 service. labels Apr 10, 2022
@SeamusMacRat
Copy link
Author

NB: removing the local lock files cleaned up the issue.

@anGie44 anGie44 removed the needs-triage Waiting for first response or review from a maintainer. label Apr 11, 2022
@SeamusMacRat
Copy link
Author

Nice one @anGie44. Glad to see there was something underneath it all.

Have a great day

@anGie44
Copy link
Contributor

anGie44 commented Apr 12, 2022

Yep! and thank your for reporting this issue @SeamusMacRat

@github-actions
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 May 13, 2022
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/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
2 participants