elsudano / terraform-provider-vmworkstation

VmWare Workstation Pro provider for Terraform
MIT License
51 stars 18 forks source link

"Error: Could not load plugin" with 0.1.9 and TF v0.14, runs fine with 0.1.7 #6

Closed Xav-Pe closed 8 months ago

Xav-Pe commented 3 years ago

Hello,

With this simple code, I have different behaviours depending on the version.

terraform {
  required_version = ">= 0.14"
  required_providers {
    vmworkstation = {
      source  = "elsudano/vmworkstation"
      version = "0.1.9"
    }
  }
}
provider "vmworkstation" {
[...]
}

Error while installing elsudano/vmworkstation v0.1.8: checksum list has unexpected SHA-256 hash f377862b26da1d2a9f4228b0e49a722202cc0ae596e3dab9674325b2542c9676 (expected cda20a003824bc0a7b31dcf455e5ae2307299901df96ab99edfcf3aedeec368c)

Am I missing something, or is there any bugs?

I'm using Workstation Pro 16.1.0 build-17198959.

elsudano commented 3 years ago

Hi xav-pe

Sorry for the delay in my answer, I think that I fixed the issue in the version 0.2.2 the provider, please can you review if you have some problems with the new version?

Let me know the results of your test please

Xav-Pe commented 3 years ago

Hello, same error with 0.2.2. I included the output of terraform init and terraform plan below :

