LoginSignup
0
0

More than 1 year has passed since last update.

describe-security-groups の内容を jqで整形

Last updated at Posted at 2021-08-03

セキュリティグループの設定を

# SG_IDには セキュリティグループIDを設定
# リスト指定も可能 (https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-security-groups.html)
SG_ID=sg-1234567 

# jqで整形して出力
aws ec2 describe-security-groups --group-ids ${SG_ID} | jq -r '.SecurityGroups[] | .IpPermissions[] | .FromPort, "    " + .IpRanges[].CidrIp'
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0