Open ncmans opened 4 years ago
Hey @ncmans thanks for the suggestion. :)
We're currently hard at work thinking about how to open up more options for state backends without putting the Terraform team in the critical path of merging, maintenance and ownership.
We don't have an answer yet, but appreciate the effort you've put in here and hope to return in the not-so-distant future with some solutions specifically around when an unsupported state backend is desired by the user
.
Stay tuned!
Current Terraform Version
Use-cases
Create an escape hatch for when an unsupported state backend is desired by the user.
Some scenarios:
Attempted Solutions
Currently, the only available and customizable backend is the http backend. However, it involves running a program separately first and handling of the HTTP protocol. This adds quite a bit of friction compared to say a one line shell script that pipes the state into
kubectl
to be stored on kubernetes. The identity of the OS user running terraform is also lost which makes running this setup securely a little challenging.Proposal
I propose to having a backend called
exec
which like the http backend allows defining custom actions for each state event. The actions would be the shell command that will be run by terraform and state passed onto them in stdin and read from stdout of the called program.References