From: Andreas Gerler Date: Wed, 16 Mar 2016 13:09:51 +0000 (+0100) Subject: aws snippets for the world! X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=b79cc771d3cf5fabb73adf49e25a3748187a1ff1;p=emacsconfig.git aws snippets for the world! - adding aws-elb-search to search through all load balancers to grep for eg an instance-id. --- diff --git a/snippets/eshell-mode/aws-elb-search b/snippets/eshell-mode/aws-elb-search new file mode 100644 index 00000000..080e8ea8 --- /dev/null +++ b/snippets/eshell-mode/aws-elb-search @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: aws-elb-search +# key: aws-elb-search +# -- +for REGION in `(insert-string (mapconcat 'identity bba-aws-regions " "))`; do + for BALANCER in \`aws --profile=${1:$$(yas-choose-value '("prod" "test"))} --region=\${REGION} elb describe-load-balancers --query "reverse(sort_by(LoadBalancerDescriptions, &CreatedTime)[].[LoadBalancerName])" --output text\`; do + aws --profile=$1 --region=\${REGION} elb describe-load-balancers --load-balancer-name \${BALANCER} --output text | awk "{print \\"\${REGION}:\${BALANCER}:\\"\\\$0}" + done +done $0 diff --git a/snippets/eshell-mode/aws-filters b/snippets/eshell-mode/aws-filters index 63e0c391..42755bd4 100644 --- a/snippets/eshell-mode/aws-filters +++ b/snippets/eshell-mode/aws-filters @@ -2,4 +2,4 @@ # name: aws-filters # key: awsfil # -- ---filters "Name=${1:$$(yas-choose-value '("tag:Name" "tag:Project" "tag:Type" "instance.group-id" "private-ip-address"))},Values=$2" $0 \ No newline at end of file +--filters "Name=${1:$$(yas-choose-value '("tag:Name" "tag:Project" "tag:Type" "tag:Cluster" "instance.group-id" "private-ip-address"))},Values=$2" $0 \ No newline at end of file