Skip to content

Commit

Permalink
Refactored naming convention
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego committed Dec 11, 2019
1 parent 374cbf5 commit 56cab02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@


#### Load secrets in AWS Secret Manager as key/value pairs
Naming convention: `<appname>/<env>/<conn_name> `
**Ex: Blog/stage/mysql**
Naming convention: `<env>/<appname>/<conn_name> `
**Ex: stage/Blog/mysql**


#### Database configuration
Expand Down
4 changes: 2 additions & 2 deletions src/Extentions/DatabaseManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protected function configuration($name)

$dbconf = Config::get("database.connections." . $name);
//if db driver is secret we get it from rest api / cache
if ($dbconf['driver'] == 'secret') {
if ($dbconf['driver'] == 'secret-db') {
$config = $this->getSecret($name);
if (is_null($config)) {
//check if config is in cache
Expand Down Expand Up @@ -61,7 +61,7 @@ public function getSecret($secret)
'region' => env('AWS_REGION'),
]);

$secretName = config('app.name') . '/' .config('app.env') . '/' . $secret;
$secretName = config('app.env') . '/'.config('app.name') . '/' . $secret;

try {
$result = $client->getSecretValue([
Expand Down

0 comments on commit 56cab02

Please sign in to comment.