|
36 | 36 | |
|
37 | 37 | */
|
38 | 38 |
|
39 |
| - 'enabled-environments' => [ |
40 |
| - 'production', |
41 |
| - ], |
| 39 | + 'enabled-environments' => array_filter(explode(',', env('AWS_SECRETS_ENABLED_ENV', 'production'))), |
42 | 40 |
|
43 | 41 | /*
|
44 | 42 | |--------------------------------------------------------------------------
|
|
48 | 46 | | Some (not all) variables are set into the config, as such updating the env() will not overwrite
|
49 | 47 | | the config cached values. The variables below will overwrite the config.
|
50 | 48 | |
|
| 49 | + | Example: |
| 50 | + | .env |
| 51 | + | VARIABLES_CONFIG_KEYS=APP_KEY:app.key,OTHER_KEY:app.other_key |
| 52 | + | |
51 | 53 | */
|
52 |
| - 'variables-config' => [ |
53 |
| - 'APP_KEY' => 'app.key', |
54 |
| - ], |
| 54 | + |
| 55 | + 'variables-config' => collect(array_filter(explode(',', env('AWS_SECRETS_VARIABLES_CONFIGS', '')))) |
| 56 | + ->mapWithKeys(function ($pair) { |
| 57 | + [$envKey, $configKey] = explode(':', $pair); |
| 58 | + |
| 59 | + return [$envKey => $configKey]; |
| 60 | + }) |
| 61 | + ->toArray(), |
55 | 62 |
|
56 | 63 | /*
|
57 | 64 | |--------------------------------------------------------------------------
|
|
63 | 70 | |
|
64 | 71 | */
|
65 | 72 |
|
66 |
| - 'cache-enabled' => true, // boolean |
| 73 | + 'cache-enabled' => env('AWS_SECRETS_CACHE_ENABLED', true), |
67 | 74 |
|
68 | 75 | /*
|
69 | 76 | |--------------------------------------------------------------------------
|
|
74 | 81 | |
|
75 | 82 | */
|
76 | 83 |
|
77 |
| - 'cache-expiry' => 30, // minutes |
| 84 | + 'cache-expiry' => env('AWS_SECRETS_CACHE_EXPIRY', 30), |
78 | 85 |
|
79 | 86 | /*
|
80 | 87 | |--------------------------------------------------------------------------
|
|
86 | 93 | |
|
87 | 94 | */
|
88 | 95 |
|
89 |
| - 'cache-store' => 'file', |
| 96 | + 'cache-store' => env('AWS_SECRETS_CACHE_STORE', 'file'), |
90 | 97 |
|
91 | 98 | /*
|
92 | 99 | |--------------------------------------------------------------------------
|
|
0 commit comments