New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support HCL files #292
Comments
We don't use HCL at Mozilla, so it's unlikely we'll write support for it. However, we're happy to help review patches from the community. |
Note that all HCL can be represented as JSON (i.e. you can configure at least Terraform using JSON rather than HCL). We use terraform apply -var-file=<(sops -d secret.tfvars.json) There are also some HCL to JSON (and vice versa) converters around that might help workaround this use case. |
@sixfeetover @negz As another Terraform solution, I just created https://github.com/carlpett/terraform-sops, which lets you use a sops-encrypted file as a data source |
@carlpett Oh, very clever |
This is awesome! @autrilla: could we host this under |
I'd really like to use sops for Although yes its perfectly possible to implement a fancy |
@autrilla I'd be perfectly fine with that, but I think a better goal would be to have it hosted in the "official third-party" organization terraform-providers. That way, it'll be possible to download automatically, rather than doing a manual install. @starkers I actually started off by looking at that, but found this approach seemed easier to use to me. But maybe I missed something! How was your intended workflow? |
@starkers Take a look at #292 (comment) - Terraform will happily load JSON encoded tfvars files. From https://github.com/hashicorp/hcl:
|
@carlpett yeah, that sounds better. Do you know what the process looks like to get it included there? |
@carlpett thanks for sharing, as we were already using mozilla/sops - your provider allows our infra team to easily git clone and terraform apply without having to worry about custom make rules or tfvars I did have to do the following to get this working on OSX:
|
@carlpett any progress on getting terraform-sops hosted with terraform-providers? What needs to be done to make that happen? |
Thanks for poking on this @abeluck, I had let it slip for quite a while. Back when this discussion was started, the "Terraform Provider Development Program" was just about to start, and there was no clear way to enroll in it. I see now though that it is possible to sign up via a web form, so I'll get on it :) |
It will be nice to have |
hi everyone, do we have any update on this issue? |
sops has no builtin support for HCL files. If you're using terraform you can use @carlpett's terraform-provider-sops to load sops files (json or yaml) into terraform. It works very well. Also shout out to terragrunt which lets you decrypt sops files as part of your terraform+terragrunt workflow. |
@abeluck thx for info. I'm aware of that. I also considered this option. |
Would love to see support for HCL. HCL is used for a lot of configuration files as part of the Hashicorp stack (Vault, Terraform, etc).
The text was updated successfully, but these errors were encountered: