mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix: secrets being deleted
This commit is contained in:
@@ -138,13 +138,12 @@ export const azureAppConfigurationSecretSyncFactory = ({
|
||||
|
||||
for await (const key of Object.keys(azureAppConfigSecrets)) {
|
||||
const azureSecret = azureAppConfigSecrets[key];
|
||||
if (!(key in secretMap) || secretMap[key] === null || azureSecret.label !== secretSync.destinationConfig.label) {
|
||||
await $deleteAzureSecret(
|
||||
accessToken,
|
||||
secretSync.destinationConfig.configurationUrl,
|
||||
key,
|
||||
azureSecret.label // use the secret's actual label for deletion
|
||||
);
|
||||
if (
|
||||
!(key in secretMap) ||
|
||||
secretMap[key] === null ||
|
||||
(azureSecret.label && azureSecret.label !== secretSync.destinationConfig.label)
|
||||
) {
|
||||
await $deleteAzureSecret(accessToken, secretSync.destinationConfig.configurationUrl, key, azureSecret.label);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -238,7 +238,8 @@ export const azureKeyVaultSecretSyncFactory = ({
|
||||
|
||||
Object.keys(vaultSecrets).forEach((key) => {
|
||||
if (!disabledAzureKeyVaultSecretKeys.includes(key)) {
|
||||
secretMap[key] = {
|
||||
const underscoredKey = key.replace(/-/g, "_");
|
||||
secretMap[underscoredKey] = {
|
||||
value: vaultSecrets[key].value
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user