我一直在使用自己实现的基础架构为自己的terraform提供程序进行工作。使用github上的二进制文件可以正常工作,但是当我尝试将模板提供程序合并到.tf文件中时,它抱怨客户端版本在api服务器之前。
我解决了第一个问题,下载Alpha2版本并使用zip文件中提供的二进制和模板提供程序。
现在我遇到了这个错误,我不知道要看哪里。
rpc error: code = Unimplemented desc = unknown service proto.Provider
terraform的跟踪输出适用
2018/11/29 07:48:59 [INFO] Terraform version: 0.12.0 alpha2
2018/11/29 07:48:59 [INFO] Go runtime version: go1.11.1
2018/11/29 07:48:59 [INFO] CLI args: []string{"/home/trent/go/bin/terraform", "apply"}
2018/11/29 07:48:59 [DEBUG] Attempting to open CLI config file: /home/trent/.terraformrc
2018/11/29 07:48:59 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/11/29 07:48:59 [INFO] CLI command args: []string{"apply"}
2018/11/29 07:48:59 [INFO] command: no config, returning nil
2018/11/29 07:48:59 [DEBUG] command: no data state file found for backend config
2018/11/29 07:48:59 [DEBUG] New state was assigned lineage "fef78a22-83aa-6f9e-1e26-45747e4ca26b"
2018/11/29 07:48:59 [INFO] command: backend initialized: <nil>
2018/11/29 07:48:59 [DEBUG] checking for provider in "."
2018/11/29 07:48:59 [DEBUG] checking for provider in "/home/trent/go/bin"
2018/11/29 07:48:59 [WARN] found legacy provider "terraform-provider-template"
2018/11/29 07:48:59 [DEBUG] checking for provider in ".terraform/plugins/linux_amd64"
2018/11/29 07:48:59 [DEBUG] checking for provider in "/home/trent/.terraform.d/plugins"
2018/11/29 07:48:59 [DEBUG] checking for provider in "/home/trent/.terraform.d/plugins/linux_amd64"
2018/11/29 07:48:59 [WARN] found legacy provider "terraform-provider-test2"
2018/11/29 07:48:59 [DEBUG] found valid plugin: "template", "0.0.0", "/home/trent/go/bin/terraform-provider-template"
2018/11/29 07:48:59 [DEBUG] found valid plugin: "test2", "0.0.0", "/home/trent/.terraform.d/plugins/linux_amd64/terraform-provider-test2"
2018/11/29 07:48:59 [DEBUG] checking for provisioner in "."
2018/11/29 07:48:59 [DEBUG] checking for provisioner in "/home/trent/go/bin"
2018/11/29 07:48:59 [DEBUG] checking for provisioner in ".terraform/plugins/linux_amd64"
2018/11/29 07:48:59 [DEBUG] checking for provisioner in "/home/trent/.terraform.d/plugins"
2018/11/29 07:48:59 [DEBUG] checking for provisioner in "/home/trent/.terraform.d/plugins/linux_amd64"
2018/11/29 07:48:59 [INFO] command: backend <nil> is not enhanced, wrapping in local
2018/11/29 07:48:59 [INFO] backend/local: starting Apply operation
2018/11/29 07:48:59 [TRACE] backend/local: requesting state manager for workspace "default"
2018/11/29 07:48:59 [TRACE] backend/local: requesting state lock for workspace "default"
2018/11/29 07:48:59 [TRACE] backend/local: reading remote state for workspace "default"
2018/11/29 07:48:59 [TRACE] backend/local: retrieving the local state snapshot for workspace "default"
2018/11/29 07:48:59 [TRACE] backend/local: building context for current working directory
2018/11/29 07:48:59 [TRACE] terraform.NewContext: starting
2018/11/29 07:48:59 [TRACE] terraform.NewContext: resolving provider version selections
2018/11/29 07:48:59 [TRACE] terraform.NewContext: loading provider schemas
2018/11/29 07:48:59 [TRACE] LoadSchemas: retrieving schema for provider type "template"
2018-11-29T07:48:59.264+1000 [DEBUG] plugin: starting plugin: path=/home/trent/go/bin/terraform-provider-template args=[/home/trent/go/bin/terraform-provider-template]
2018-11-29T07:48:59.264+1000 [DEBUG] plugin: plugin started: path=/home/trent/go/bin/terraform-provider-template pid=20045
2018-11-29T07:48:59.264+1000 [DEBUG] plugin: waiting for RPC address: path=/home/trent/go/bin/terraform-provider-template
2018-11-29T07:48:59.268+1000 [DEBUG] plugin: using plugin: version=5
2018-11-29T07:48:59.268+1000 [DEBUG] plugin.terraform-provider-template: plugin address: address=/tmp/plugin059266420 network=unix timestamp=2018-11-29T07:48:59.268+1000
2018/11/29 07:48:59 [TRACE] GRPCProvider: GetSchema
2018/11/29 07:48:59 [TRACE] GRPCProvider: PlanResourceChange
2018-11-29T07:48:59.520+1000 [WARN] plugin: plugin failed to exit gracefully
2018-11-29T07:48:59.521+1000 [DEBUG] plugin: plugin process exited: path=/home/trent/go/bin/terraform-provider-template pid=20045 error="signal: killed"
2018/11/29 07:48:59 [TRACE] LoadSchemas: retrieving schema for provider type "test2"
2018-11-29T07:48:59.522+1000 [DEBUG] plugin: starting plugin: path=/home/trent/.terraform.d/plugins/linux_amd64/terraform-provider-test2 args=[/home/trent/.terraform.d/plugins/linux_amd64/terraform-provider-test2]
2018-11-29T07:48:59.522+1000 [DEBUG] plugin: plugin started: path=/home/trent/.terraform.d/plugins/linux_amd64/terraform-provider-test2 pid=20056
2018-11-29T07:48:59.522+1000 [DEBUG] plugin: waiting for RPC address: path=/home/trent/.terraform.d/plugins/linux_amd64/terraform-provider-test2
2018-11-29T07:48:59.541+1000 [DEBUG] plugin: using plugin: version=5
2018-11-29T07:48:59.541+1000 [DEBUG] plugin.terraform-provider-test2: plugin address: address=/tmp/plugin108198902 network=unix timestamp=2018-11-29T07:48:59.541+1000
2018/11/29 07:48:59 [TRACE] GRPCProvider: GetSchema
2018/11/29 07:48:59 [TRACE] GRPCProvider: PlanResourceChange
2018-11-29T07:48:59.794+1000 [WARN] plugin: plugin failed to exit gracefully
2018-11-29T07:48:59.795+1000 [DEBUG] plugin: plugin process exited: path=/home/trent/.terraform.d/plugins/linux_amd64/terraform-provider-test2 pid=20056 error="signal: killed"
Error: Failed to retrieve schema from provider "test2": rpc error: code = Unimplemented desc = unknown service proto.Provider
在我看来,我似乎必须为提供程序初始化其他内容才能使其正常运行。有什么想法吗?
答案 0 :(得分:0)
我设法通过检查github上的alpha 2分支来解决它。这里提供了更深入的答复。