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).ReadResource call. #31924

Closed
FabianPi opened this issue Jun 13, 2023 · 5 comments · Fixed by #31928
Assignees
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/ssm Issues and PRs that pertain to the ssm service.
Milestone

Comments

@FabianPi
Copy link

FabianPi commented Jun 13, 2023

Terraform Core Version

1.5.0

AWS Provider Version

5.3.0

Affected Resource(s)

No response

Expected Behavior

terraform plan executes without error

Actual Behavior

Running terraform plan with AWS provider v5.3.0 returns errors: Error: Request cancelled and Error: Plugin did not respond.

Using AWS provider v5.2.0 works fine

╷
│ Error: Request cancelled
│
│   with aws_ssm_default_patch_baseline.patch,
│   on main.tf line 10, in resource "aws_ssm_default_patch_baseline" "patch":
│  10: resource "aws_ssm_default_patch_baseline" "patch" {
│
│ The plugin.(*GRPCProvider).UpgradeResourceState request was cancelled.
╵
╷
│ Error: Plugin did not respond
│
│   with aws_config_conformance_pack.base,
│   on main.tf line 17, in resource "aws_config_conformance_pack" "base":
│   17: resource "aws_config_conformance_pack" "base" {
│
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more
│ details.

Relevant Error/Panic Output Snippet

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

panic: interface conversion: *conns.AWSClient is not ssm.ssmClient: missing method SSMClient

goroutine 665 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/ssm.resourceDefaultPatchBaselineRead({0xf16dbc0, 0xc0047d18c0}, 0xc006ec3e80, {0xdbdbd60?, 0xc000305c00})
        github.com/hashicorp/terraform-provider-aws/internal/service/ssm/default_patch_baseline.go:202 +0x5d
github.com/hashicorp/terraform-provider-aws/internal/provider.interceptedHandler[...].func1(0x0?, {0xdbdbd60?, 0xc000305c00?})
        github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:108 +0x178
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xf16dbc0?, {0xf16dbc0?, 0xc0047d0f60?}, 0xd?, {0xdbdbd60?, 0xc000305c00?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/resource.go:719 +0x87
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0040729a0, {0xf16dbc0, 0xc0047d0f60}, 0xc0071c8b60, {0xdbdbd60, 0xc000305c00})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/resource.go:1015 +0x585
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc00413f098, {0xf16dbc0?, 0xc0047d0ba0?}, 0xc007291440)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/grpc_provider.go:613 +0x4a5
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.muxServer.ReadResource({0xc005ce0990, 0xc005ce09f0, {0xc008d16c20, 0x2, 0x2}, {0x0, 0x0, 0x0}, {0x0, 0x0, ...}, ...}, ...)
        github.com/hashicorp/terraform-plugin-mux@v0.10.0/tf5muxserver/mux_server_ReadResource.go:26 +0x102
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc00283f860, {0xf16dbc0?, 0xc0044a3440?}, 0xc0071a9680)
        github.com/hashicorp/terraform-plugin-go@v0.15.0/tfprotov5/tf5server/server.go:748 +0x4b1
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0xd8c35a0?, 0xc00283f860}, {0xf16dbc0, 0xc0044a3440}, 0xc00083acb0, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.15.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:383 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0084d1e00, {0xf17e5e0, 0xc0005f8000}, 0xc0071cfc20, 0xc008d53f20, 0x15f0ce10, 0x0)
        google.golang.org/grpc@v1.54.0/server.go:1345 +0xdf0
google.golang.org/grpc.(*Server).handleStream(0xc0084d1e00, {0xf17e5e0, 0xc0005f8000}, 0xc0071cfc20, 0x0)
        google.golang.org/grpc@v1.54.0/server.go:1722 +0xa2f
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        google.golang.org/grpc@v1.54.0/server.go:966 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/grpc@v1.54.0/server.go:964 +0x28a

Error: The terraform-provider-aws_v5.3.0_x5.exe plugin crashed!

Terraform Configuration Files

resource "aws_ssm_default_patch_baseline" "patch" {
  baseline_id      = aws_ssm_patch_baseline.account.id
  operating_system = "WINDOWS"
}

Steps to Reproduce

  1. Run terraform plan with aws provider v5.3.0

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@FabianPi FabianPi added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Jun 13, 2023
@github-actions
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/configservice Issues and PRs that pertain to the configservice service. service/ssm Issues and PRs that pertain to the ssm service. labels Jun 13, 2023
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Jun 13, 2023
@ewbankkit ewbankkit removed the service/configservice Issues and PRs that pertain to the configservice service. label Jun 13, 2023
@ewbankkit
Copy link
Contributor

func resourceDefaultPatchBaselineRead(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics {
conn := meta.(ssmClient).SSMClient()

Relates #31894.

@ewbankkit ewbankkit added the regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. label Jun 13, 2023
@ewbankkit ewbankkit self-assigned this Jun 13, 2023
@sreekanth3107
Copy link

@ewbankkit i have similar issue with creating lambda #31929

@github-actions github-actions bot added this to the v5.4.0 milestone Jun 13, 2023
@github-actions
Copy link

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

@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 Jul 16, 2023
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. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/ssm Issues and PRs that pertain to the ssm service.
Projects
None yet
4 participants