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

help plz - error Creating OrgvDC for an already existing Organization #1335

Open
GORO9991 opened this issue Sep 24, 2024 · 4 comments
Open
Assignees

Comments

@GORO9991
Copy link

hello, im new to Tf and whenever i try creating an OrgvDC for an existing Organization, im getting an error as per below:
"Error: The terraform-provider-vcd_v3.10.0 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."
below is a snippet of the main.tf containing the lines for this OrgvDC creation where everything looks straight forward:

resource "vcd_org_vdc" "vdc-name" {
name = var.vdc_name
org = var.org_name
allocation_model = var.vdc_alloc_model
provider_vdc_name = var.vdc_pvdc_name
network_quota = 50
compute_capacity {
cpu {
limit = 0
}
memory {
limit = 0
}
}
storage_profile {
name = var.vdc_storage_name
enabled = true
limit = 10240
default = true
}
enabled = true
enable_thin_provisioning = true
enable_fast_provisioning = true
delete_force = true
delete_recursive = true
depends_on = [ vcd_org.org-name ]
}

Any help is much appreciated
Rgds

@adambarreiro
Copy link
Collaborator

Hi @GORO9991, could you provide the full log with the stacktrace from the output?

Also the VCD provider log would be useful (check how to enable here, with logging=true and logging_file)

Thanks!

@adambarreiro adambarreiro self-assigned this Sep 24, 2024
@GORO9991
Copy link
Author

hello @adambarreiro and many thanks for your reply,
the full output message is as follows:
Error: Plugin did not respond

│ with vcd_org_vdc.vdc-name,
│ on main.tf line 61, in resource "vcd_org_vdc" "vdc-name":
│ 61: resource "vcd_org_vdc" "vdc-name" {

│ 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-vcd_v3.10.0 plugin:

panic: assignment to entry in nil map

goroutine 45 [running]:
github.com/vmware/go-vcloud-director/v2/govcd.(*Client).cumulativeQueryWithHeaders(0xc000257b80, {0xff4a62, 0x19}, 0x4?, 0x0?, 0x0?)
github.com/vmware/go-vcloud-director/[email protected]/govcd/query_metadata.go:251 +0x2f1
github.com/vmware/go-vcloud-director/v2/govcd.(*Client).cumulativeQuery(...)
github.com/vmware/go-vcloud-director/[email protected]/govcd/query_metadata.go:188
github.com/vmware/go-vcloud-director/v2/govcd.(*VCDClient).QueryProviderVdcStorageProfileByName(0xc000257b80, {0xc000043600, 0x1c}, {0xc00025a180, 0x56})
github.com/vmware/go-vcloud-director/[email protected]/govcd/system.go:757 +0x11c
github.com/vmware/terraform-provider-vcd/v3/vcd.getVcdVdcInput(0xc0004d5bd8?, 0xc00072a640)
github.com/vmware/terraform-provider-vcd/v3/vcd/resource_vcd_org_vdc.go:1258 +0x137b
github.com/vmware/terraform-provider-vcd/v3/vcd.resourceVcdVdcCreate({0x11a4458, 0xc0007193e0}, 0x0?, {0xfdab60?, 0xc00072a640})
github.com/vmware/terraform-provider-vcd/v3/vcd/resource_vcd_org_vdc.go:319 +0x505
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc000384380, {0x11a4490, 0xc0004a73e0}, 0xd?, {0xfdab60, 0xc00072a640})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:733 +0x12e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000384380, {0x11a4490, 0xc0004a73e0}, 0xc00009ca90, 0xc000238e00, {0xfdab60, 0xc00072a640})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:864 +0xa85
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc000015b30, {0x11a4490?, 0xc0004a72c0?}, 0xc000213d10)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1024 +0xe8d
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0002141e0, {0x11a4490?, 0xc0004a68d0?}, 0xc0008158f0)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:821 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0xf99e00?, 0xc0002141e0}, {0x11a4490, 0xc0004a68d0}, 0xc000815880, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:422 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003441e0, {0x11a8be0, 0xc0001204e0}, 0xc0007edd40, 0xc0002031d0, 0x17a42a0, 0x0)
google.golang.org/[email protected]/server.go:1337 +0xdf0
google.golang.org/grpc.(*Server).handleStream(0xc0003441e0, {0x11a8be0, 0xc0001204e0}, 0xc0007edd40, 0x0)
google.golang.org/[email protected]/server.go:1714 +0xa2f
google.golang.org/grpc.(*Server).serveStreams.func1.1()
google.golang.org/[email protected]/server.go:959 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/[email protected]/server.go:957 +0x18c

Error: The terraform-provider-vcd_v3.10.0 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.

@adambarreiro
Copy link
Collaborator

I think it's the same issue reported here: #1098, it was fixed in Provider v3.11.0.

I remember you mentioned you were using VCD 10.3, which v3.11.0 does not support. Any chances of upgrading VCD?

@GORO9991
Copy link
Author

GORO9991 commented Oct 1, 2024

thanks @adambarreiro for your reply
definitely we re planning to upgrade vCD to newer version and it s on our planned activities for the coming days
Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants