mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
feat: added debug points to test ssm integration in replication
This commit is contained in:
@@ -538,19 +538,21 @@ const syncSecretsAWSParameterStore = async ({
|
|||||||
integration,
|
integration,
|
||||||
secrets,
|
secrets,
|
||||||
accessId,
|
accessId,
|
||||||
accessToken
|
accessToken,
|
||||||
|
projectId
|
||||||
}: {
|
}: {
|
||||||
integration: TIntegrations;
|
integration: TIntegrations;
|
||||||
secrets: Record<string, { value: string; comment?: string }>;
|
secrets: Record<string, { value: string; comment?: string }>;
|
||||||
accessId: string | null;
|
accessId: string | null;
|
||||||
accessToken: string;
|
accessToken: string;
|
||||||
|
projectId?: string;
|
||||||
}) => {
|
}) => {
|
||||||
let response: { isSynced: boolean; syncMessage: string } | null = null;
|
let response: { isSynced: boolean; syncMessage: string } | null = null;
|
||||||
|
|
||||||
if (!accessId) {
|
if (!accessId) {
|
||||||
throw new Error("AWS access ID is required");
|
throw new Error("AWS access ID is required");
|
||||||
}
|
}
|
||||||
|
logger.info(`getIntegrationSecrets: [projectId=${projectId}] ssm debug: started`);
|
||||||
const config = new AWS.Config({
|
const config = new AWS.Config({
|
||||||
region: integration.region as string,
|
region: integration.region as string,
|
||||||
credentials: {
|
credentials: {
|
||||||
@@ -594,6 +596,12 @@ const syncSecretsAWSParameterStore = async ({
|
|||||||
nextToken = parameters.NextToken;
|
nextToken = parameters.NextToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.info(
|
||||||
|
`getIntegrationSecrets: [projectId=${projectId}] ssm debug: ${Object.keys(awsParameterStoreSecretsObj).join(",")}`
|
||||||
|
);
|
||||||
|
logger.info(
|
||||||
|
`getIntegrationSecrets: [projectId=${projectId}] ssm infisical secrets debug: ${Object.keys(secrets).join(",")}`
|
||||||
|
);
|
||||||
// Identify secrets to create
|
// Identify secrets to create
|
||||||
// don't use Promise.all() and promise map here
|
// don't use Promise.all() and promise map here
|
||||||
// it will cause rate limit
|
// it will cause rate limit
|
||||||
@@ -3678,7 +3686,8 @@ export const syncIntegrationSecrets = async ({
|
|||||||
integration,
|
integration,
|
||||||
secrets,
|
secrets,
|
||||||
accessId,
|
accessId,
|
||||||
accessToken
|
accessToken,
|
||||||
|
projectId
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case Integrations.AWS_SECRET_MANAGER:
|
case Integrations.AWS_SECRET_MANAGER:
|
||||||
|
|||||||
Reference in New Issue
Block a user