163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
# File 'lib/cloud_formation_tool/cloud_formation.rb', line 163
def resolveVal(value)
case value
when Hash
if value.key? 'Ref'
if @params.nil?
value
else res = @params[value['Ref']] || ((@data['Parameters']||{})[value['Ref']] || {})['Default']
if res.nil?
raise CloudFormationTool::Errors::AppError, "Reference #{value['Ref']} can't be resolved"
end
res
end
else
raise CloudFormationTool::Errors::AppError, "Value #{value} is not a valid value or reference"
end
else
value
end
end
|