aws-secretsmanager-get-secrets
aws-secretsmanager-get-secrets copied to clipboard
Don't fail when no secrets are present
Currently, when loading secrets, if no secrets are found an exception is thrown:
if (secretsList.length === 0){
throw new Error(`No matching secrets were returned for prefix "${prefix}".`);
}
There are valid use cases where secrets may not (yet/ever) be present, such as using this action in a reusable composite GitHub Action, where any given repository may access AWS accounts that may or may not have secrets in Secrets Manager (if they do, they will be exposed).
Proposing adding a flag such as fail-on-empty-secrets to facilitate this.
Thanks for the report, @cloudshiftchris. We have added this as an enhancement request.