Skip to content

Commit

Permalink
Merge pull request #8 from TappNetwork/add-enable-config
Browse files Browse the repository at this point in the history
Add enable config
  • Loading branch information
swilla authored Sep 15, 2020
2 parents 84387d7 + c2650da commit 4f04b77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/

'region' => env('AWS_DEFAULT_REGION'),
'enable-secrets-manager' => env('ENABLE_SECRETS_MANAGER', false),

/*
|--------------------------------------------------------------------------
Expand Down
6 changes: 4 additions & 2 deletions src/LaravelAwsSecretsManagerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ public function boot()
}

// Load Secrets
$secretsManager = new LaravelAwsSecretsManager();
$secretsManager->loadSecrets();
if (config('aws-secrets-manager.enable-secrets-manager')) {
$secretsManager = new LaravelAwsSecretsManager();
$secretsManager->loadSecrets();
}
}

/**
Expand Down

0 comments on commit 4f04b77

Please sign in to comment.