Hi :wave: While working on private terraform prov...
# terraform
y
Hi 👋 While working on private terraform providers I realised lot of boilerplate code was being re-written, there was also a pattern in terraform code, which also constantly got updated. For our case Protobuf and gRPC was the reason for the pattern as it was used to communicate with provider backend service. We wrote https://github.com/travix/protoc-gen-gotf a protoc plugin that generates go code for terraform provider using protobuf messages and services. It implements methods on generated proto message structs so they can be used as custom objects/ models in terraform blocks. It can also inject gRPC clients into block executors to simplify client initialisation and use. After generating code all you would need to do is implement gRPC call in provider executors. We hope for simpler providers that use protobuf and gRPC this can speed up development process and reduce lot of maintenance work synchronising schema/ attributes See https://github.com/travix/gotf-example a working example of provider build using this plugin