class Terraspace::CLI::Up
Public Instance Methods
run()
click to toggle source
# File lib/terraspace/cli/up.rb, line 7 def run build if @options[:yes] && !@options[:plan] && !tfc? plan Commander.new("apply", @options.merge(plan: plan_path)).run else Commander.new("apply", @options).run end end
Private Instance Methods
build()
click to toggle source
must build to compute tfc?
# File lib/terraspace/cli/up.rb, line 19 def build Terraspace::Builder.new(@options).run @options[:build] = false end
plan()
click to toggle source
# File lib/terraspace/cli/up.rb, line 24 def plan FileUtils.mkdir_p(File.dirname(plan_path)) Commander.new("plan", @options.merge(out: plan_path)).run end
plan_path()
click to toggle source
# File lib/terraspace/cli/up.rb, line 29 def plan_path @@random ||= SecureRandom.hex "#{Terraspace.tmp_root}/plans/#{@mod.name}-#{@@random}.plan" end