Class: Terraspace::CLI::Up
- Includes:
- Concerns::PlanPath, TfcConcern, Terraspace::Cloud::Streamer, Terraspace::Cloud::Vcs::Commenter
- Defined in:
- lib/terraspace/cli/up.rb
Instance Method Summary collapse
Methods included from TfcConcern
Methods included from Terraspace::Cloud::Vcs::Commenter
#able_to_comment?, #cloud_comment, #finalize_vars, #kind, #pr_comment, #vcs, #vcs_vars
Methods included from Terraspace::Cloud::Streamer
Methods included from Concerns::PlanPath
Methods inherited from Base
Methods included from Util::Pretty
Methods included from Util::Sure
Methods included from Util::Logging
Constructor Details
This class inherits a constructor from Terraspace::CLI::Base
Instance Method Details
#perform ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/terraspace/cli/up.rb', line 17 def perform success = nil build if @options[:yes] && !@options[:plan] && !tfc? success = plan else skip_plan = true end if success or skip_plan success = apply end success rescue Exception => e @exception = true logger.info "Exception #{e.class}: #{e.}".color(:red) logger.info e.backtrace.join("\n") false end |
#run ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/terraspace/cli/up.rb', line 8 def run cloud_update.cani? @stream = cloud_stream.open("up") success = perform create_cloud_records(success) cloud_stream.close(success, @exception) exit 1 unless success end |