-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Unable (difficult) to use with GCP's KMS on Terraform Cloud #83
Comments
Hm, tricky. One "solution" is to run with self-hosted Terraform agents on GCE (then you will implicitly have service accounts that can be given permissions on the key), but that requires an Enterprise license, so might not be within reach for everyone. |
That would indeed be the best, but the price to access these self-hosted agents from Terraform Cloud is completely outside our price range so it definitely won't be an option for us any time soon 😞
I put all my hopes in getsops/sops#953 for now, let's see how that goes 😁 |
getsops/sops#953 + https://github.com/carlpett/terraform-provider-sops/releases/tag/v0.7.1 work like a charm on Terraform Cloud now :) |
Hello,
I was interested to use the sops provider on Terraform Cloud to decrypt secrets encrypted via GCP's KMS, but it's not possible to have it work correctly at the moment:
GOOGLE_APPLICATION_CREDENTIALS
environment variable.GOOGLE_APPLICATION_CREDENTIALS
variable must contain the path to a service account private key fileI understand this is more a sops / Google Cloud SDK issue, rather than the sops provider, but since this mostly affects restricted environment where we'd like to run Terraform, I wanted to raise this here.
There are a few possible alternatives at the moment:
Commit the credentials file directly into the repository used by Terraform Cloud and export
GOOGLE_APPLICATION_CREDENTIALS
to point to this local file. This is, for obvious reason, a huge no-no :)I haven't tried it, but it might be possible to work around the limitation with
local_file
, the credentials in a Terraform Cloud variable and a dependency between thelocal_file
and the data source. Something like this:I haven't tried: it's a bit ugly, but that may work is sops initialization is
lazy :)
Support initializing sops with an alternative variable, like the Terraform provider itself is doing using
GOOGLE_CREDENTIALS
.Without some help from sops, I'm not sure if that's doable though.
Any other idea on how to use the sops provider with Terraform Cloud and GCP?
The text was updated successfully, but these errors were encountered: