From 64b8cff6d40bd046a2531a4bb5b76bf9215368ba Mon Sep 17 00:00:00 2001 From: Steven Hoang Date: Mon, 1 Jul 2024 14:54:29 +0800 Subject: [PATCH] Update index.ts --- src/Common/Naming/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Common/Naming/index.ts b/src/Common/Naming/index.ts index 31655758..91cdca20 100644 --- a/src/Common/Naming/index.ts +++ b/src/Common/Naming/index.ts @@ -23,8 +23,8 @@ export const getStorageName = (name: string): string => { /** Get Vault Secret Name. Remove the stack name and replace all _ with - then lower cases. */ export const getSecretName = (name: string) => { - name = name.replace(`${stack}-`, ""); - name = name.replace(stack, ""); + name = replaceAll(name, `${stack}-`, ""); + name = replaceAll(name, stack, ""); name = replaceAll(name, " ", "-"); name = replaceAll(name, ".", "-"); return replaceAll(name, "_", "-").toLowerCase();