log ``` 2021/04/19 09:45:21 [INFO] Terraform version: 0.14.10 2021/04/19 09:45:21 [INFO] Go runtime version: go1.15.6 2021/04/19 09:45:21 [INFO] CLI args: []string{"/usr/local/bin/terraform", "init", "-upgrade"} 2021/04/19 09:45:21 [DEBUG] Attempting to open CLI config file: /home/xp/.terraformrc 2021/04/19 09:45:21 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. 2021/04/19 09:45:21 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins 2021/04/19 09:45:21 [DEBUG] ignoring non-existing provider search directory /home/xp/.terraform.d/plugins 2021/04/19 09:45:21 [DEBUG] ignoring non-existing provider search directory /home/xp/.local/share/terraform/plugins 2021/04/19 09:45:21 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins 2021/04/19 09:45:21 [DEBUG] ignoring non-existing provider search directory /usr/share/terraform/plugins 2021/04/19 09:45:21 [INFO] CLI command args: []string{"init", "-upgrade"} 2021/04/19 09:45:21 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config 2021/04/19 09:45:21 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory 2021/04/19 09:45:21 [DEBUG] New state was assigned lineage "85daac93-e338-cd15-3db8-377550183639" 2021/04/19 09:45:21 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend) 2021/04/19 09:45:21 [TRACE] Meta.Backend: instantiated backend of type 2021/04/19 09:45:21 [DEBUG] checking for provisioner in "." 2021/04/19 09:45:21 [DEBUG] checking for provisioner in "/usr/local/bin" 2021/04/19 09:45:21 [INFO] Failed to read plugin lock file .terraform/plugins/linux_amd64/lock.json: open .terraform/plugins/linux_amd64/lock.json: no such file or directory 2021/04/19 09:45:21 [TRACE] Meta.Backend: backend does not support operations, so wrapping it in a local backend 2021/04/19 09:45:21 [TRACE] backend/local: state manager for workspace "default" will: - read initial snapshot from terraform.tfstate - write new snapshots to terraform.tfstate - create any backup at terraform.tfstate.backup 2021/04/19 09:45:21 [TRACE] statemgr.Filesystem: reading initial snapshot from terraform.tfstate 2021/04/19 09:45:21 [TRACE] statemgr.Filesystem: read snapshot with lineage "5fc32c6c-4445-502e-0c36-fc174f835da6" serial 1 2021/04/19 09:45:21 [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json 2021/04/19 09:45:21 [TRACE] HTTP client GET request to https://registry.terraform.io/.well-known/terraform.json 2021/04/19 09:45:21 [DEBUG] GET https://registry.terraform.io/v1/providers/elsudano/vmworkstation/versions 2021/04/19 09:45:21 [TRACE] HTTP client GET request to https://registry.terraform.io/v1/providers/elsudano/vmworkstation/versions 2021/04/19 09:45:22 [TRACE] providercache.fillMetaCache: scanning directory .terraform/providers 2021/04/19 09:45:22 [TRACE] getproviders.SearchLocalDirectory: failed to resolve symlinks for .terraform/providers: lstat .terraform: no such file or directory 2021/04/19 09:45:22 [TRACE] providercache.fillMetaCache: error while scanning directory .terraform/providers: cannot search .terraform/providers: lstat .terraform/providers: no such file or directory 2021/04/19 09:45:22 [DEBUG] GET https://registry.terraform.io/v1/providers/elsudano/vmworkstation/0.2.2/download/linux/amd64 2021/04/19 09:45:22 [TRACE] HTTP client GET request to https://registry.terraform.io/v1/providers/elsudano/vmworkstation/0.2.2/download/linux/amd64 2021/04/19 09:45:22 [DEBUG] GET https://github.com/elsudano/terraform-provider-vmworkstation/releases/download/v0.2.2/terraform-provider-vmworkstation_0.2.2_SHA256SUMS 2021/04/19 09:45:22 [TRACE] HTTP client GET request to https://github.com/elsudano/terraform-provider-vmworkstation/releases/download/v0.2.2/terraform-provider-vmworkstation_0.2.2_SHA256SUMS 2021/04/19 09:45:22 [TRACE] HTTP client GET request to https://github-releases.githubusercontent.com/202514789/27767c80-a04b-11eb-9661-f7e9cd86510b?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210419%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210419T074523Z&X-Amz-Expires=300&X-Amz-Signature=d2a464c6c555c2eaf0d80723e3060622b776f53ae904174912c4d2dc1da785bf&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=202514789&response-content-disposition=attachment%3B%20filename%3Dterraform-provider-vmworkstation_0.2.2_SHA256SUMS&response-content-type=application%2Foctet-stream 2021/04/19 09:45:22 [DEBUG] GET https://github.com/elsudano/terraform-provider-vmworkstation/releases/download/v0.2.2/terraform-provider-vmworkstation_0.2.2_SHA256SUMS.sig 2021/04/19 09:45:22 [TRACE] HTTP client GET request to https://github.com/elsudano/terraform-provider-vmworkstation/releases/download/v0.2.2/terraform-provider-vmworkstation_0.2.2_SHA256SUMS.sig 2021/04/19 09:45:22 [TRACE] HTTP client GET request to https://github-releases.githubusercontent.com/202514789/27767c80-a04b-11eb-96b0-a714b2ed9332?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210419%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210419T074523Z&X-Amz-Expires=300&X-Amz-Signature=3f6e7984cc3f774ca6be66ae3c01bf6590ba9530aa74707d3725bcb0e7e35960&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=202514789&response-content-disposition=attachment%3B%20filename%3Dterraform-provider-vmworkstation_0.2.2_SHA256SUMS.sig&response-content-type=application%2Foctet-stream 2021/04/19 09:45:23 [TRACE] providercache.Dir.InstallPackage: installing registry.terraform.io/elsudano/vmworkstation v0.2.2 from https://github.com/elsudano/terraform-provider-vmworkstation/releases/download/v0.2.2/terraform-provider-vmworkstation_0.2.2_linux_amd64.zip 2021/04/19 09:45:23 [TRACE] HTTP client GET request to https://github.com/elsudano/terraform-provider-vmworkstation/releases/download/v0.2.2/terraform-provider-vmworkstation_0.2.2_linux_amd64.zip 2021/04/19 09:45:23 [TRACE] HTTP client GET request to https://github-releases.githubusercontent.com/202514789/25acb900-a04b-11eb-9c6c-0981d7413c58?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210419%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210419T074524Z&X-Amz-Expires=300&X-Amz-Signature=74e9471017fcf9648882a3f776dfef3224a2f34a45ca9ab0d129caecca2edd09&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=202514789&response-content-disposition=attachment%3B%20filename%3Dterraform-provider-vmworkstation_0.2.2_linux_amd64.zip&response-content-type=application%2Foctet-stream 2021/04/19 09:45:24 [DEBUG] Provider signed by 25B4C7DDA0B6F683 Carlos de la Torre (production pair keys) 2021/04/19 09:45:24 [TRACE] providercache.fillMetaCache: scanning directory .terraform/providers 2021/04/19 09:45:24 [TRACE] getproviders.SearchLocalDirectory: .terraform/providers is a symlink to .terraform/providers 2021/04/19 09:45:24 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/elsudano/vmworkstation v0.2.2 for linux_amd64 at .terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64 2021/04/19 09:45:24 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64 as a candidate package for registry.terraform.io/elsudano/vmworkstation 0.2.2 2021/04/19 09:45:27 [INFO] Terraform version: 0.14.10 2021/04/19 09:45:27 [INFO] Go runtime version: go1.15.6 2021/04/19 09:45:27 [INFO] CLI args: []string{"/usr/local/bin/terraform", "plan"} 2021/04/19 09:45:27 [DEBUG] Attempting to open CLI config file: /home/xp/.terraformrc 2021/04/19 09:45:27 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. 2021/04/19 09:45:27 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins 2021/04/19 09:45:27 [DEBUG] ignoring non-existing provider search directory /home/xp/.terraform.d/plugins 2021/04/19 09:45:27 [DEBUG] ignoring non-existing provider search directory /home/xp/.local/share/terraform/plugins 2021/04/19 09:45:27 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins 2021/04/19 09:45:27 [DEBUG] ignoring non-existing provider search directory /usr/share/terraform/plugins 2021/04/19 09:45:27 [INFO] CLI command args: []string{"plan"} 2021/04/19 09:45:27 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config 2021/04/19 09:45:27 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory 2021/04/19 09:45:27 [DEBUG] New state was assigned lineage "f441f59c-5bd1-8642-bb4e-d542a2c2b5f5" 2021/04/19 09:45:27 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend) 2021/04/19 09:45:27 [TRACE] Meta.Backend: instantiated backend of type 2021/04/19 09:45:27 [TRACE] providercache.fillMetaCache: scanning directory .terraform/providers 2021/04/19 09:45:27 [TRACE] getproviders.SearchLocalDirectory: .terraform/providers is a symlink to .terraform/providers 2021/04/19 09:45:27 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/elsudano/vmworkstation v0.2.2 for linux_amd64 at .terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64 2021/04/19 09:45:27 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64 as a candidate package for registry.terraform.io/elsudano/vmworkstation 0.2.2 2021/04/19 09:45:27 [DEBUG] checking for provisioner in "." 2021/04/19 09:45:27 [DEBUG] checking for provisioner in "/usr/local/bin" 2021/04/19 09:45:27 [INFO] Failed to read plugin lock file .terraform/plugins/linux_amd64/lock.json: open .terraform/plugins/linux_amd64/lock.json: no such file or directory 2021/04/19 09:45:27 [TRACE] Meta.Backend: backend does not support operations, so wrapping it in a local backend 2021/04/19 09:45:27 [INFO] backend/local: starting Plan operation 2021/04/19 09:45:27 [TRACE] backend/local: requesting state manager for workspace "default" 2021/04/19 09:45:27 [TRACE] backend/local: state manager for workspace "default" will: - read initial snapshot from terraform.tfstate - write new snapshots to terraform.tfstate - create any backup at terraform.tfstate.backup 2021/04/19 09:45:27 [TRACE] backend/local: requesting state lock for workspace "default" 2021/04/19 09:45:27 [TRACE] statemgr.Filesystem: preparing to manage state snapshots at terraform.tfstate 2021/04/19 09:45:27 [TRACE] statemgr.Filesystem: existing snapshot has lineage "5fc32c6c-4445-502e-0c36-fc174f835da6" serial 1 2021/04/19 09:45:27 [TRACE] statemgr.Filesystem: locking terraform.tfstate using fcntl flock 2021/04/19 09:45:27 [TRACE] statemgr.Filesystem: writing lock metadata to .terraform.tfstate.lock.info 2021/04/19 09:45:27 [TRACE] backend/local: reading remote state for workspace "default" 2021/04/19 09:45:27 [TRACE] statemgr.Filesystem: reading latest snapshot from terraform.tfstate 2021/04/19 09:45:27 [TRACE] statemgr.Filesystem: read snapshot with lineage "5fc32c6c-4445-502e-0c36-fc174f835da6" serial 1 2021/04/19 09:45:27 [TRACE] backend/local: retrieving local state snapshot for workspace "default" 2021/04/19 09:45:27 [TRACE] backend/local: building context for current working directory 2021/04/19 09:45:27 [DEBUG] backend/local: will prompt for input of unset required variables [vmws_reource_frontend_sourceid vmws_reource_frontend_description] 2021/04/19 09:45:27 [DEBUG] command: asking for input: "var.vmws_reource_frontend_description" 2021/04/19 09:45:28 [DEBUG] command: asking for input: "var.vmws_reource_frontend_sourceid" 2021/04/19 09:45:37 [TRACE] terraform.NewContext: starting 2021/04/19 09:45:37 [TRACE] terraform.NewContext: loading provider schemas 2021/04/19 09:45:37 [TRACE] LoadSchemas: retrieving schema for provider type "registry.terraform.io/elsudano/vmworkstation" 2021-04-19T09:45:37.480+0200 [INFO] plugin: configuring client automatic mTLS 2021-04-19T09:45:37.494+0200 [DEBUG] plugin: starting plugin: path=.terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64/terraform-provider-vmworkstation_v0.2.2 args=[.terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64/terraform-provider-vmworkstation_v0.2.2] 2021-04-19T09:45:37.495+0200 [DEBUG] plugin: plugin started: path=.terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64/terraform-provider-vmworkstation_v0.2.2 pid=876 2021-04-19T09:45:37.495+0200 [DEBUG] plugin: waiting for RPC address: path=.terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64/terraform-provider-vmworkstation_v0.2.2 2021-04-19T09:45:37.496+0200 [DEBUG] plugin.terraform-provider-vmworkstation_v0.2.2: .terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64/terraform-provider-vmworkstation_v0.2.2: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by .terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64/terraform-provider-vmworkstation_v0.2.2) 2021/04/19 09:45:37 [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info 2021/04/19 09:45:37 [TRACE] statemgr.Filesystem: unlocking terraform.tfstate using fcntl flock 2021-04-19T09:45:37.496+0200 [DEBUG] plugin: plugin process exited: path=.terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64/terraform-provider-vmworkstation_v0.2.2 pid=876 error="exit status 1" 2021-04-19T09:45:37.497+0200 [WARN] plugin: plugin failed to exit gracefully ```
elsudano commented 3 years ago

