Sha256: e37976d3953c604b284a3ea3531a8348a94c2159e2529cfc4b78bb05c98cf426
Contents?: true
Size: 882 Bytes
Versions: 15
Compression:
Stored size: 882 Bytes
Contents
require 'sfn' module Sfn module Utils # Helper for scrubbing stack parameters module StackParameterScrubber # Validate attributes within Parameter blocks ALLOWED_PARAMETER_ATTRIBUTES = %w( Type Default NoEcho AllowedValues AllowedPattern MaxLength MinLength MaxValue MinValue Description ConstraintDescription ) # Clean the parameters of the template # # @param template [Hash] # @return [Hash] template 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 end end end
Version data entries
15 entries across 15 versions & 1 rubygems