This repository was archived by the owner on Feb 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
This repository was archived by the owner on Feb 16, 2023. It is now read-only.
Create a Native State Backend #32
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
We're currently using the secrethub-http-proxy as an HTTP state backend now, but preferably we'd like to write a custom state backend.
However, seeing as state backends aren't pluggable yet we will have to create a fork of the Terraform project and add our state there. For people to actually be able to use the backend though, we'd have to get it merged back into the Terraform project and included in the next release.
If you want us to push this native backend through, please take a moment to +1 👍 this issue and we'll prioritize it on the roadmap.
Implementation details
Technically speaking, it shouldn't be too difficult a task:
- Add a folder
backend/remote-state/secrethub
: https://github.com/hashicorp/terraform/tree/master/backend/remote-state - Implement the
backend.Backend
interface. For inspiration, check out the S3 and HTTP implementations: - Looking at the patterns other backends use, we would then create a small wrapper around the
secrethub-go/pkg/secrethub.Client
interface that implements the Terraform specific logic, similar to thehttpClient
type and have oursecrethub.Backend
type use that. - Most of the thinking for what the code should do in the
Get
,Update
,Delete
functions is actually already done in the proxy for the HTTPGET
,UPDATE
, andDELETE
handler functions. - Submit a PR and bob's your uncle 🎉
SimonBarendse, florisvdg, awsum, bhoriuchi, phil737 and 9 more
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed