Hey! started using inifisical recently, its been ...
# infisical-help
n
Hey! started using inifisical recently, its been great! My issue is when i need a vercel project to have a staging (preview) env and a production env with the same variable names, i can do it manually in vercel and even via API myself but with infisical adding one env group wipes the previous one meaning i cannot have preview and prod env vars for the same project can anyone from the infisical team help us with this by any chance? 🙂 we really like the product so far and would like to get it fully working asap
✅ 1
v
Hi Noah! In your secret sync setup, did you create one sync for each environment?
n
Hi Victor thanks for getting back to us yes we set up secret sync for production and staging as separate syncs but they were still overwriting each other and wiping previous group so now we only have production on infisical
v
Do each of these syncs have a different environment in the source? For example, one is pointing to "Staging" like the screenshot below, and the other one is pointing to "Production"
n
Yep, exactly like that but lets say i first sync prod, it works then i sync staging, it wipes prod and replaces it with staging
v
Could you please check if your secret syncs look like the screenshots below?
n
cc @Aleem Rehmtulla
a
hey:)!! i work with noah attatched screenshots of our setup if i sync prod, it deletes all preview if i sync preview, it deletes all prod
^^note: our destination is on team scope not project scope
v
Hey Aleem! Thank you for the screenshots. I was able to reproduce the issue using the team scope. I'll forward it to our development team, and we'll work on it. I'll update you as soon as we have a fix ready.
🙌 3
🐐 3
n
Hi @Victor Santos seems we are running into another issue after this:
Copy code
{
  "secretKey": "SOME_VALUE",
  "error": {
    "error": {
      "code": "existing_key_and_target",
      "message": "The Shared Environment Variable key \"SOME_VALUE\" for selected target(s) already exists for this team."
    }
  }
}
not really sure what to do. Any advice would be greatly helpful our set up is as stated earlier in the thread, team scope and we selected optional projects to apply them to but every sync fails
v
Hey @Noah Gomes, Let me confirm, do you have the same setup you shared before? Did anything change? Asking so I can reproduce the issue here on my side.
n
Hi @Victor Santos, thanks for getting back to us indeed the same set up let me know if you need any more details 🙂
v
Thank you! Let me bring this to the team for investigation. I'll keep you posted!
🙌 1
Hey @Noah Gomes, could you try again, please? We updated the Vercel Secret Sync.
n
Hey! thanks for the fix, just synced and it worked 🙂
🙌 1
v
Happy to hear that! Let me know if I can help with anything else!
💙 1