Method: CloudFormationTool::CLI::Groups#execute
- Defined in:
- lib/cloud_formation_tool/cli/groups.rb
#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 |