Open cfbao opened 1 year ago
Hi @cfbao! Thanks for this feature request.
Currently the two libraries written in Go are the only supported way to write a Terraform provider. Although it would be nice to support development in other languages eventually, developing the protocol and the official server implementations together allows for easier evolution for new features, and the new framework is still growing so the development focus is there.
For an unrelated side-project I defined a subset of this handshake protocol that happens to be Terraform compatible today, which might be a useful reference but I would caution that Terraform is not guaranteed to remain compatible with what I documented over there; I wrote that up for something totally unrelated to Terraform and so Terraform might change in future in ways that make it diverge from my third-party "rpcplugin" design.
I'm going to broaden the scope of this issue to be about supporting plugin development in languages other than Go, since that seems to be the original goal that led you to this proposal and I think that's the decision that would need to be made before it would make sense to explicitly document the handshake protocol and thereby encourage development of SDKs in other languages.
Thanks!
Terraform Version
Affected Pages
https://developer.hashicorp.com/terraform/plugin/terraform-plugin-protocol https://github.com/hashicorp/terraform/tree/main/docs/plugin-protocol
What is the docs issue?
There's a startup & handshake protocol for Terraform plugins. It's mentioned in the repo:
This creates a gap that prevents custom implementations of Terraform plugin framework (potentially in a different programming language).
Proposal
Document the Terraform plugin startup and handshake protocol.
References
No response