mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 20:27:12 +00:00
Merge pull request #934 from Infisical/aws-ps-integration-fix
Add support for syncing secrets containing / to AWS parameter store integration
This commit is contained in:
@@ -688,15 +688,17 @@ const syncSecretsAWSParameterStore = async ({
|
|||||||
const parameterList = (await ssm.getParametersByPath(params).promise()).Parameters;
|
const parameterList = (await ssm.getParametersByPath(params).promise()).Parameters;
|
||||||
|
|
||||||
let awsParameterStoreSecretsObj: {
|
let awsParameterStoreSecretsObj: {
|
||||||
[key: string]: any; // TODO: fix type
|
[key: string]: any;
|
||||||
} = {};
|
} = {};
|
||||||
|
|
||||||
if (parameterList) {
|
if (parameterList) {
|
||||||
awsParameterStoreSecretsObj = parameterList.reduce(
|
awsParameterStoreSecretsObj = parameterList.reduce(
|
||||||
(obj: any, secret: any) => ({
|
(obj: any, secret: any) => {
|
||||||
...obj,
|
return ({
|
||||||
[secret.Name.split("/").pop()]: secret
|
...obj,
|
||||||
}),
|
[secret.Name.substring(integration.path.length)]: secret
|
||||||
|
});
|
||||||
|
},
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user