class AwsInventory::Cfn

Constants

ACTIVE_STATUSES
ALL_STATUSES

Public Instance Methods

data() click to toggle source
# File lib/aws_inventory/cfn.rb, line 27
def data
  stack_summaries.map do |summary|
    [summary.stack_name, summary.template_description]
  end
end
header() click to toggle source
# File lib/aws_inventory/cfn.rb, line 23
def header
  ["Stack Name", "Description"]
end
stack_summaries() click to toggle source
# File lib/aws_inventory/cfn.rb, line 33
def stack_summaries
  @stack_summaries ||= cfn.list_stacks(stack_status_filter: ACTIVE_STATUSES).stack_summaries
end
text_table() click to toggle source

unused right now but leaving around to later figure out how to integrate

# File lib/aws_inventory/cfn.rb, line 38
def text_table
  stack_summaries.each do |summary|
    table.rows << [summary.stack_name, summary.template_description]
  end

  table = Text::Table.new
  table.head = %w[Name Description]
  stack_summaries.each do |summary|
    table.rows << [summary.stack_name, summary.template_description]
  end
  puts table
end