Hi Xav-Pe,

Thanks for the last log, in that lines we can saw different points, If you compare the previous error with the last one you can see little bit differences.

Firstly in the previous error you can see that the error was reference at the unexpected SHA-256 hash, this is because you keep the file .terraform.lock.hcl in your folder of Terraform deploy.

In another hand, you can saw that the last error is because you haven't enable the API REST of the VmWare WorkStation in the moment that you doing the terraform apply

When you can saw plugin failed to exit gracefully it's mean that the puglin can't reached the VmWare API

Please can you confirm that ?

Another point here is the line:

2021-04-19T09:45:37.496+0200 [DEBUG] plugin.terraform-provider-vmworkstation_v0.2.2: .terraform/providers
/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64/terraform-provider-vmworkstation_v0.2.2: /lib/x86_64-linux-
gnu/libc.so.6: version `GLIBC_2.32' not found (required by .terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2
/linux_amd64/terraform-provider-vmworkstation_v0.2.2)

When I have tried reproduce the issue this error no appear in my tests

Maybe in the next version I could put a different message

Xav-Pe commented 3 years ago

Hello,

Thanks for your answer.

The REST API is running and I can use it with curl :

 $ curl 'http://127.0.0.1:8697/api/vms/BKQ2TTNDOC2LGTNVH2317LBKLDI4ALDE' -X GET --header 'Accept: application/vnd.vmware.vmw.rest-v1+json' --header 'Authorization: Basic dG90bzpUb3RvMTIzNDUk'
{
  "id": "BKQ2TTNDOC2LGTNVH2317LBKLDI4ALDE",
  "cpu": {
    "processors": 2
  },
  "memory": 2048

But with terraform (from a clean directory) it fails :

 $ terraform plan
var.vmworkstation_url
  URL de l'API REST

  Enter a value: http://127.0.0.1:8697/api

var.vmws_reource_frontend_sourceid
  (Required) The ID of the VM that to use for clone at the new

  Enter a value: BKQ2TTNDOC2LGTNVH2317LBKLDI4ALDE

╷
│ Error: Could not load plugin
│
│
│ Plugin reinitialization required. Please run "terraform init".
│
│ Plugins are external binaries that Terraform uses to access and manipulate
│ resources. The configuration provided requires plugins which can't be located,
│ don't satisfy the version constraints, or are otherwise incompatible.
│
│ Terraform automatically discovers provider requirements from your
│ configuration, including providers used in child modules. To see the
│ requirements and constraints, run "terraform providers".
│
│ failed to instantiate provider "registry.terraform.io/elsudano/vmworkstation" to obtain schema: Unrecognized remote plugin message:
│
│ This usually means that the plugin is either invalid or simply
│ needs to be recompiled to support the latest protocol.

I cleaned the directory (rm -rf .terraform .terraform.lock.hcl terraform.tfstate) and did a new log with terraform init and terraform plan :

log ``` 2021-04-20T10:47:51.276+0200 [DEBUG] Adding temp file log sink: /tmp/terraform-log796129652 2021-04-20T10:47:51.276+0200 [INFO] Terraform version: 0.15.0 2021-04-20T10:47:51.276+0200 [INFO] Go runtime version: go1.16.2 2021-04-20T10:47:51.276+0200 [INFO] CLI args: []string{"/usr/local/bin/terraform", "init"} 2021-04-20T10:47:51.276+0200 [TRACE] Stdout is a terminal of width 209 2021-04-20T10:47:51.276+0200 [TRACE] Stderr is a terminal of width 209 2021-04-20T10:47:51.276+0200 [TRACE] Stdin is a terminal 2021-04-20T10:47:51.276+0200 [DEBUG] Attempting to open CLI config file: /home/xperignon/.terraformrc 2021-04-20T10:47:51.277+0200 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. 2021-04-20T10:47:51.277+0200 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins 2021-04-20T10:47:51.277+0200 [DEBUG] ignoring non-existing provider search directory /home/xperignon/.terraform.d/plugins 2021-04-20T10:47:51.277+0200 [DEBUG] ignoring non-existing provider search directory /home/xperignon/.local/share/terraform/plugins 2021-04-20T10:47:51.277+0200 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins 2021-04-20T10:47:51.277+0200 [DEBUG] ignoring non-existing provider search directory /usr/share/terraform/plugins 2021-04-20T10:47:51.278+0200 [INFO] CLI command args: []string{"init"} 2021-04-20T10:47:51.282+0200 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config 2021-04-20T10:47:51.282+0200 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory 2021-04-20T10:47:51.282+0200 [DEBUG] New state was assigned lineage "a80927ca-5de1-c471-5453-5fd9a71c28ba" 2021-04-20T10:47:51.282+0200 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend) 2021-04-20T10:47:51.282+0200 [TRACE] Meta.Backend: instantiated backend of type 2021-04-20T10:47:51.283+0200 [DEBUG] checking for provisioner in "." 2021-04-20T10:47:51.283+0200 [DEBUG] checking for provisioner in "/usr/local/bin" 2021-04-20T10:47:51.283+0200 [INFO] Failed to read plugin lock file .terraform/plugins/linux_amd64/lock.json: open .terraform/plugins/linux_amd64/lock.json: no such file or directory 2021-04-20T10:47:51.283+0200 [TRACE] Meta.Backend: backend does not support operations, so wrapping it in a local backend 2021-04-20T10:47:51.283+0200 [TRACE] backend/local: state manager for workspace "default" will: - read initial snapshot from terraform.tfstate - write new snapshots to terraform.tfstate - create any backup at terraform.tfstate.backup 2021-04-20T10:47:51.283+0200 [TRACE] statemgr.Filesystem: reading initial snapshot from terraform.tfstate 2021-04-20T10:47:51.283+0200 [TRACE] statemgr.Filesystem: snapshot file has nil snapshot, but that's okay 2021-04-20T10:47:51.284+0200 [TRACE] statemgr.Filesystem: read nil snapshot 2021-04-20T10:47:51.285+0200 [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json 2021-04-20T10:47:51.285+0200 [TRACE] HTTP client GET request to https://registry.terraform.io/.well-known/terraform.json 2021-04-20T10:47:51.448+0200 [DEBUG] GET https://registry.terraform.io/v1/providers/elsudano/vmworkstation/versions 2021-04-20T10:47:51.448+0200 [TRACE] HTTP client GET request to https://registry.terraform.io/v1/providers/elsudano/vmworkstation/versions 2021-04-20T10:47:51.640+0200 [TRACE] providercache.fillMetaCache: scanning directory .terraform/providers 2021-04-20T10:47:51.640+0200 [TRACE] getproviders.SearchLocalDirectory: failed to resolve symlinks for .terraform/providers: lstat .terraform: no such file or directory 2021-04-20T10:47:51.641+0200 [TRACE] providercache.fillMetaCache: error while scanning directory .terraform/providers: cannot search .terraform/providers: lstat .terraform/providers: no such file or directory 2021-04-20T10:47:51.641+0200 [DEBUG] GET https://registry.terraform.io/v1/providers/elsudano/vmworkstation/0.2.2/download/linux/amd64 2021-04-20T10:47:51.641+0200 [TRACE] HTTP client GET request to https://registry.terraform.io/v1/providers/elsudano/vmworkstation/0.2.2/download/linux/amd64 2021-04-20T10:47:51.743+0200 [DEBUG] GET https://github.com/elsudano/terraform-provider-vmworkstation/releases/download/v0.2.2/terraform-provider-vmworkstation_0.2.2_SHA256SUMS 2021-04-20T10:47:51.743+0200 [TRACE] HTTP client GET request to https://github.com/elsudano/terraform-provider-vmworkstation/releases/download/v0.2.2/terraform-provider-vmworkstation_0.2.2_SHA256SUMS 2021-04-20T10:47:52.026+0200 [TRACE] HTTP client GET request to https://github-releases.githubusercontent.com/202514789/27767c80-a04b-11eb-9661-f7e9cd86510b?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210420%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210420T084751Z&X-Amz-Expires=300&X-Amz-Signature=bf43ab60b9af7a0d625be2e244bf7a4a5c09579f2ae3247df84e52b7a154685f&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=202514789&response-content-disposition=attachment%3B%20filename%3Dterraform-provider-vmworkstation_0.2.2_SHA256SUMS&response-content-type=application%2Foctet-stream 2021-04-20T10:47:52.204+0200 [DEBUG] GET https://github.com/elsudano/terraform-provider-vmworkstation/releases/download/v0.2.2/terraform-provider-vmworkstation_0.2.2_SHA256SUMS.sig 2021-04-20T10:47:52.204+0200 [TRACE] HTTP client GET request to https://github.com/elsudano/terraform-provider-vmworkstation/releases/download/v0.2.2/terraform-provider-vmworkstation_0.2.2_SHA256SUMS.sig 2021-04-20T10:47:52.393+0200 [TRACE] HTTP client GET request to https://github-releases.githubusercontent.com/202514789/27767c80-a04b-11eb-96b0-a714b2ed9332?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210420%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210420T084752Z&X-Amz-Expires=300&X-Amz-Signature=bfc7a3c3ff34c9a5aa7db9c428766f90ec0f3355daf1e3cd4e8ddd558208cb6d&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=202514789&response-content-disposition=attachment%3B%20filename%3Dterraform-provider-vmworkstation_0.2.2_SHA256SUMS.sig&response-content-type=application%2Foctet-stream 2021-04-20T10:47:52.529+0200 [TRACE] providercache.Dir.InstallPackage: installing registry.terraform.io/elsudano/vmworkstation v0.2.2 from https://github.com/elsudano/terraform-provider-vmworkstation/releases/download/v0.2.2/terraform-provider-vmworkstation_0.2.2_linux_amd64.zip 2021-04-20T10:47:52.529+0200 [TRACE] HTTP client GET request to https://github.com/elsudano/terraform-provider-vmworkstation/releases/download/v0.2.2/terraform-provider-vmworkstation_0.2.2_linux_amd64.zip 2021-04-20T10:47:52.790+0200 [TRACE] HTTP client GET request to https://github-releases.githubusercontent.com/202514789/25acb900-a04b-11eb-9c6c-0981d7413c58?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210420%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210420T084752Z&X-Amz-Expires=300&X-Amz-Signature=9088d36b65fc9647e73fad7f1a08d725f381327eec61b9c4c7162e060c3eff67&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=202514789&response-content-disposition=attachment%3B%20filename%3Dterraform-provider-vmworkstation_0.2.2_linux_amd64.zip&response-content-type=application%2Foctet-stream 2021-04-20T10:47:55.092+0200 [DEBUG] Provider signed by 25B4C7DDA0B6F683 Carlos de la Torre (production pair keys) 2021-04-20T10:47:55.267+0200 [TRACE] providercache.fillMetaCache: scanning directory .terraform/providers 2021-04-20T10:47:55.270+0200 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/elsudano/vmworkstation v0.2.2 for linux_amd64 at .terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64 2021-04-20T10:47:55.271+0200 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64 as a candidate package for registry.terraform.io/elsudano/vmworkstation 0.2.2 2021-04-20T10:48:01.049+0200 [DEBUG] Adding temp file log sink: /tmp/terraform-log915955568 2021-04-20T10:48:01.049+0200 [INFO] Terraform version: 0.15.0 2021-04-20T10:48:01.049+0200 [INFO] Go runtime version: go1.16.2 2021-04-20T10:48:01.049+0200 [INFO] CLI args: []string{"/usr/local/bin/terraform", "plan"} 2021-04-20T10:48:01.049+0200 [TRACE] Stdout is a terminal of width 209 2021-04-20T10:48:01.049+0200 [TRACE] Stderr is a terminal of width 209 2021-04-20T10:48:01.049+0200 [TRACE] Stdin is a terminal 2021-04-20T10:48:01.049+0200 [DEBUG] Attempting to open CLI config file: /home/xperignon/.terraformrc 2021-04-20T10:48:01.050+0200 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. 2021-04-20T10:48:01.050+0200 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins 2021-04-20T10:48:01.050+0200 [DEBUG] ignoring non-existing provider search directory /home/xperignon/.terraform.d/plugins 2021-04-20T10:48:01.050+0200 [DEBUG] ignoring non-existing provider search directory /home/xperignon/.local/share/terraform/plugins 2021-04-20T10:48:01.050+0200 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins 2021-04-20T10:48:01.050+0200 [DEBUG] ignoring non-existing provider search directory /usr/share/terraform/plugins 2021-04-20T10:48:01.051+0200 [INFO] CLI command args: []string{"plan"} 2021-04-20T10:48:01.054+0200 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config 2021-04-20T10:48:01.054+0200 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory 2021-04-20T10:48:01.054+0200 [DEBUG] New state was assigned lineage "f32ef336-247d-8226-df2f-1509c5301c78" 2021-04-20T10:48:01.054+0200 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend) 2021-04-20T10:48:01.054+0200 [TRACE] Meta.Backend: instantiated backend of type 2021-04-20T10:48:01.054+0200 [TRACE] providercache.fillMetaCache: scanning directory .terraform/providers 2021-04-20T10:48:01.057+0200 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/elsudano/vmworkstation v0.2.2 for linux_amd64 at .terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64 2021-04-20T10:48:01.058+0200 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64 as a candidate package for registry.terraform.io/elsudano/vmworkstation 0.2.2 2021-04-20T10:48:01.115+0200 [DEBUG] checking for provisioner in "." 2021-04-20T10:48:01.116+0200 [DEBUG] checking for provisioner in "/usr/local/bin" 2021-04-20T10:48:01.116+0200 [INFO] Failed to read plugin lock file .terraform/plugins/linux_amd64/lock.json: open .terraform/plugins/linux_amd64/lock.json: no such file or directory 2021-04-20T10:48:01.116+0200 [TRACE] Meta.Backend: backend does not support operations, so wrapping it in a local backend 2021-04-20T10:48:01.117+0200 [INFO] backend/local: starting Plan operation 2021-04-20T10:48:01.117+0200 [TRACE] backend/local: requesting state manager for workspace "default" 2021-04-20T10:48:01.117+0200 [TRACE] backend/local: state manager for workspace "default" will: - read initial snapshot from terraform.tfstate - write new snapshots to terraform.tfstate - create any backup at terraform.tfstate.backup 2021-04-20T10:48:01.117+0200 [TRACE] backend/local: requesting state lock for workspace "default" 2021-04-20T10:48:01.117+0200 [TRACE] statemgr.Filesystem: preparing to manage state snapshots at terraform.tfstate 2021-04-20T10:48:01.118+0200 [TRACE] statemgr.Filesystem: no previously-stored snapshot exists 2021-04-20T10:48:01.118+0200 [TRACE] statemgr.Filesystem: locking terraform.tfstate using fcntl flock 2021-04-20T10:48:01.118+0200 [TRACE] statemgr.Filesystem: writing lock metadata to .terraform.tfstate.lock.info 2021-04-20T10:48:01.118+0200 [TRACE] backend/local: reading remote state for workspace "default" 2021-04-20T10:48:01.118+0200 [TRACE] statemgr.Filesystem: reading latest snapshot from terraform.tfstate 2021-04-20T10:48:01.118+0200 [TRACE] statemgr.Filesystem: snapshot file has nil snapshot, but that's okay 2021-04-20T10:48:01.118+0200 [TRACE] statemgr.Filesystem: read nil snapshot 2021-04-20T10:48:01.118+0200 [TRACE] backend/local: retrieving local state snapshot for workspace "default" 2021-04-20T10:48:01.118+0200 [TRACE] backend/local: building context for current working directory 2021-04-20T10:48:01.119+0200 [DEBUG] backend/local: will prompt for input of unset required variables [vmworkstation_url vmws_reource_frontend_sourceid] 2021-04-20T10:48:01.119+0200 [DEBUG] command: asking for input: "var.vmworkstation_url" 2021-04-20T10:48:02.939+0200 [DEBUG] command: asking for input: "var.vmws_reource_frontend_sourceid" 2021-04-20T10:48:08.553+0200 [TRACE] terraform.NewContext: starting 2021-04-20T10:48:08.553+0200 [TRACE] terraform.NewContext: loading provider schemas 2021-04-20T10:48:08.553+0200 [TRACE] LoadSchemas: retrieving schema for provider type "registry.terraform.io/elsudano/vmworkstation" 2021-04-20T10:48:08.554+0200 [DEBUG] created provider logger: level=trace 2021-04-20T10:48:08.554+0200 [INFO] provider: configuring client automatic mTLS 2021-04-20T10:48:08.591+0200 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64/terraform-provider-vmworkstation_v0.2.2 args=[.terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64/terraform-provider-vmworkstation_v0.2.2] 2021-04-20T10:48:08.790+0200 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64/terraform-provider-vmworkstation_v0.2.2 pid=674 2021-04-20T10:48:08.790+0200 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64/terraform-provider-vmworkstation_v0.2.2 2021-04-20T10:48:08.790+0200 [DEBUG] provider.terraform-provider-vmworkstation_v0.2.2: .terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64/terraform-provider-vmworkstation_v0.2.2: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by .terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64/terraform-provider-vmworkstation_v0.2.2) 2021-04-20T10:48:08.791+0200 [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info 2021-04-20T10:48:08.791+0200 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64/terraform-provider-vmworkstation_v0.2.2 pid=674 error="exit status 1" 2021-04-20T10:48:08.791+0200 [TRACE] statemgr.Filesystem: unlocking terraform.tfstate using fcntl flock 2021-04-20T10:48:08.791+0200 [WARN] provider: plugin failed to exit gracefully ```

But I think it's related to your glibc requierements:

[DEBUG] provider.terraform-provider-vmworkstation_v0.2.2: .terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64/terraform-provider-vmworkstation_v0.2.2: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by .terraform/providers/registry.terraform.io/elsudano/vmworkstation/0.2.2/linux_amd64/terraform-provider-vmworkstation_v0.2.2)

On debian buster up-to-date, the glibc has the version 2.28.

$ ls -al /lib/x86_64-linux-gnu/libc.so.6
lrwxrwxrwx 1 root root 12 May  1  2019 /lib/x86_64-linux-gnu/libc.so.6 -> libc-2.28.so

On Ubuntu 20.04 LTS :

$ ls -al /lib/x86_64-linux-gnu/libc.so.6
lrwxrwxrwx 1 root root 12 Dec 16 12:04 /lib/x86_64-linux-gnu/libc.so.6 -> libc-2.31.so

What are your requierments regarding distributions?

elsudano commented 3 years ago

Hi Xav-Pe,

Thanks for your detailed report, I have found a couple of things in it, you are using Terraform version 0.15, unfortunately, I have not yet tested my plugin with that version.

Other than that, I see that you are fill the variable values ​​by hand, why are you not using a tfvars variable file?

additionally, if is possible for you maybe you can use the environment var export VMWS_DEBUG=true for Debug

In another hand, my project haven't requirements directly about of GLIBC version, but seems that when I compiled the binary file, GO language used my last version of this library, actually, I use a Manjaro distribution, with base in Arch Linux.

I will continue looking for errors to try to solve the problems it reports. I will keep you informed of the progress.

Greetings

elsudano commented 8 months ago

This issue was resolve in the latest version

https://registry.terraform.io/providers/elsudano/vmworkstation/latest

All the feedback will be welcome