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

Enhance info log message about region for AWS System Manager backend #648

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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