module AwsCftTools::Runbooks::Retract::Templates

module with methods to manage ordering of templates

Public Instance Methods

free_templates() click to toggle source

List the templates that are available for deletion.

Templates with known dependents that are not in the set will be removed. Note that this does not capture dependencies between environments.

@return [AwsCftTools::TemplateSet]

# File lib/aws_cft_tools/runbooks/retract/templates.rb, line 30
def free_templates
  deployed = client.stacks.map(&:name)
  universe = AwsCftTools::TemplateSet.new(client.templates.select do |template|
    deployed.include?(template.name)
  end)
  universe.closed_subset(templates).reverse
end
template_folder_order() click to toggle source

@return [Array<String>]

# File lib/aws_cft_tools/runbooks/retract/templates.rb, line 41
def template_folder_order
  options[:template_folder_priorities] || []
end
templates() click to toggle source

list the templates in-scope for this retraction

@return [AwsCftTools::TemplateSet]

# File lib/aws_cft_tools/runbooks/retract/templates.rb, line 19
def templates
  @templates ||= filtered_templates(client.templates)
end