class TerraformLandscape::TerraformPlan
def display_resource(resource)
def display_resource(resource) change_color = CHANGE_SYMBOL_TO_COLOR[resource[:change]] resource_header = "#{resource[:change]} #{resource[:resource_type]}." \ "#{resource[:resource_name]}".colorize(change_color) resource_header += " (#{resource[:reason]})".colorize(:magenta) if resource[:reason] @out.puts resource_header # Determine longest attribute name so we align all values at same indentation attribute_value_indent_amount = attribute_indent_amount_for_resource(resource) resource[:attributes].each do |attribute_name, attribute_value| display_attribute(resource, change_color, attribute_name, attribute_value, attribute_value_indent_amount) end end