Module: Sfn::ApiProvider::Google
- Defined in:
 - lib/sfn/api_provider/google.rb
 
Instance Method Summary collapse
- 
  
    
      #extract_current_nested_template_parameters(stack, stack_name, c_stack)  ⇒ Hash 
    
    
  
  
  
  
  
  
  
  
  
    
Extract current parameters from parent template.
 - 
  
    
      #format_nested_stack_results(*_)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
No formatting required on stack results.
 - 
  
    
      #function_set_parameter?(val)  ⇒ TrueClass, FalseClass 
    
    
  
  
  
  
  
  
  
  
  
    
Determine if parameter was set via intrinsic function.
 - 
  
    
      #populate_parameters!(template, opts = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Set parameters into parent resource properites.
 - 
  
    
      #store_template(*_)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Disable remote template storage.
 - 
  
    
      #template_content(thing, *_)  ⇒ Hash 
    
    
  
  
  
  
  
  
  
  
  
    
Override template content extraction to disable scrub behavior.
 - 
  
    
      #validate_nesting_bucket!  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Override requirement of nesting bucket.
 - 
  
    
      #validate_stack_parameter(*_)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Disable parameter validate as we can't adjust them without template modifications.
 
Instance Method Details
#extract_current_nested_template_parameters(stack, stack_name, c_stack) ⇒ Hash
Extract current parameters from parent template
      22 23 24 25 26 27 28 29 30 31 32 33  | 
    
      # File 'lib/sfn/api_provider/google.rb', line 22 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  | 
  
#format_nested_stack_results(*_) ⇒ Object
No formatting required on stack results
      12 13 14  | 
    
      # File 'lib/sfn/api_provider/google.rb', line 12 def format_nested_stack_results(*_) {} end  | 
  
#function_set_parameter?(val) ⇒ TrueClass, FalseClass
Determine if parameter was set via intrinsic function
      44 45 46 47 48  | 
    
      # File 'lib/sfn/api_provider/google.rb', line 44 def function_set_parameter?(val) if val val.start_with?("$(") || val.start_with?("{{") end end  | 
  
#populate_parameters!(template, opts = {}) ⇒ Object
Set parameters into parent resource properites
      51 52 53 54 55 56 57 58 59 60 61  | 
    
      # File 'lib/sfn/api_provider/google.rb', line 51 def populate_parameters!(template, opts = {}) result = super result.each_pair do |key, value| if template.parent template.parent.compile.resources.set!(template.name).properties.set!(key, value) else template.compile.resources.set!(template.name).properties.set!(key, value) end end {} end  | 
  
#store_template(*_) ⇒ Object
Disable remote template storage
      8 9  | 
    
      # File 'lib/sfn/api_provider/google.rb', line 8 def store_template(*_) end  | 
  
#template_content(thing, *_) ⇒ Hash
Override template content extraction to disable scrub behavior
      72 73 74 75 76 77 78  | 
    
      # File 'lib/sfn/api_provider/google.rb', line 72 def template_content(thing, *_) if thing.is_a?(SparkleFormation) config[:sparkle_dump] ? thing.sparkle_dump : thing.dump else thing end end  | 
  
#validate_nesting_bucket! ⇒ Object
Override requirement of nesting bucket
      64 65 66  | 
    
      # File 'lib/sfn/api_provider/google.rb', line 64 def validate_nesting_bucket! true end  | 
  
#validate_stack_parameter(*_) ⇒ Object
Disable parameter validate as we can't adjust them without template modifications
      36 37 38  | 
    
      # File 'lib/sfn/api_provider/google.rb', line 36 def validate_stack_parameter(*_) true end  |