-
-
Notifications
You must be signed in to change notification settings - Fork 998
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
Error on sops_decrypt_file() function : failed: Error getting data key #1486
Comments
Thanks for the bug report. Are you using AWS KMS to encrypt secrets with kops? And if so, how are you authenticating to AWS? |
@brikis98 Yes I am using AWS KMS for both encryption and decryption. For auth, I am using named profiles with the variable |
Hm, it's possible that the current |
you need to set your AWS_PROFILE env to dev it looks like, |
Agree that it seems like terragrunts sops implementation is not respecting profiles correctly. I get this error when the sops file has This is a legitimate use case, where I am executing all terraform/terragrunt code via an IAM user in a management account and AssumeRole, and my sops files are encrypted using keys that are specific to each concrete account. Then my However, I have worked around this by having the sops files also set the |
Using
I ended up with a workaround setting roles directly inside key groups
|
Are you using AWS Single Sign-On and your profile is on If not, and your are using |
Updating to terragrunt 0.28.22 fixed this issue for me. |
for what it's worth, the config spec is here i haven't seen any examples/docs/tests with the |
Hi, https://github.com/gruntwork-io/terragrunt/releases/tag/v0.36.8 |
Context
Versions:
terraform: v0.14.4
terragrunt: v0.27.0
sops: 3.6.1 (latest)
Steps:
I have configured SOPS with generator:
.sops.yaml
To generate a file
sops secrets.dev.yaml
It generates file with encryption as:
SOPS usage
sops secrets.dev.yaml
sops -d secrets.dev.yaml
Both Encryption and Decryption are working as expected.
Using in terragrunt:
terragrunt.hcl
Error:
Expected Behaviour
Able to decrypt and use it in locals in terragrunt
The text was updated successfully, but these errors were encountered: