terraform-provider-vra: terraform plan fails with CRASH LOG

vRA version The vRA Cloud / 8.x version where is issue is found.

Terraform version

Terraform v0.12.28
+ provider.random v2.3.0
+ provider.vra v0.3.0

terraform-provider-vra plugin version

Terraform v0.12.28
+ provider.random v2.3.0
+ provider.vra v0.3.0

Describe the bug Initializes successfully but fails when running terraform plan and also generated crash.log file.

To Reproduce Steps to reproduce the behavior:

  1. Terraform config file (for updates, config file before applying the change and the change made)
data "vra_project" "this" {
  name = var.project_template_name
}

data "vra_catalog_item" "this" {
  name            = var.catalog_item_name
  expand_versions = true
}

resource "vra_deployment" "this" {
  name                 = var.deployment_name
  description          = var.deployment_desc
  project_id           = data.vra_project.this.id
  catalog_item_id      = data.vra_catalog_item.this.id

  inputs = {
.
.
.

  }

}


  1. terraform init followed by terraform plan
  2. Error
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

module.onboard-project.data.vra_catalog_item.this: Refreshing state...
module.onboard-project.data.vra_project.this: Refreshing state...

Error: rpc error: code = Unavailable desc = transport is closing



Error: rpc error: code = Unavailable desc = transport is closing


