为Terraform插件RPC协议自动生成的Python包
项目描述
inmanta-tfplugin
此包包含用于Terraform插件RPC协议生成的Python包
在inmanta中,此包由terraform模块使用,最初将其打包在模块的插件中,但由于与agent文件加载机制(inmanta-core#2205 和 inmanta-core#2323)与protobuf库(https://github.com/protocolbuffers/protobuf/issues/9535)的不兼容性,我们不得不将其移出
如何使用
import grpc
import inmanta_tfplugin.tfplugin5_pb2
import inmanta_tfplugin.tfplugin5_pb2_grpc
proto_addr = ""
channel = grpc.insecure_channel(proto_addr)
stub = inmanta_tfplugin.tfplugin5_pb2_grpc.ProviderStub(channel)
更完整的用法示例可以在inmanta的terraform模块中找到。
包版本
major
:用于生成包的源protobuf文件的主版本。minor
:用于生成包的源protobuf文件的次版本。patch
:由我们决定,如果我们要重新发布带有更高版本的生成包。