Module: Jets::Stack::Parameter::Dsl

Extended by:
ActiveSupport::Concern, Memoist
Included in:
Jets::Stack
Defined in:
lib/jets/stack/parameter/dsl.rb

Instance Method Summary collapse

Instance Method Details

#add_common_parametersObject



13
14
15
16
# File 'lib/jets/stack/parameter/dsl.rb', line 13

def add_common_parameters
  self.class.parameter(:iam_role)
  self.class.parameter(:s3_bucket)
end

#add_depends_on_parametersObject



18
19
20
21
22
23
24
25
# File 'lib/jets/stack/parameter/dsl.rb', line 18

def add_depends_on_parameters
  depends_on = self.class.depends_on
  depends_on.each do |dependency|
    dependency_outputs(dependency).each do |output|
      self.class.parameter(output)
    end
  end if depends_on
end

#dependency_outputs(dependency) ⇒ Object

Returns output keys associated with the stack. They are the resource logical ids.



29
30
31
# File 'lib/jets/stack/parameter/dsl.rb', line 29

def dependency_outputs(dependency)
  dependency.to_s.camelize.constantize.output_keys
end

#parametersObject



7
8
9
10
11
# File 'lib/jets/stack/parameter/dsl.rb', line 7

def parameters
  add_common_parameters
  add_depends_on_parameters
  Parameter.definitions(self.class)
end