Class: CloudFormationTool::CLI::Groups
- Inherits:
-
Clamp::Command
- Object
- Clamp::Command
- CloudFormationTool::CLI::Groups
- Includes:
- CloudFormationTool
- Defined in:
- lib/cloud_formation_tool/cli/groups.rb
Constant Summary
Constants included from CloudFormationTool
Instance Method Summary collapse
Methods included from CloudFormationTool
#aws_config, #awsas, #awscdn, #awscf, #awscreds, #awsec2, #awsecs, #awss3, #cf_bucket_name, #find_profile, #profile, #region, #s3_bucket_name
Instance Method Details
#execute ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/cloud_formation_tool/cli/groups.rb', line 9 def execute st = CloudFormation::Stack.new(stack_name) output = st.asgroups.collect do |res| { name: res.logical_resource_id, res: res.physical_resource_id, len: res.logical_resource_id.length } end width = output.collect { |g| g[:name].length }.max output.collect do |grp| puts grp[:name].ljust(width, ' ') + "\t => " + grp[:res] end end |