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] - Vultr provider - terraform apply throws error on 2.18.1 - panic: interface conversion: interface {} is nil, not bool #446

Closed
andrey-zap81 opened this issue Dec 17, 2023 · 2 comments
Assignees
Labels

Comments

@andrey-zap81
Copy link

Describe the bug
While creating a resurce of Vultr Provider (bare metal VM) got the following error:

vultr_bare_metal_server.server[0]: Creating...
╷
│ Error: Plugin did not respond
│
│   with vultr_bare_metal_server.server[0],
│   on main.tf line 1, in resource "vultr_bare_metal_server" "server":
│    1: resource "vultr_bare_metal_server" "server" {
│
│ 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-vultr_v2.18.0 plugin:

panic: interface conversion: interface {} is nil, not bool

goroutine 55 [running]:
github.com/vultr/terraform-provider-vultr/vultr.resourceVultrBareMetalServerCreate({0x1016515a8, 0x14000802300}, 0x14000812a80, {0x1015358c0?, 0x140005c82b8?})
	github.com/vultr/terraform-provider-vultr/vultr/resource_vultr_bare_metal_server.go:216 +0xf00
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x140003f4000, {0x1016515e0, 0x1400048ae10}, 0xd?, {0x1015358c0, 0x140005c82b8})
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.30.0/helper/schema/resource.go:778 +0xe8
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x140003f4000, {0x1016515e0, 0x1400048ae10}, 0x140008048f0, 0x14000812900, {0x1015358c0, 0x140005c82b8})
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.30.0/helper/schema/resource.go:909 +0x8a0
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x14000516000, {0x1016515e0?, 0x1400048acf0?}, 0x140005383c0)
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.30.0/helper/schema/grpc_provider.go:1072 +0xb78
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x140003b60a0, {0x1016515e0?, 0x1400048a2a0?}, 0x14000688150)
	github.com/hashicorp/terraform-plugin-go@v0.19.0/tfprotov5/tf5server/server.go:859 +0x3bc
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x101619460?, 0x140003b60a0}, {0x1016515e0, 0x1400048a2a0}, 0x140006880e0, 0x0)
	github.com/hashicorp/terraform-plugin-go@v0.19.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:467 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0x140001d21e0, {0x101655818, 0x140005a2340}, 0x14000260900, 0x140003d7350, 0x101b7e3f8, 0x0)
	google.golang.org/grpc@v1.57.1/server.go:1358 +0xcb4
google.golang.org/grpc.(*Server).handleStream(0x140001d21e0, {0x101655818, 0x140005a2340}, 0x14000260900, 0x0)
	google.golang.org/grpc@v1.57.1/server.go:1735 +0x82c
google.golang.org/grpc.(*Server).serveStreams.func1.1()
	google.golang.org/grpc@v1.57.1/server.go:970 +0xb4
created by google.golang.org/grpc.(*Server).serveStreams.func1
	google.golang.org/grpc@v1.57.1/server.go:981 +0x174

Error: The terraform-provider-vultr_v2.18.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.

ERRO[0008] 1 error occurred:
	* exit status 1

To Reproduce
Steps to reproduce the behavior:

  1. use vultr/vultr v2.18.0 provider
  2. try to "apply" bare metal resource: "vultr_bare_metal_server"
  3. See error

Expected behavior
expected to create the resource without any issues - vultr_bare_metal_server (works on 2.17.1 version)

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

Desktop (please complete the following information where applicable:

  • OS: MAC
  • Language Version: vultr/vultr v2.18.0 provider, used terragrunt (but its uses terrafrm so...)

Additional context

WORKS ON 2.17.1

Add any other context about the problem here.

@andrey-zap81
Copy link
Author

resource example:

resource "vultr_bare_metal_server" "server" {
  count = var.instance_count

  region      = var.common_config.region
  os_id       = var.common_config.os_id
  plan        = var.common_config.plan
  label       = "${var.common_config.hostname}-${var.common_config.region}-${count.index}"
  tags        = var.common_config.tags
  hostname    = "${var.common_config.hostname}-${var.common_config.region}-${count.index}"
  ssh_key_ids = var.common_config.ssh_key_ids
  script_id   = data.vultr_startup_script.ipxe_startup_script.id
  user_data   = var.common_config.user_data
}

@optik-aper
Copy link
Member

@andrey-zap81 thanks for the thorough bug report. This should be resolved in #452 and will be in the next minor release this week.

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

No branches or pull requests

2 participants