Secrets should really be stored in services, not files outside of maybe a single bootstrap file (unless you're working on the secret storage service itself).
I generate my secrets once, send them off to the secrets service, and then my service queries that service. I never see the secrets with my own eyes.
The idea is that you keep the name of the secret, and grant access to the secret manager via roles / policies which are generally open to devs on a subnet for a development environment but locked down in production environments.