From c7b02f03cf63e3cbdfb9a07add33b371f0df9c35 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Fri, 8 Sep 2023 17:13:36 -0700 Subject: [PATCH] rpcapi: Won't be TFC-only forever This is just a note to future maintainers to clarify the meaning of the initial end-user-facing error message that says this interface is only for Terraform Cloud. Targeting Terraform Cloud as a client first is just a means to get practical experience with this new style of integration before committing to support it as a general API. We would still like to make this a general-purpose integration point with compatibility guarantees in a later release, once this approach is more proven. --- internal/rpcapi/cli.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/internal/rpcapi/cli.go b/internal/rpcapi/cli.go index dfc01b418b..136f09b939 100644 --- a/internal/rpcapi/cli.go +++ b/internal/rpcapi/cli.go @@ -72,6 +72,24 @@ func (c cliCommand) Run(args []string) int { }) if err != nil { if err == ErrNotPluginClient { + // TODO: + // + // The following message says that this interface is for Terraform + // Cloud only because we're using Terraform Cloud's integration + // with it to try to prove out the API/protocol design. By focusing + // only on Terraform Cloud as a client first, we can accommodate + // any necessary breaking changes by ensuring that Terraform Cloud's + // client is updated before releasing an updated RPC API server + // implementation. + // + // However, in the long run this should ideally become a documented + // public interface with compatibility guarantees, at which point + // we should change this error message only to express that this + // is a machine-oriented integration API rather than something for + // end-users to use directly. For example, the RPC server is likely + // to make a better integration point for tools like the + // Terraform Language Server in future too, assuming it grows to + // include language analysis features. fmt.Fprintf( os.Stderr, `