Last active
February 2, 2024 05:56
-
-
Save Rajaneeshs/d0a29e996be3830b8ea11cfa9ecab1f0 to your computer and use it in GitHub Desktop.
Revisions
-
Rajaneeshs revised this gist
Feb 2, 2024 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,3 +3,12 @@ aws resourcegroupstaggingapi get-resources --resource-type-filters "elasticloadb #Query LB using tag by native filter aws resourcegroupstaggingapi get-resources --tag-filters "Key=elbv2.k8s.aws/cluster, Values=test" --tags-per-page 100 --region eu-west-1|jq '.ResourceTagMappingList| .[].ResourceARN|select (test("targetgrou."))' #list ubuntu latest image by filter in all available regiosn for region in `aws ec2 describe-regions --output text | cut -f4` [11:21:11] do echo -e "\nListing AMI in region:'$region'..." aws ec2 describe-images --owners 679593333241 --filters "Name=name,Values=ubuntu-eks/k8s_1.27/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-202402*" --query 'Images | sort_by(@, &CreationDate) | [-1].ImageId' --output text --region $region done -
Rajaneeshs created this gist
Oct 28, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ #Query LB using tag by jq aws resourcegroupstaggingapi get-resources --resource-type-filters "elasticloadbalancing:loadbalancer" --tag-filters "Key=elbv2.k8s.aws/cluster, Values=test" --tags-per-page 100 --region eu-west-1 --query "ResourceTagMappingList[].ResourceARN" #Query LB using tag by native filter aws resourcegroupstaggingapi get-resources --tag-filters "Key=elbv2.k8s.aws/cluster, Values=test" --tags-per-page 100 --region eu-west-1|jq '.ResourceTagMappingList| .[].ResourceARN|select (test("targetgrou."))'