Module: Sfn::ApiProvider::Terraform
- Defined in:
- lib/sfn/api_provider/terraform.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.
-
#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/terraform.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/terraform.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/terraform.rb', line 44 def function_set_parameter?(val) if val val.start_with?("${") end end |
#store_template(*_) ⇒ Object
Disable remote template storage
8 9 |
# File 'lib/sfn/api_provider/terraform.rb', line 8 def store_template(*_) end |
#template_content(thing, *_) ⇒ Hash
Override template content extraction to disable scrub behavior
59 60 61 62 63 64 65 |
# File 'lib/sfn/api_provider/terraform.rb', line 59 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
51 52 53 |
# File 'lib/sfn/api_provider/terraform.rb', line 51 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/terraform.rb', line 36 def validate_stack_parameter(*_) true end |