This commit is contained in:
Tuan Dang
2023-09-04 12:49:11 +01:00
11 changed files with 29 additions and 28 deletions
+7 -5
View File
@@ -691,15 +691,17 @@ const syncSecretsAWSParameterStore = async ({
const parameterList = (await ssm.getParametersByPath(params).promise()).Parameters;
let awsParameterStoreSecretsObj: {
[key: string]: any; // TODO: fix type
[key: string]: any;
} = {};
if (parameterList) {
awsParameterStoreSecretsObj = parameterList.reduce(
(obj: any, secret: any) => ({
...obj,
[secret.Name.split("/").pop()]: secret
}),
(obj: any, secret: any) => {
return ({
...obj,
[secret.Name.substring(integration.path.length)]: secret
});
},
{}
);
}