mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Update filter for trusted IPs backfill
This commit is contained in:
@@ -570,20 +570,19 @@ export const backfillTrustedIps = async () => {
|
|||||||
|
|
||||||
if (workspaceIdsToAddTrustedIp.length > 0) {
|
if (workspaceIdsToAddTrustedIp.length > 0) {
|
||||||
const operations = workspaceIdsToAddTrustedIp.map((workspaceId) => {
|
const operations = workspaceIdsToAddTrustedIp.map((workspaceId) => {
|
||||||
const update = {
|
|
||||||
workspace: workspaceId,
|
|
||||||
ipAddress: "0.0.0.0",
|
|
||||||
type: IPType.IPV4,
|
|
||||||
prefix: 0,
|
|
||||||
isActive: true,
|
|
||||||
comment: ""
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
updateOne: {
|
updateOne: {
|
||||||
filter: update,
|
filter: {
|
||||||
|
workspace: workspaceId,
|
||||||
|
ipAddress: "0.0.0.0"
|
||||||
|
},
|
||||||
update: {
|
update: {
|
||||||
$setOnInsert: update
|
workspace: workspaceId,
|
||||||
|
ipAddress: "0.0.0.0",
|
||||||
|
type: IPType.IPV4.toString(),
|
||||||
|
prefix: 0,
|
||||||
|
isActive: true,
|
||||||
|
comment: ""
|
||||||
},
|
},
|
||||||
upsert: true,
|
upsert: true,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user