Class: Ruby::Terraform::Tasks::PlanTask

Inherits:
BaseTask
  • Object
show all
Defined in:
lib/ruby/terraform/tasks/plan_task.rb

Instance Attribute Summary collapse

Attributes inherited from BaseTask

#configuration_name, #deps, #description, #dir, #show_command, #show_output, #task_name

Instance Method Summary collapse

Methods inherited from BaseTask

#initialize

Constructor Details

This class inherits a constructor from Ruby::Terraform::Tasks::BaseTask

Instance Attribute Details

#stateObject

Returns the value of attribute state.



5
6
7
# File 'lib/ruby/terraform/tasks/plan_task.rb', line 5

def state
  @state
end

#varsObject

Returns the value of attribute vars.



6
7
8
# File 'lib/ruby/terraform/tasks/plan_task.rb', line 6

def vars
  @vars
end

Instance Method Details

#defineObject



8
9
10
11
12
13
# File 'lib/ruby/terraform/tasks/plan_task.rb', line 8

def define
  desc description || "Plan #{configuration_name} using terraform"
  task task_name => Array(deps) do
    Commands::PlanCommand.new(dir: dir, state: state, vars: vars).execute(show_command: show_command, live: show_output)
  end
end