Class: StackMaster::Commands::Drift
- Inherits:
-
Object
- Object
- StackMaster::Commands::Drift
- Extended by:
- Forwardable
- Includes:
- Commander::UI, StackMaster::Command
- Defined in:
- lib/stack_master/commands/drift.rb
Constant Summary collapse
- DETECTION_COMPLETE_STATES =
[ 'DETECTION_COMPLETE', 'DETECTION_FAILED' ]
Instance Method Summary collapse
Methods included from StackMaster::Command
included, #initialize, #success?
Instance Method Details
#perform ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/stack_master/commands/drift.rb', line 14 def perform detect_stack_drift_result = cf.detect_stack_drift(stack_name: stack_name) drift_results = wait_for_drift_results(detect_stack_drift_result.stack_drift_detection_id) puts colorize("Drift Status: #{drift_results.stack_drift_status}", stack_drift_status_color(drift_results.stack_drift_status)) return if drift_results.stack_drift_status == 'IN_SYNC' failed resp = cf.describe_stack_resource_drifts(stack_name: stack_name) resp.stack_resource_drifts.each do |drift| display_drift(drift) end end |