updated aws_kms_key_rotation_enabled.sh

pull/2/head
Hari Sekhon 3 years ago
parent 85af4e6bc9
commit d30dca7635

@ -38,11 +38,12 @@ usage_args=""
help_usage "$@" help_usage "$@"
export AWS_DEFAULT_OUTPUT=json
aws kms list-keys --output json | aws kms list-keys |
jq -r '.Keys[].KeyId' | jq -r '.Keys[].KeyId' |
while read -r key; do while read -r key; do
printf '%s\t' "$key" printf '%s\t' "$key"
aws kms get-key-rotation-status --key-id "$key" --output json | aws kms get-key-rotation-status --key-id "$key" |
jq -r '.KeyRotationEnabled' || : # continue leaving blank if no permissions on a given key jq -r '.KeyRotationEnabled' || : # continue leaving blank if no permissions on a given key
done done

Loading…
Cancel
Save