From 536c143fa7c7d3ab961a46ce480be251b99a99a6 Mon Sep 17 00:00:00 2001 From: Gil Freund Date: Sun, 24 Oct 2021 07:36:18 +0300 Subject: [PATCH] Make removal or aws prefixes more general Handle aws- as well as as aws: Co-authored-by: Christopher Mundus <17323411+crashGoBoom@users.noreply.github.com> --- bin/create-ebs-volume | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/create-ebs-volume b/bin/create-ebs-volume index 6c0bfd6..6857564 100755 --- a/bin/create-ebs-volume +++ b/bin/create-ebs-volume @@ -168,7 +168,7 @@ function create_and_attach_volume() { instance_tags=$( aws ec2 describe-tags \ --region $region \ - --filters "Name=resource-id,Values=$instance_id" | jq -r .Tags | jq -c 'map({Key, Value})' | tr -d '[]"' | sed 's/{Key:/{Key=/g ; s/,Value:/,Value=/g ; s/{Key=aws:.*}//g ; s/,,/,/g ; s/,$//g ; s/^,//g' + --filters "Name=resource-id,Values=$instance_id" | jq -r .Tags | jq -c 'map({Key, Value})' | tr -d '[]"' | sed 's/{Key:/{Key=/g ; s/,Value:/,Value=/g ; s/{Key=aws.*}//g ; s/,,/,/g ; s/,$//g ; s/^,//g' ) local max_attempts=10