in intrinsics/intrinsics.go [110:134]
func overrideParameters(input interface{}, options *ProcessorOptions) {
if options == nil || len(options.ParameterOverrides) == 0 {
return
}
// Check the template is a map
if template, ok := input.(map[string]interface{}); ok {
// Check there is a parameters section
if uparameters, ok := template["Parameters"]; ok {
// Check the parameters section is a map
if parameters, ok := uparameters.(map[string]interface{}); ok {
for name, value := range options.ParameterOverrides {
// Check there is a parameter with the same name as the Ref
if uparameter, ok := parameters[name]; ok {
// Check the parameter is a map
if parameter, ok := uparameter.(map[string]interface{}); ok {
// Set the default value
parameter["Default"] = value
}
}
}
}
}
}
}