IssueRaiser

Backends as plugins

### Summary In this RFC I explore the idea of supporting external backends using a plugin system identical to what OpenTF currently supports for modules. Note that this is not a commitment that it would be done, or that it would be done in a way described in this RFC. The purpose of this document is to describe one potential approach, and gauge overall interest. ### Problem Statement Since backends are an integral part of the OpenTF core, a user who wants or needs to upgrade to a new version of the backend (eg. supporting a new functionality they care about), they are forced to upgrade to a new version, which may be a significant amount of work for some cases. There are also cases where a sophisticates user wants to use a system that's not currently supported, limiting their choices to forking the project, or building an HTTP server that implements the [http API](https://developer.hashicorp.com/terraform/language/settings/backends/http) and forwards the requests to the external system. ### User-facing description The new feature could be built as a separate backend, thus not introducing any backwards incompatible changes. An example usage could look like this: ```terraform backend "plugin" { source = "oci:ghcr.io/myaccount/myrepo" version = ">= .04.5" // plugin-specific config } ``` ### Technical Description > Which components of OpenTF would be involved in the change? Based on my preliminary research, we would need to need to create a new implementation

Posted by marcinwyszynski on Sep 11, 2023, 12:03 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

github (Sysadmin)

Backends as plugins

marcinwyszynskiSep 11, 2023, 12:03 PM

### Summary In this RFC I explore the idea of supporting external backends using a plugin system identical to what OpenTF currently supports for modules. Note that this is not a commitment that it would be done, or that it would be done in a way described in this RFC. The purpose of this document is to describe one potential approach, and gauge overall interest. ### Problem Statement Since backends are an integral part of the OpenTF core, a user who wants or needs to upgrade to a new version of the backend (eg. supporting a new functionality they care about), they are forced to upgrade to a new version, which may be a significant amount of work for some cases. There are also cases where a sophisticates user wants to use a system that's not currently supported, limiting their choices to forking the project, or building an HTTP server that implements the [http API](https://developer.hashicorp.com/terraform/language/settings/backends/http) and forwards the requests to the external system. ### User-facing description The new feature could be built as a separate backend, thus not introducing any backwards incompatible changes. An example usage could look like this: ```terraform backend "plugin" { source = "oci:ghcr.io/myaccount/myrepo" version = ">= .04.5" // plugin-specific config } ``` ### Technical Description > Which components of OpenTF would be involved in the change? Based on my preliminary research, we would need to need to create a new implementation

Comments (0)

No comments yet. Start the discussion.

Comment on this issue