tf-provider 0.2.2

Plugin framework for Terraform and ToFu
Documentation
syntax = "proto3";
package plugin;
option go_package = "plugin";
// https://github.com/hashicorp/go-plugin/blob/master/internal/plugin/grpc_broker.proto
message ConnInfo {
    uint32 service_id = 1;
    string network = 2;
    string address = 3;
    message Knock {
        bool knock = 1;
        bool ack = 2;
        string error = 3;
    }
    Knock knock = 4;
}

service GRPCBroker {
    rpc StartStream(stream ConnInfo) returns (stream ConnInfo);
}

// https://github.com/hashicorp/go-plugin/blob/master/internal/plugin/grpc_controller.proto
message Empty {
}

// The GRPCController is responsible for telling the plugin server to shutdown.
service GRPCController {
    rpc Shutdown(Empty) returns (Empty);
}

// https://github.com/hashicorp/go-plugin/blob/master/internal/plugin/grpc_stdio.proto
import "google/protobuf/empty.proto";

// GRPCStdio is a service that is automatically run by the plugin process
// to stream any stdout/err data so that it can be mirrored on the plugin
// host side.
service GRPCStdio {
  // StreamStdio returns a stream that contains all the stdout/stderr.
  // This RPC endpoint must only be called ONCE. Once stdio data is consumed
  // it is not sent again.
  //
  // Callers should connect early to prevent blocking on the plugin process.
  rpc StreamStdio(google.protobuf.Empty) returns (stream StdioData);
}

// StdioData is a single chunk of stdout or stderr data that is streamed
// from GRPCStdio.
message StdioData {
  enum Channel {
    INVALID = 0;
    STDOUT = 1;
    STDERR = 2;
  }

  Channel channel = 1;
  bytes data = 2;
}