Class: Awshark::CloudFormation::Subcommand
- Inherits:
-
Thor
- Object
- Thor
- Awshark::CloudFormation::Subcommand
- Includes:
- Awshark::ClassOptions
- Defined in:
- lib/awshark/cloud_formation/subcommand.rb
Instance Method Summary collapse
Methods included from Awshark::ClassOptions
Instance Method Details
#deploy(template_path) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/awshark/cloud_formation/subcommand.rb', line 38 def deploy(template_path) manager = create_manager(template_path) print_stack_information(manager.stack) manager.update_stack sleep(2) manager.tail_stack_events rescue GracefulFail => e puts e. end |
#diff(template_path) ⇒ Object
57 58 59 60 61 62 63 64 65 |
# File 'lib/awshark/cloud_formation/subcommand.rb', line 57 def diff(template_path) manager = create_manager(template_path) print_stack_information(manager.stack) diff = manager.diff_stack_template puts diff end |
#save(template_path) ⇒ Object
73 74 75 76 77 78 79 80 81 |
# File 'lib/awshark/cloud_formation/subcommand.rb', line 73 def save(template_path) manager = create_manager(template_path) print_stack_information(manager.stack) filename = manager.save_stack_template printf "Written CloudFormation JSON template to: %<name>s\n\n", name: filename end |