Class: Lono::Cfn::Rollback
- Inherits:
-
Object
- Object
- Lono::Cfn::Rollback
- Extended by:
- Memoist
- Includes:
- AwsServices
- Defined in:
- lib/lono/cfn/rollback.rb
Instance Method Summary collapse
- #delete_stack ⇒ Object
-
#initialize(stack) ⇒ Rollback
constructor
A new instance of Rollback.
- #status ⇒ Object
Methods included from AwsServices
#cfn, #ec2, #iam, #s3, #s3_presigner, #s3_resource, #sts
Methods included from AwsServices::Helper
#rollback_complete?, #testing_update?
Methods included from AwsServices::StackSet
#find_stack_set, #stack_set_exists?
Methods included from AwsServices::Stack
Constructor Details
#initialize(stack) ⇒ Rollback
Returns a new instance of Rollback.
6 7 8 |
# File 'lib/lono/cfn/rollback.rb', line 6 def initialize(stack) @stack = stack end |
Instance Method Details
#delete_stack ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/lono/cfn/rollback.rb', line 10 def delete_stack stack = find_stack(@stack) if stack && rollback_complete?(stack) puts "Existing stack in ROLLBACK_COMPLETE state. Deleting stack before continuing." cfn.delete_stack(stack_name: @stack) status.wait status.reset true end end |