hashicorp / terraform-plugin-go

A low-level Go binding for the Terraform protocol for integrations to be built on top of.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create terraform.io/plugin Section for terraform-plugin-go Documentation

bflad opened this issue · comments

terraform-plugin-go version

v0.5.0

Use cases

While the Go documentation for this project available at https://pkg.go.dev/github.com/hashicorp/terraform-plugin-go is fairly comprehensive for describing low level details, it can be challenging to tease out higher level concepts or functionality which having website documentation similar to SDKv2 and the framework would be very helpful for provider developers.

For example:

  • Terraform Plugin Protocol at a glance and how to inspect it (since this is important when working at this layer)
  • Creating gRPC servers
  • Environment variables used to control logging, contextual log key descriptions
  • Using tftypes.UnknownValue to indicate computed values will change, but also that it cannot be used during apply
  • (Needs more consideration, maybe its own section) Using terraform-plugin-mux to merge providers
  • When to use terraform-plugin-go, versus the other frameworks
  • Acceptance testing (beyond just the README)

Proposal

Create new section on the Terraform documentation website, e.g. https://www.terraform.io/plugin/go

  • Overview
  • Protocol
  • Provider Servers
  • Types and Values
  • Logging
  • Testing
    • Unit
    • Acceptance

Update https://www.terraform.io/plugin/which-sdk with appropriate details about when to use terraform-plugin-go.

References