In this example you are setting the secret to the string literal value "~/.ssh/id_rsa"
which is why you are getting the invalid format
error. If you want to read the secret from local file you need to prefix the path with the @
symbol, for example, --data @/home/.ssh/id_rsa