Skip to content
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

no matching destination found in config when publishing to vault if directory have other files #1620

Open
ReyJust opened this issue Sep 16, 2024 · 0 comments

Comments

@ReyJust
Copy link

ReyJust commented Sep 16, 2024

sops --config .sops.yml --verbose publish --recursive secrets

[SOPS]   INFO[0000] Data key recovered successfully              
[SOPS]   DEBU[0000] Decrypting tree                              
uploading /secrets/project/a/prod/credentials.enc.yml to 127.0.0.1:8200/v1/secrets/data//project/a/prod/credentials.enc.yml ? (y/n): y
error loading config: no matching destination found in config

Because of parameters.yml sops cannot publish further after that file, even if my regex doesn't capture it.

.
└── project
    ├── a
    │   └── prod
    │       ├── credentials.enc.yml
    │       └── parameters.yml <-- Cause of fail
    └── b
        └── base
            └── credentials.enc.yml

.sops.yaml

[...]
destination_rules:
  - vault_path: "/"
    vault_kv_mount_name: "secret/"
    vault_kv_version: 2
    path_regex: .*\/project\/.*\.enc\.yml$

Testing the regex:

find . -type f | grep -E '^.*/project/.*\.enc\.yml$'       

./secrets/project/a/prod/credentials.enc.yml
./secrets/project/b/base/credentials.enc.yml

If I remove parameters.yml (which is empty), publishing with sops works perfectly. I also tried copying the content of credentials.enc.yml to parameters.yml without success

Thanks for any help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant