Plugin RPC API Documentation

Hi,

the documentation states that plugins are mostly written in go, and that terraform uses some kind of RPC api to communicate with the plugin, which i translate to, i can write a plugin in whatever language.

is there an documentation on this API? because i would like to write a plugin using python.

kind regards.

The documentation also says that no, the RPC API is not documented, and implementing in another language would be very challenging :slight_smile:

and i guess there are no active plans to document it?

I haven’t seen anything from HashiCorp indicating that, and based on what they have published I suspect it’s unlikely as it would increase their maintenance burden substantially.

Hey there,

Currently, our RPC for the SDK is using gRPC. If you look around in https://github.com/hashicorp/terraform a bit, you can find the protobuf files describing the protocol. There are also some docs on the protocol and resource lifecycles.

I’m being intentionally vague about this because right now the only support we offer is for building providers with our Go SDK. The technical ability for providers to be written in Python exists, but the support structures for it–places to ask questions, well-defined documents making it easy, communication channels tailored to developers operating at the protocol level, and tooling to support it–do not. Provider developers could, in theory, write a Python provider, but I would strongly encourage not doing that.

While we’re not closing the door on implementing providers in other languages, at the moment we’re focused on ensuring the developer experience with our Go SDK is up to our expectations. Other languages is a thing we’re keeping in the back of our minds, but it’s not something we’re actively investigating supporting at this time.

1 Like