-
Notifications
You must be signed in to change notification settings - Fork 124
Description
When using provider version 2.3.0, the provider plugin fails to load.
Error: Could not load plugin
...
Failed to retrieve schema from provider
"registry.terraform.io/hashicorp/random": rpc error: code = Unavailable desc =
connection closed
Terraform Version
Reproduced on both 0.12.29 and 0.13.2
Affected Resource(s)
It appears to be a provider issue (or potentially a plugin SDK issue) not related to a specific resource, but will use random_id
for the sake of example.
Terraform Configuration Files
provider "random" {
version = "2.3.0"
}
resource "random_id" "test" {
byte_length = 8
}
output "test" {
value = random_id.test.b64_std
}
Debug Output
https://gist.github.com/lukiffer/b9b86ccb0fb50b658b1d297d1e221f22
To highlight a specific set of outputs:
2020/09/03 03:51:19 [INFO] Go runtime version: go1.14.7
2020-09-03T03:51:19.508-0500 [DEBUG] plugin.terraform-provider-random_v2.3.0_x4: plugin address: address=/var/folders/0s/bbgtj68j187fdpfggtzgqr8r0000gn/T/plugin077377841 network=unix timestamp=2020-09-03T03:51:19.508-0500
2020-09-03T03:51:19.508-0500 [DEBUG] plugin: using plugin: version=5
2020-09-03T03:51:19.606-0500 [DEBUG] plugin.terraform-provider-random_v2.3.0_x4: SIGILL: illegal instruction
2020-09-03T03:51:19.606-0500 [DEBUG] plugin.terraform-provider-random_v2.3.0_x4: PC=0x1063d90 m=0 sigcode=1
2020-09-03T03:51:19.606-0500 [DEBUG] plugin.terraform-provider-random_v2.3.0_x4: goroutine 54 [running]:
2020-09-03T03:51:19.606-0500 [DEBUG] plugin.terraform-provider-random_v2.3.0_x4: runtime.asyncPreempt()
2020-09-03T03:51:19.606-0500 [DEBUG] plugin.terraform-provider-random_v2.3.0_x4: /opt/goenv/versions/1.14.0/src/runtime/preempt_amd64.s:8 fp=0xc00056b1e8 sp=0xc00056b1e0 pc=0x1063d90
It appears that the go runtime is 1.14.7 but the provider was compiled against 1.14.0 – not typically an issue, but there was an issue with 1.14.0 not guarding a specific instruction or feature not available on some CPUs that was fixed in 1.14.1. (See golang/go#37478 and https://go-review.googlesource.com/c/go/+/221058/)
I believe all that should be required is that the plugin be compiled with go1.14.1 or later, but I haven't tested this.
Steps to Reproduce
terraform init && terraform plan