You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
299 B
Bash

#!/bin/bash
# Fetch all secrets
export secrets=$(aws secretsmanager list-secrets --query "SecretList[].Name[]" | jq -r ".[]")
# Loop through and delete each one
while read -r line; do
echo "[+] Deleting ${line}";
aws secretsmanager delete-secret --secret-id "${line}";
done <<< "$secrets"