Open
Description
Hi,
Similarly to the decrypt package, would it be possible to do something similar for encryption?
I would like to SOPS-encrypt files from a self-contained internal Go binary.
Any thoughts?
Reacted by Romain Barissat, Dovave Maier, Dee Kryvenko, Lee, RixTmobilender, Wesley Kirkland, Reeto Chatterjee, Jacek, Reuenthal767, Paolo Velati and 20 more
Metadata
Metadata
Assignees
Labels
No labels
Activity
politician commentedon Sep 19, 2021
I would really much like to see this also.
I am working on a complete stack automating infrastructure as much as possible using Terraform and while I can generate GPG keys, and decrypt SOPS files, it's a shame I cannot encrypt them natively.
dee-kryvenko commentedon Oct 5, 2021
I'm a creator of https://github.com/plumber-cd/terraform-backend-git and I am interested in using this project as a library to encrypt and decrypt Terraform state files at rest. I haven't had a chance to look into the code yet, but does this means I can't use this as a library to encrypt at all or does it means it's just going to be harder / hacky?
isaacsanders commentedon Feb 21, 2023
Can you not use the packages used in this file? https://github.com/mozilla/sops/blob/master/cmd/sops/encrypt.go
valorl commentedon Feb 22, 2023
Likely, but there's still a considerable amount of code in
main(not just in this file) here that you'd have to copy / re-implement yourself. Would be nice to have an interface that's actually designed to be consumed outside of this CLI, also from the support/stability perspective.manute commentedon May 2, 2026
Hey,
I am working with this project and I would love to have an encrypt pkg, so I just created this #2166 to export it and change all the references to it. Please, any feedback really appreciated, thanks!