Method: Sfn::ApiProvider::Terraform#extract_current_nested_template_parameters

Defined in:
lib/sfn/api_provider/terraform.rb

#extract_current_nested_template_parameters(stack, stack_name, c_stack) ⇒ Hash

Extract current parameters from parent template



23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/sfn/api_provider/terraform.rb', line 23

def extract_current_nested_template_parameters(stack, stack_name, c_stack)
  if(c_stack && c_stack.data[:parent_stack])
    c_stack.data[:parent_stack].sparkleish_template(:remove_wrapper).fetch(
      :resources, stack_name, :properties, :parameters, Smash.new
    )
  elsif(stack.parent)
    val = stack.parent.compile.resources.set!(stack_name).properties
    val.nil? ? Smash.new : val._dump
  else
    Smash.new
  end
end