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

hashicorp/boundary provider 1.2.0 unable to use recovery_kms_hcl in provider from tofu registry #1433

Open
devlsc opened this issue Jan 13, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@devlsc
Copy link

devlsc commented Jan 13, 2025

Thank you for reporting an issue.

First of all thanks for the nice work and the quick fix last time :)

I am currently trying to use the hashicorp/boundary provider v1.2.0 and configuring the provider via recovery_kms_hcl like this:

  addr             = <BOUNDARY_ADDR>
  recovery_kms_hcl = <<EOT
kms "transit" {
    purpose = "recovery"
    address = <VAULT_ADDR>
    token = <VAULT_TOKEN>
    key_name = <KEY_NAME>
    mount_path = <MOUNT_PATH>
}
EOT
}

unfortunately that does not seem to work with the tofu provider but works fine with the terraform provider.
It fails with the error message:

   Error: error reading wrappers from "recovery_kms_hcl": Error configuring kms: plugin is nil 
     with provider["registry.opentofu.org/hashicorp/boundary"],
     on main.tf line 14, in provider "boundary":
     14: provider "boundary" {

This issue from the hashicorp boundary provider looks a like: hashicorp/terraform-provider-boundary#209

OpenTofu Version

OpenTofu v1.9.0
on linux_amd64

OpenTofu Configuration Files

provider "boundary" {
  addr             = <BOUNDARY_ADDR>
  recovery_kms_hcl = <<EOT
kms "transit" {
    purpose = "recovery"
    address = <VAULT_ADDR>
    token = <VAULT_TOKEN>
    key_name = <KEY_NAME>
    mount_path = <MOUNT_PATH>
}
EOT
}
@devlsc devlsc added the bug Something isn't working label Jan 13, 2025
@cam72cam
Copy link
Member

Hi, could you provide the output of tofu version which includes the provider information? Also TF_LOG=debug logs would be appreciated!

@devlsc
Copy link
Author

devlsc commented Jan 13, 2025

Hi,
thanks for the response
just in case it helps: https://github.com/nitrobox/reproduce-boundary

and here the requested information:

tofu version

OpenTofu v1.9.0
on linux_amd64
+ provider registry.opentofu.org/hashicorp/boundary v1.2.0

TF_LOG=DEBUG tofu plan:

2025-01-13T15:33:02.009+0100 [INFO]  OpenTofu version: 1.9.0
2025-01-13T15:33:02.009+0100 [DEBUG] using github.com/hashicorp/go-tfe v1.36.0
2025-01-13T15:33:02.009+0100 [DEBUG] using github.com/opentofu/hcl/v2 v2.0.0-20240814143621-8048794c5c52
2025-01-13T15:33:02.009+0100 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1
2025-01-13T15:33:02.009+0100 [DEBUG] using github.com/zclconf/go-cty v1.14.4
2025-01-13T15:33:02.010+0100 [INFO]  Go runtime version: go1.23.4
2025-01-13T15:33:02.010+0100 [INFO]  CLI args: []string{"tofu", "plan"}
2025-01-13T15:33:02.010+0100 [DEBUG] Attempting to open CLI config file: /home/test/.tofurc
2025-01-13T15:33:02.010+0100 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2025-01-13T15:33:02.010+0100 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2025-01-13T15:33:02.010+0100 [DEBUG] ignoring non-existing provider search directory /home/test/.terraform.d/plugins
2025-01-13T15:33:02.010+0100 [DEBUG] ignoring non-existing provider search directory /home/test/.local/share/terraform/plugins
2025-01-13T15:33:02.010+0100 [DEBUG] ignoring non-existing provider search directory /home/test/.local/share/flatpak/exports/share/terraform/plugins
2025-01-13T15:33:02.010+0100 [DEBUG] ignoring non-existing provider search directory /var/lib/flatpak/exports/share/terraform/plugins
2025-01-13T15:33:02.010+0100 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins
2025-01-13T15:33:02.010+0100 [DEBUG] ignoring non-existing provider search directory /usr/share/terraform/plugins
2025-01-13T15:33:02.010+0100 [DEBUG] Found the config directory: /home/test/.terraform.d
2025-01-13T15:33:02.010+0100 [INFO]  CLI command args: []string{"plan"}
2025-01-13T15:33:02.012+0100 [DEBUG] New state was assigned lineage "d888f202-41c9-4b20-b763-680cec4db6be"
2025-01-13T15:33:02.027+0100 [DEBUG] checking for provisioner in "."
2025-01-13T15:33:02.028+0100 [DEBUG] checking for provisioner in "/usr/bin"
2025-01-13T15:33:02.028+0100 [INFO]  backend/local: starting Plan operation
2025-01-13T15:33:02.029+0100 [DEBUG] created provider logger: level=debug
2025-01-13T15:33:02.029+0100 [INFO]  provider: configuring client automatic mTLS
2025-01-13T15:33:02.034+0100 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.opentofu.org/hashicorp/boundary/1.2.0/linux_amd64/terraform-provider-boundary args=[".terraform/providers/registry.opentofu.org/hashicorp/boundary/1.2.0/linux_amd64/terraform-provider-boundary"]
2025-01-13T15:33:02.035+0100 [DEBUG] provider: plugin started: path=.terraform/providers/registry.opentofu.org/hashicorp/boundary/1.2.0/linux_amd64/terraform-provider-boundary pid=302476
2025-01-13T15:33:02.035+0100 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.opentofu.org/hashicorp/boundary/1.2.0/linux_amd64/terraform-provider-boundary
2025-01-13T15:33:02.040+0100 [INFO]  provider.terraform-provider-boundary: configuring server automatic mTLS: timestamp="2025-01-13T15:33:02.040+0100"
2025-01-13T15:33:02.046+0100 [DEBUG] provider: using plugin: version=5
2025-01-13T15:33:02.046+0100 [DEBUG] provider.terraform-provider-boundary: plugin address: address=/tmp/plugin1592727310 network=unix timestamp="2025-01-13T15:33:02.045+0100"
2025-01-13T15:33:02.057+0100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-01-13T15:33:02.059+0100 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.opentofu.org/hashicorp/boundary/1.2.0/linux_amd64/terraform-provider-boundary pid=302476
2025-01-13T15:33:02.059+0100 [DEBUG] provider: plugin exited
2025-01-13T15:33:02.059+0100 [DEBUG] Building and walking validate graph
2025-01-13T15:33:02.059+0100 [DEBUG] ProviderTransformer: "boundary_scope.global" (*tofu.NodeValidatableResource) needs provider["registry.opentofu.org/hashicorp/boundary"]
2025-01-13T15:33:02.059+0100 [DEBUG] ReferenceTransformer: "boundary_scope.global" references: []
2025-01-13T15:33:02.059+0100 [DEBUG] ReferenceTransformer: "provider[\"registry.opentofu.org/hashicorp/boundary\"]" references: []
2025-01-13T15:33:02.059+0100 [DEBUG] Starting graph walk: walkValidate
2025-01-13T15:33:02.060+0100 [DEBUG] created provider logger: level=debug
2025-01-13T15:33:02.060+0100 [INFO]  provider: configuring client automatic mTLS
2025-01-13T15:33:02.062+0100 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.opentofu.org/hashicorp/boundary/1.2.0/linux_amd64/terraform-provider-boundary args=[".terraform/providers/registry.opentofu.org/hashicorp/boundary/1.2.0/linux_amd64/terraform-provider-boundary"]
2025-01-13T15:33:02.063+0100 [DEBUG] provider: plugin started: path=.terraform/providers/registry.opentofu.org/hashicorp/boundary/1.2.0/linux_amd64/terraform-provider-boundary pid=302488
2025-01-13T15:33:02.063+0100 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.opentofu.org/hashicorp/boundary/1.2.0/linux_amd64/terraform-provider-boundary
2025-01-13T15:33:02.067+0100 [INFO]  provider.terraform-provider-boundary: configuring server automatic mTLS: timestamp="2025-01-13T15:33:02.067+0100"
2025-01-13T15:33:02.073+0100 [DEBUG] provider: using plugin: version=5
2025-01-13T15:33:02.073+0100 [DEBUG] provider.terraform-provider-boundary: plugin address: address=/tmp/plugin4202540156 network=unix timestamp="2025-01-13T15:33:02.073+0100"
2025-01-13T15:33:02.086+0100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-01-13T15:33:02.087+0100 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.opentofu.org/hashicorp/boundary/1.2.0/linux_amd64/terraform-provider-boundary pid=302488
2025-01-13T15:33:02.087+0100 [DEBUG] provider: plugin exited
2025-01-13T15:33:02.087+0100 [INFO]  backend/local: plan calling Plan
2025-01-13T15:33:02.087+0100 [DEBUG] Building and walking plan graph for NormalMode
2025-01-13T15:33:02.087+0100 [DEBUG] ProviderTransformer: "boundary_scope.global (expand)" (*tofu.nodeExpandPlannableResource) needs provider["registry.opentofu.org/hashicorp/boundary"]
2025-01-13T15:33:02.087+0100 [DEBUG] ReferenceTransformer: "boundary_scope.global (expand)" references: []
2025-01-13T15:33:02.087+0100 [DEBUG] ReferenceTransformer: "provider[\"registry.opentofu.org/hashicorp/boundary\"]" references: []
2025-01-13T15:33:02.087+0100 [DEBUG] Starting graph walk: walkPlan
2025-01-13T15:33:02.087+0100 [DEBUG] created provider logger: level=debug
2025-01-13T15:33:02.087+0100 [INFO]  provider: configuring client automatic mTLS
2025-01-13T15:33:02.090+0100 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.opentofu.org/hashicorp/boundary/1.2.0/linux_amd64/terraform-provider-boundary args=[".terraform/providers/registry.opentofu.org/hashicorp/boundary/1.2.0/linux_amd64/terraform-provider-boundary"]
2025-01-13T15:33:02.090+0100 [DEBUG] provider: plugin started: path=.terraform/providers/registry.opentofu.org/hashicorp/boundary/1.2.0/linux_amd64/terraform-provider-boundary pid=302502
2025-01-13T15:33:02.090+0100 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.opentofu.org/hashicorp/boundary/1.2.0/linux_amd64/terraform-provider-boundary
2025-01-13T15:33:02.094+0100 [INFO]  provider.terraform-provider-boundary: configuring server automatic mTLS: timestamp="2025-01-13T15:33:02.094+0100"
2025-01-13T15:33:02.100+0100 [DEBUG] provider.terraform-provider-boundary: plugin address: address=/tmp/plugin3001697826 network=unix timestamp="2025-01-13T15:33:02.100+0100"
2025-01-13T15:33:02.100+0100 [DEBUG] provider: using plugin: version=5
2025-01-13T15:33:02.108+0100 [ERROR] provider.terraform-provider-boundary: Response contains error diagnostic: @module=sdk.proto diagnostic_detail="" tf_proto_version=5.4 tf_provider_addr=provider tf_rpc=Configure diagnostic_severity=ERROR diagnostic_summary="error reading wrappers from \"recovery_kms_hcl\": Error configuring kms: plugin is nil" tf_req_id=fbb4e2af-2332-f7cf-b785-d5cd1216ed28 @caller=/home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.22.0/tfprotov5/internal/diag/diagnostics.go:58 timestamp="2025-01-13T15:33:02.108+0100"
2025-01-13T15:33:02.108+0100 [ERROR] vertex "provider[\"registry.opentofu.org/hashicorp/boundary\"]" error: error reading wrappers from "recovery_kms_hcl": Error configuring kms: plugin is nil
2025-01-13T15:33:02.108+0100 [INFO]  backend/local: plan operation completed

Planning failed. OpenTofu encountered an error while generating this plan.

╷
│ Error: error reading wrappers from "recovery_kms_hcl": Error configuring kms: plugin is nil
│
│   with provider["registry.opentofu.org/hashicorp/boundary"],
│   on main.tf line 10, in provider "boundary":
│   10: provider "boundary" {
│
╵
2025-01-13T15:33:02.109+0100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-01-13T15:33:02.110+0100 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.opentofu.org/hashicorp/boundary/1.2.0/linux_amd64/terraform-provider-boundary pid=302502
2025-01-13T15:33:02.110+0100 [DEBUG] provider: plugin exited

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants