diff options
author | Ben Burwell <ben@benburwell.com> | 2019-08-13 14:53:03 -0400 |
---|---|---|
committer | Ben Burwell <ben@benburwell.com> | 2019-08-13 14:53:03 -0400 |
commit | 8455351e962997b84aac02c53e9f6db4f739cad9 (patch) | |
tree | 7083abd283a91918b8b75faeed9fe087ff08cd63 /templates | |
parent | 510b0c47434347f899e6d6815c60522434d7d5b9 (diff) |
jq: adopt
Diffstat (limited to 'templates')
-rw-r--r-- | templates/.jq/aws.jq | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/templates/.jq/aws.jq b/templates/.jq/aws.jq new file mode 100644 index 0000000..2a3cd54 --- /dev/null +++ b/templates/.jq/aws.jq @@ -0,0 +1,12 @@ +def gettag(name): .Tags[] | select(.Key == name).Value; + +def getInstanceMetadata: .Reservations[].Instances[] | + [ + .PrivateIpAddress, + .PublicIpAddress // "--", + gettag("Name") // "--", + .InstanceId, + .InstanceType + ] | + join("\t"); + |