ec2-ssh-cli
Advanced tools
Comparing version 0.0.1 to 0.0.2
20
index.js
@@ -22,6 +22,20 @@ #!/usr/bin/env node | ||
let choices = items.map((instance) => { | ||
let { InstanceId, PrivateIpAddress } = instance | ||
return `Instance ID: ${InstanceId} IP: ${PrivateIpAddress}`; | ||
}); | ||
//console.log(JSON.stringify(instance, null, 4)); | ||
let { InstanceId, PrivateIpAddress, State, Tags } = instance | ||
let version, cluster; | ||
try { | ||
version = Tags.find(tag => tag.Key === "version").Value; | ||
} catch (error) { | ||
cluster = "Unknown"; | ||
} | ||
try { | ||
instanceName = Tags.find(tag => tag.Key === "Name").Value; | ||
} catch (error) { | ||
instanceName = "Unknown"; | ||
} | ||
return `${instanceName} ${version} ${InstanceId} ${State.Name} ${PrivateIpAddress}`; | ||
}).sort(); | ||
// allow the choice to quit | ||
@@ -28,0 +42,0 @@ choices.push(QUIT); |
{ | ||
"name": "ec2-ssh-cli", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "command line interface for sshing into ec2 instances", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3536
72