We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd4e448 commit 7438213Copy full SHA for 7438213
lib/heimdall_tools/aws_config_mapper.rb
@@ -257,8 +257,10 @@ def hdf_tags(config_rule)
257
end
258
259
def check_text(config_rule)
260
- params = (JSON.parse(config_rule[:input_parameters]).map { |key, value| "#{key}: #{value}" }).join('<br/>')
261
- check_text = config_rule[:config_rule_arn]
+ # If no input parameters, then provide an empty JSON array to the JSON
+ # parser because passing nil to JSON.parse throws an exception.
262
+ params = (JSON.parse(config_rule[:input_parameters] || '[]').map { |key, value| "#{key}: #{value}" }).join('<br/>')
263
+ check_text = config_rule[:config_rule_arn] || ''
264
check_text += "<br/>#{params}" unless params.empty?
265
check_text
266
0 commit comments