TappNetwork / laravel-aws-secrets-manager

Manage environment secrets using AWS Secrets Manager.
MIT License
33 stars 20 forks source link

Update env vars before being set in config #27

Open gilbitron opened 2 months ago

gilbitron commented 2 months ago

Manually maintaining the list of config variables that need to be overridden in variables-config is cumbersome and a headache for larger projects. Would there be a way to inject the environment variables before the config is set? Maybe using a command to pull and set the variables in the environment before running php artisan config:cache? So you could do something like this:

php artisan fetch-secrets-from-aws
php artisan config:cache