-
Notifications
You must be signed in to change notification settings - Fork 878
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
path_regex
is matching on relative path of working directory only
#465
Comments
This is kind of like #242 |
I think a simple solution that would do what you want is expanding the path here: Such that for instance if you call |
Thanks for the answer. |
Fixed by #466 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have such set up in
.sops.yaml
which is located in the project root:When I try to encrypt my secret
<project_root>/asia/production/a/b/c/
sops secrets.enc.yaml
The encrypted file did not use the expected rule for production, instead it used the fallback rule which is using kms key
arn:aws:kms:*:**:key/bb
.To make this work, I need to specify the matching regex part in the path like this:
<project_root>/asia/production/a/b/c/
sops ../../../../production/a/b/c/secrets.enc.yaml
or
<project_root>/
sops asia/production/a/b/c/secrets.enc.yaml
i.e.
production
must be in the path passing to sops.There is no extra explanation in README saying what path
path_regex
is matching to.https://github.com/mozilla/sops#using-sops-yaml-conf-to-select-kms-pgp-for-new-files
I am expecting
path_regex
with be matching the path starting from the.sops.yaml
it belongs to. Then my first case will work as expected.PS. I have not tested but I think it is possible to create a
.sops.yaml
under every environment (e.g./asia/prodcution/.sops.yaml
,/eu/staging/.sops.yaml
) to achieve what I want to do. However it will be tedious as the environment combination can grow large.The text was updated successfully, but these errors were encountered: