terraform-provider-vault icon indicating copy to clipboard operation
terraform-provider-vault copied to clipboard

Provider crashes when specifying custom header "X-Vault-Wrap-TTL"

Open olastor opened this issue 2 years ago • 0 comments

Version: Terraform v1.2.3 on linux_amd64

Code Example:

provider "vault" {
  address = var.vault_address
  token = var.vault_token
}

provider "vault" {
  alias = "test"
  address = var.vault_address
  token = var.vault_token

  headers {
    name = "X-Vault-Wrap-TTL"
    value = "600"
  }
}

resource "vault_token" "mytoken" {
  provider = vault.test
}

Error:

Stack trace from the terraform-provider-vault_v3.7.0_x5 plugin:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xdd070d]

goroutine 69 [running]:
github.com/hashicorp/terraform-provider-vault/internal/provider.setChildToken(0xc000bf0dc0, 0xc000bf0dc0)
	github.com/hashicorp/terraform-provider-vault/internal/provider/meta.go:325 +0x3ad
github.com/hashicorp/terraform-provider-vault/internal/provider.NewProviderMeta(0xc00074b000)
	github.com/hashicorp/terraform-provider-vault/internal/provider/meta.go:219 +0xa31
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Provider).Configure(0xc0002807e0, {0x14a0030, 0xc000bf99b0}, 0xd)
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/provider.go:287 +0x1f7
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ConfigureProvider(0xc00000ca68, {0x149ff88, 0xc00002e100}, 0xc0007204b0)
	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:557 +0x345
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).Configure(0xc000266320, {0x14a0030, 0xc000bf8750}, 0xc000129e80)
	github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:555 +0x32b
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_Configure_Handler({0x11bbce0, 0xc000266320}, {0x14a0030, 0xc000bf8750}, 0xc00072a5a0, 0x0)
	github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:331 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00061c8c0, {0x14b7388, 0xc000166340}, 0xc000822a20, 0xc0006ea780, 0x1cea558, 0x0)
	google.golang.org/[email protected]/server.go:1282 +0xccf
google.golang.org/grpc.(*Server).handleStream(0xc00061c8c0, {0x14b7388, 0xc000166340}, 0xc000822a20, 0x0)
	google.golang.org/[email protected]/server.go:1619 +0xa2a
google.golang.org/grpc.(*Server).serveStreams.func1.2()
	google.golang.org/[email protected]/server.go:921 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
	google.golang.org/[email protected]/server.go:919 +0x294

Error: The terraform-provider-vault_v3.7.0_x5 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.

olastor avatar Jun 22 '22 10:06 olastor