diff --git a/jobspec/parse.go b/jobspec/parse.go index 5d791835d..b0ff5ad04 100644 --- a/jobspec/parse.go +++ b/jobspec/parse.go @@ -178,6 +178,11 @@ func parseGroups(result *structs.Job, obj *hclobj.Object) error { delete(m, "meta") delete(m, "task") + // Default count to 1 if not specified + if _, ok := m["count"]; !ok { + m["count"] = 1 + } + // Build the group with the basic decode var g structs.TaskGroup g.Name = n