module Sfn::Utils::StackParameterScrubber

Helper for scrubbing stack parameters

Constants

ALLOWED_PARAMETER_ATTRIBUTES

Validate attributes within Parameter blocks

Public Instance Methods

parameter_scrub!(template) click to toggle source

Clean the parameters of the template

@param template [Hash] @return [Hash] template

# File lib/sfn/utils/stack_parameter_scrubber.rb, line 19
def parameter_scrub!(template)
  parameters = template["Parameters"]
  if parameters
    parameters.each do |name, options|
      options.delete_if do |attribute, value|
        !ALLOWED_PARAMETER_ATTRIBUTES.include?(attribute)
      end
    end
    template["Parameters"] = parameters
  end
  template
end