lib/kumogata/client.rb in kumogata-0.2.13 vs lib/kumogata/client.rb in kumogata-0.2.14

- old
+ new

@@ -16,10 +16,11 @@ nil end def validate(path_or_url) template = open_template(path_or_url) + add_encryption_password_for_validation(template) validate_template(template) nil end def convert(path_or_url) @@ -368,9 +369,18 @@ template['Parameters'][Kumogata::ENCRYPTION_PASSWORD] = { 'Type' => 'String', 'NoEcho' => 'true', } end + end + + def add_encryption_password_for_validation(template) + template['Parameters'] ||= {} + + template['Parameters'][Kumogata::ENCRYPTION_PASSWORD] ||= { + 'Type' => 'String', + 'Default' => "(#{Kumogata::ENCRYPTION_PASSWORD})", + } end def validate_template(template) result = @cloud_formation.validate_template(template.to_json)