Class: Jets::Cfn::Builders::RuleBuilder

Inherits:
BaseChildBuilder show all
Defined in:
lib/jets/cfn/builders/rule_builder.rb

Instance Method Summary collapse

Methods inherited from BaseChildBuilder

#add_class_iam_policy, #add_common_parameters, #add_function, #add_function_iam_policy, #add_functions, #dependency_outputs, #depends_on_params, #initialize, #template_path

Methods included from Interface

#add_output, #add_outputs, #add_parameter, #add_parameters, #add_resource, #add_resources, #add_template_resource, #build, #post_process_template, #template, #text, #write

Constructor Details

This class inherits a constructor from Jets::Cfn::Builders::BaseChildBuilder

Instance Method Details

#add_managed_rulesObject

Handle config_rules associated with aws managed rules. List of AWS Config Managed Rules: amzn.to/2BOt9KN



17
18
19
20
21
22
# File 'lib/jets/cfn/builders/rule_builder.rb', line 17

def add_managed_rules
  @app_class.managed_rules.each do |rule|
    resource = Jets::Resource.new(rule[:definition], rule[:replacements])
    add_resource(resource)
  end
end

#composeObject



8
9
10
11
12
13
# File 'lib/jets/cfn/builders/rule_builder.rb', line 8

def compose
  add_common_parameters
  add_functions
  add_resources
  add_managed_rules
end