Skip to content

Commit 04627b8

Browse files
committed
feat: add unset key script
1 parent 800e033 commit 04627b8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.scripts/secret-unset-key.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
if [ "$#" -ne 2 ]; then
4+
echo "既にsopsで暗号化されたSecretのキーを削除します。"
5+
echo "Usage: $0 filename key" >&2
6+
echo "Example: $0 traq/secrets/env.yaml MY_ENV_NAME" >&2
7+
exit 1
8+
fi
9+
10+
set -eux
11+
12+
sops --config .sops.yaml unset "$1" "[\"stringData\"][\"$2\"]"

0 commit comments

Comments
 (0)