fix: error if there is no type for the trigger specified

This commit is contained in:
Jose Diaz-Gonzalez
2024-11-13 02:14:29 -05:00
parent f8d2768816
commit 785af1611c

View File

@@ -586,6 +586,9 @@ func getAutoscaling(input GetAutoscalingInput) (ProcessAutoscaling, error) {
triggers := []ProcessAutoscalingTrigger{}
for _, trigger := range config.Triggers {
if trigger.Type == "" {
return ProcessAutoscaling{}, fmt.Errorf("Autoscaling trigger type is required for trigger: index %d", idx)
}
metadata := map[string]string{}
for key, value := range trigger.Metadata {
tmpl, err := template.New("").Delims("[[", "]]").Parse(value)