Repository navigation
need to encrypt user and password string in a yaml file using a regex #964
Replies: 1 comment
|
Use For the filename creation_rules:
- path_regex: '(^|/)myfile[.]yaml
kms: 'arn:aws:kms:REGION:ACCOUNT_ID:key/KEY_ID'
encrypted_regex: '^admin-(user|password)$'Replace the KMS placeholder with your actual KMS key ARN. The ARN shown in the question ends in Then encrypt the original plaintext file explicitly: sops --encrypt --in-place myfile.yamlWithout The current configuration reference documents these selectors and the KMS ARN format. The regex matches key names at any depth, so other keys with exactly those names will be selected too. A later Without The current configuration reference documents these selectors and the KMS ARN format. The regex matches key names at any depth, so other keys with exactly those names will be selected too. A later |
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
I have the following data file:
I need to encrypt the admin-user and admin-password values with sops.
my .sops config file is:
when I try encrypting in the command line with:
sops --encrypt --unencrypted-regex '(admin-[a-z]*)' myfile.yamlit seems to be working, but when I try to encrypt the file itself, it fails with the following error message:
sops metadata not foundmy question is, how can I encrypt the admin-user and admin-password strings with sops ?
thanks
All reactions