I need to encrypt a file using SOPS. The string I am trying to encrypt is the "XXXXXXXX" part below:
aws=($(aws sts assume-role --role-arn arn:aws:iam::XXXXXXXXXXXXX:role/dummy --role-session-name sandbox | jq -r '.Credentials[]'))
my sops config file is :
---
creation_rules:
- path_regex: upgrade.sh
kms: 'arn:aws:kms:eu-west-1:#########################role/kms_helm_secrets'
encrypted_suffix: XXXXXXXXXXXXX
I know the above is not correct because I copied it from another git repo which is using kms/helm..
I just need to know how to tell SOPS to encrypt what is the in encrypted_suffix part as I believe this is where you write the expression you want to encrypt.
Thanks for your help.
Logic to locate line containing "encrypted_suffix:" in input file, parse that line, transform using encryption function, then output with new value inserted.
Session log: