Fail a pipeline job when defined secrets do not exist in Vault
Problem
Currently if a secret defined under the secrets
keyword does not exist in Vault the CI will not give any warning or error that that's the case but the environment-variable will bet set to <nil>
. Problem appears in Gitlab: 14.5.4-ee.
Proposal
MVC
Job should fail with an error in the 'Resolving secrets' part of the CI-job logs when the defined secrets don't exist in Vault, to match the experience users have via CLI. See related comment
Error text:
Secrets defined at /some/secret/path/FOO do not exist in Vault.
Edited by Dov Hershkovitch