chore: add log on empty value being pushed to gcp

This commit is contained in:
Meet
2024-09-13 03:52:09 +05:30
parent 53b9fe2dec
commit a55d64e430

View File

@@ -207,6 +207,12 @@ const syncSecretsGCPSecretManager = async ({
}
);
if (!secrets[key].value) {
logger.warn(
`[GCP_SECRET_SYNC_1]: Empty secret value for key: ${key} and integration appId: ${integration.appId}`
);
}
await request.post(
`${IntegrationUrls.GCP_SECRET_MANAGER_URL}/v1/projects/${integration.appId}/secrets/${key}:addVersion`,
{
@@ -237,6 +243,12 @@ const syncSecretsGCPSecretManager = async ({
}
);
} else if (secrets[key].value !== res[key]) {
if (!secrets[key].value) {
logger.warn(
`[GCP_SECRET_SYNC_2]: Empty secret value for key: ${key} and integration appId: ${integration.appId}`
);
}
await request.post(
`${IntegrationUrls.GCP_SECRET_MANAGER_URL}/v1/projects/${integration.appId}/secrets/${key}:addVersion`,
{