Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions lib/stack_master/change_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ def id
private

def display_resource_change(io, resource_change)
action_name = if resource_change.replacement == 'True'
action_name = case resource_change.replacement
when 'True'
'Replace'
when 'Conditional'
'Conditional replace'
else
resource_change.action
end
Expand All @@ -86,6 +89,8 @@ def display_resource_change_detail(io, action_name, color, detail)
detail_messages = [target_name]
if action_name == 'Replace'
detail_messages << "#{detail.target.requires_recreation} requires recreation"
elsif action_name == 'Conditional replace'
detail_messages << "#{detail.target.requires_recreation} may require recreation"
end
triggered_by = [detail.change_source, detail.causing_entity].compact.join('.')
if detail.evaluation != 'Static'
Expand All @@ -101,7 +106,7 @@ def action_color(action_name)
:green
when 'Modify'
:yellow
when 'Remove', 'Replace'
when 'Remove', 'Replace', 'Maybe replace'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be Conditional replace?

:red
end
end
Expand Down