panic: set item just set doesn't exist
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe:
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe: goroutine 69 [running]:
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*MapFieldWriter).setSet(0xc0002320a0, 0xc0001ff840, 0x1, 0x1, 0x130c380, 0xc00042c140, 0xc0005ba640, 0x20, 0x2030000)
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe:  github.com/hashicorp/terraform-plugin-sdk@v1.15.0/helper/schema/field_writer_map.go:328 +0xc25
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*MapFieldWriter).set(0xc0002320a0, 0xc0001ff840, 0x1, 0x1, 0x130c380, 0xc00021bfe0, 0x1, 0x1)
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe:  github.com/hashicorp/terraform-plugin-sdk@v1.15.0/helper/schema/field_writer_map.go:107 +0x25a
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*MapFieldWriter).WriteField(0xc0002320a0, 0xc0001ff840, 0x1, 0x1, 0x130c380, 0xc00021bfe0, 0x0, 0x0)
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe:  github.com/hashicorp/terraform-plugin-sdk@v1.15.0/helper/schema/field_writer_map.go:89 +0x408
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ResourceData).Set(0xc0002401c0, 0x15b1334, 0xb, 0x130c380, 0xc00021bfe0, 0x0, 0x0)
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe:  github.com/hashicorp/terraform-plugin-sdk@v1.15.0/helper/schema/resource_data.go:196 +0x1d9
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe: github.com/vmware/terraform-provider-vra/vra.dataSourceProjectRead.func1(0xc00064f560)
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe:  github.com/vmware/terraform-provider-vra/vra/data_source_project.go:152 +0x145
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe: github.com/vmware/terraform-provider-vra/vra.dataSourceProjectRead(0xc0002401c0, 0x12ed440, 0xc000004a00, 0xc0002401c0, 0x0)
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe:  github.com/vmware/terraform-provider-vra/vra/data_source_project.go:194 +0x493
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).ReadDataApply(0xc00042fef0, 0xc0000054a0, 0x12ed440, 0xc000004a00, 0xc00020d760, 0x1, 0x0)
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe:  github.com/hashicorp/terraform-plugin-sdk@v1.15.0/helper/schema/resource.go:403 +0x94
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).ReadDataApply(0xc000720000, 0xc0008bbad0, 0xc0000054a0, 0xc0000054a0, 0x0, 0x0)
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe:  github.com/hashicorp/terraform-plugin-sdk@v1.15.0/helper/schema/provider.go:451 +0x96
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe: github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ReadDataSource(0xc0000cc988, 0x1798660, 0xc000566840, 0xc00004f2c0, 0xc0000cc988, 0xc000566840, 0xc000695b78)
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe:  github.com/hashicorp/terraform-plugin-sdk@v1.15.0/internal/helper/plugin/grpc_provider.go:1036 +0x445
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe: github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadDataSource_Handler(0x1561280, 0xc0000cc988, 0x1798660, 0xc000566840, 0xc00048b140, 0x0, 0x1798660, 0xc000566840, 0xc0004fab60, 0xc4)
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe:  github.com/hashicorp/terraform-plugin-sdk@v1.15.0/internal/tfplugin5/tfplugin5.pb.go:3341 +0x214
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe: google.golang.org/grpc.(*Server).processUnaryRPC(0xc000504900, 0x17a3b00, 0xc000505680, 0xc0003bfa00, 0xc0008a4900, 0x1f72fb0, 0x0, 0x0, 0x0)
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe:  google.golang.org/grpc@v1.27.1/server.go:1024 +0x522
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe: google.golang.org/grpc.(*Server).handleStream(0xc000504900, 0x17a3b00, 0xc000505680, 0xc0003bfa00, 0x0)
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe:  google.golang.org/grpc@v1.27.1/server.go:1313 +0xd54
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe: google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc0002222c0, 0xc000504900, 0x17a3b00, 0xc000505680, 0xc0003bfa00)
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe:  google.golang.org/grpc@v1.27.1/server.go:722 +0xa8
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe: created by google.golang.org/grpc.(*Server).serveStreams.func1
2020-08-28T14:40:53.372-0400 [DEBUG] plugin.terraform-provider-vra_v0.3.0.exe:  google.golang.org/grpc@v1.27.1/server.go:720 +0xa8
2020-08-28T14:40:53.375-0400 [WARN]  plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2020/08/28 14:40:53 [ERROR] module.onboard-project: eval: *terraform.EvalReadData, err: rpc error: code = Unavailable desc = transport is closing
2020/08/28 14:40:53 [ERROR] module.onboard-project: eval: *terraform.EvalReadData, err: rpc error: code = Unavailable desc = transport is closing
2020/08/28 14:40:53 [ERROR] module.onboard-project: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020/08/28 14:40:53 [ERROR] module.onboard-project: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020/08/28 14:40:53 [TRACE] [walkRefresh] Exiting eval tree: module.onboard-project.data.vra_catalog_item.this
2020/08/28 14:40:53 [TRACE] [walkRefresh] Exiting eval tree: module.onboard-project.data.vra_project.this
2020/08/28 14:40:53 [TRACE] vertex "module.onboard-project.data.vra_project.this": visit complete
2020/08/28 14:40:53 [TRACE] vertex "module.onboard-project.data.vra_project.this": dynamic subgraph encountered errors
2020/08/28 14:40:53 [TRACE] vertex "module.onboard-project.data.vra_project.this": visit complete
2020/08/28 14:40:53 [TRACE] vertex "module.onboard-project.data.vra_catalog_item.this": visit complete
2020/08/28 14:40:53 [TRACE] vertex "module.onboard-project.data.vra_catalog_item.this": dynamic subgraph encountered errors
2020/08/28 14:40:53 [TRACE] vertex "module.onboard-project.data.vra_catalog_item.this": visit complete
2020/08/28 14:40:53 [TRACE] dag/walk: upstream of "module.onboard-project.provider.vra (close)" errored, so skipping
2020/08/28 14:40:53 [TRACE] dag/walk: upstream of "root" errored, so skipping
2020/08/28 14:40:53 [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info
2020/08/28 14:40:53 [TRACE] statemgr.Filesystem: unlocked by closing terraform.tfstate
2020-08-28T14:40:53.386-0400 [DEBUG] plugin: plugin process exited: path=C:\Users\tfm_vra-newproject\Test\.terraform\plugins\windows_amd64\terraform-provider-vra_v0.3.0.exe pid=12124 error="exit status 2"
2020-08-28T14:40:53.386-0400 [DEBUG] plugin: plugin exited



!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Terraform crashed! This is always indicative of a bug within Terraform.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Terraform[1] so that we can fix this.

When reporting bugs, please include your terraform version. That
information is available on the first line of crash.log. You can also
get it by running 'terraform --version' on the command line.

SECURITY WARNING: the "crash.log" file that was created may contain
sensitive information that must be redacted before it is safe to share
on the issue tracker.

[1]: https://github.com/hashicorp/terraform/issues

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Expected behavior terraform plan command should return 2 resources to be created.

Screenshots If applicable, add screenshots to help explain your problem.

Logs Attach logs to help debug the issue

  1. Attach vra-terraform.log
  2. Attach Terraform console log (Enable terraform logs following the steps mentioned in https://www.terraform.io/docs/configuration/environment-variables.html)
  3. crash.log(if any)

Desktop (please complete the following information):

  • OS: Windows 10.

Additional context Add any other context about the problem here.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (8 by maintainers)

Commits related to this issue

Most upvoted comments

@dmettem, Its vra 8.1. sorry I missed to put that code

provider "vra" {
  url           = var.url
  refresh_token = var.refresh_token
  insecure      = var.insecure
}