class RakeTerraform::PlanTask::Config
Configuration data for terraform plan task
Attributes
aws_project[W]
output_file[W]
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/rake-terraform/plan_task/config.rb, line 11 def initialize # initialize RakeTerraform::EnvProcess super end
Public Instance Methods
aws_project()
click to toggle source
# File lib/rake-terraform/plan_task/config.rb, line 16 def aws_project @aws_project ||= 'default' end
input_dir()
click to toggle source
# File lib/rake-terraform/plan_task/config.rb, line 24 def input_dir @input_dir ||= File.expand_path 'terraform' end
input_dir=(dir)
click to toggle source
setter method for input_dir
triggers setters for tf_environment and state_file so that these are dynamically updated on change (but only if we are using directory state, and not explicit path to a state file)
# File lib/rake-terraform/plan_task/config.rb, line 31 def input_dir=(dir) @tf_environment = dir @state_file = tf_state_file if @state_dir @input_dir = dir end
opts()
click to toggle source
# File lib/rake-terraform/plan_task/config.rb, line 37 def opts Map.new(input_dir: input_dir, output_file: output_file, aws_project: aws_project, unique_state: unique_state, state_file: state_file) end
output_file()
click to toggle source
# File lib/rake-terraform/plan_task/config.rb, line 20 def output_file @output_file ||= File.expand_path(default_output) end
Private Instance Methods
default_output()
click to toggle source
# File lib/rake-terraform/plan_task/config.rb, line 47 def default_output File.join('output', 'terraform', 'plan.tf') end