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

Error: The terraform-provider-aws_v4.15.1_x5.exe plugin crashed! #25102

Open
malcolmpang19 opened this issue May 30, 2022 · 1 comment
Open
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/workspaces Issues and PRs that pertain to the workspaces service.

Comments

@malcolmpang19
Copy link

malcolmpang19 commented May 30, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • 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
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

Terraform v1.1.9
on windows_amd64

provider registry.terraform.io/hashicorp/aws v4.15.1

Affected Resource(s)

aws_XXXXX

Terraform Configuration Files

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "4.15.1"
    }
  }
}

provider "aws" {
  profile = "default"
  region  = "ap-southeast-1"
}

#Amazon Workspace
data "aws_workspaces_bundle" "value_windows_10" {
  bundle_id = "wsb-8vbljg4r6" #Standard with Windows 10 (Server 2016 based)
}

data "aws_workspaces_directory" "devtest-direct" {
  directory_id = "d-96671fa400"
}

resource "aws_workspaces_workspace" "devtest" {
  directory_id = data.aws_workspaces_directory.devtest-direct.id
  bundle_id    = data.aws_workspaces_bundle.value_windows_10.id
  user_name    = "hi"

  root_volume_encryption_enabled = true
  user_volume_encryption_enabled = true
  volume_encryption_key          = "alias/aws/workspaces"

  workspace_properties {
    compute_type_name                         = "VALUE"
    user_volume_size_gib                      = 10
    root_volume_size_gib                      = 80
    running_mode                              = "AUTO_STOP"
    running_mode_auto_stop_timeout_in_minutes = 60
  }

  tags = {
    Department = "IT"
  }
}

Debug Output

 Error: Plugin did not respond
│
│   with data.aws_workspaces_bundle.value_windows_10,
│   on main.tf line 57, in data "aws_workspaces_bundle" "value_windows_10":
│   57: data "aws_workspaces_bundle" "value_windows_10" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadDataSource call. The plugin logs    
│ may contain more details.
╵
╷
│ Error: Plugin did not respond
│
│   with data.aws_workspaces_directory.devtest-direct,
│   on main.tf line 61, in data "aws_workspaces_directory" "devtest-direct":
│   61: data "aws_workspaces_directory" "devtest-direct" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadDataSource call. The plugin logs    
│ may contain more details.
╵

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

panic: interface conversion: interface {} is nil, not *workspaces.WorkspaceDirectory

goroutine 114 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/workspaces.dataSourceDirectoryRead(0xc002f18680, {0x7fc3f20, 0xc000696000})
        github.com/hashicorp/terraform-provider-aws/internal/service/workspaces/directory_data_source.go:182 +0x7cd
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xa51eb00, {0xa51eb00, 0xc002f0a780}, 0xd, {0x7fc3f20, 0xc000696000})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.16.0/helper/schema/resource.go:712 +0x178
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).ReadDataApply(0xc0000201c0, {0xa51eb00, 0xc002f0a780}, 0xc002f18580, {0x7fc3f20, 0xc000696000})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.16.0/helper/schema/resource.go:943 +0x145
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadDataSource(0xc0000056c8, {0xa51ea58, 0xc000232c00}, 0xc00030a3e0)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.16.0/helper/schema/grpc_provider.go:1179 +0x408
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadDataSource(0xc001ab0640, {0xa51eb00, 0xc002f0a1b0}, 
0xc002bda0a0)
        github.com/hashicorp/terraform-plugin-go@v0.9.0/tfprotov5/tf5server/server.go:657 +0x45f
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadDataSource_Handler({0x91bffc0, 0xc001ab0640}, {0xa51eb00, 0xc002f0a1b0}, 0xc0016680c0, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.9.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:421 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0001fefc0, {0xa62acd0, 0xc000e921a0}, 0xc002f0e000, 0xc001ab8840, 0x10229cb0, 0x0)
        google.golang.org/grpc@v1.45.0/server.go:1282 +0xccf
google.golang.org/grpc.(*Server).handleStream(0xc0001fefc0, {0xa62acd0, 0xc000e921a0}, 0xc002f0e000, 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.15.1_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.
@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/workspaces Issues and PRs that pertain to the workspaces service. labels May 30, 2022
@justinretzolk
Copy link
Member

Hey @malcolmpang19 👋 Thank you for taking the time to raise this! So that we have all of the necessary information in order to look into this, can you supply full (redacted as necessary) debug logs as well?

@justinretzolk justinretzolk added waiting-response Maintainers are waiting on response from community or contributor. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 6, 2022
@github-actions github-actions bot removed the waiting-response Maintainers are waiting on response from community or contributor. label Nov 30, 2022
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/workspaces Issues and PRs that pertain to the workspaces service.
Projects
None yet
Development

No branches or pull requests

2 participants