mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix: correct remove oci secret if secret value is empty logic
This commit is contained in:
@@ -213,8 +213,8 @@ export const OCIVaultSyncFns = {
|
||||
for await (const [key, variable] of Object.entries(variables)) {
|
||||
// Only update / delete active secrets
|
||||
if (variable.lifecycleState === vault.models.SecretSummary.LifecycleState.Active) {
|
||||
if (key in secretMap) {
|
||||
if (variable.value !== secretMap[key].value && secretMap[key].value.length > 0) {
|
||||
if (key in secretMap && secretMap[key].value.length > 0) {
|
||||
if (variable.value !== secretMap[key].value) {
|
||||
try {
|
||||
await updateOCIVaultVariable({
|
||||
compartmentId: compartmentOcid,
|
||||
@@ -230,7 +230,7 @@ export const OCIVaultSyncFns = {
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if (!secretSync.syncOptions.disableSecretDeletion || !secretMap[key].value) {
|
||||
} else if (!secretSync.syncOptions.disableSecretDeletion) {
|
||||
try {
|
||||
await deleteOCIVaultVariable({
|
||||
compartmentId: compartmentOcid,
|
||||
|
||||
Reference in New Issue
Block a user