Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Commit

Permalink
fix: add a accurate log message when AWS region is not defined in the…
Browse files Browse the repository at this point in the history
… Systems manager manifest (#648)

Signed-off-by: yutachaos <[email protected]>
  • Loading branch information
yutachaos authored Mar 9, 2021
1 parent 3409c66 commit 448305a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/backends/system-manager-backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ class SystemManagerBackend extends KVBackend {
* @returns {Promise} Promise object representing secret property value.
*/
async _get ({ key, specOptions: { roleArn, region } }) {
this._logger.info(`fetching secret property ${key} with role: ${roleArn || 'pods role'} in region: ${region || 'pods region'}`)

let client = this._client
let factoryArgs = null
if (roleArn) {
this._logger.info(`fetching secret property ${key} with role: ${roleArn} in region ${region}`)
const credentials = this._assumeRole({
RoleArn: roleArn,
RoleSessionName: 'k8s-external-secrets'
Expand All @@ -36,9 +37,8 @@ class SystemManagerBackend extends KVBackend {
...factoryArgs,
credentials
}
} else {
this._logger.info(`fetching secret property ${key} with pod role in region ${region}`)
}

if (region) {
factoryArgs = {
...factoryArgs,
Expand Down

0 comments on commit 448305a

Please sign in to comment.