Skip to content

Commit c9a0499

Browse files
committed
use env variables
1 parent 7bd3439 commit c9a0499

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/LaravelAwsSecretsManager.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ protected function getVariables()
105105
$result = $this->client->getSecretValue([
106106
'SecretId' => $secret['ARN'],
107107
]);
108-
108+
$key = $result['Name'];
109+
$secret = $result['SecretString'];
110+
putenv("$key=$secret");
109111
$this->storeToCache($result['Name'], $result['SecretString']);
110112
}
111113
}
@@ -114,7 +116,7 @@ protected function getVariables()
114116
protected function updateConfigs()
115117
{
116118
foreach ($this->configVariables as $variable => $configPath) {
117-
config([$configPath => Cache::store($this->cacheStore)->get($variable)]);
119+
config([$configPath => env($variable)]);
118120
}
119121
}
120122

0 commit comments

Comments
 (0)