Skip to content

Commit a26000f

Browse files
authored
Change validation for max_concurrent_runs in databricjs_job to allow 0 value (#2682)
Jobs API allows 0 value for `max_concurrent_runs` attribute [API docs](https://docs.databricks.com/api/workspace/jobs/create), but TF required to specify at least `1`. This fixes #2681
1 parent 4e14224 commit a26000f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jobs/resource_job.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ var jobSchema = common.StructToSchema(JobSettings{},
662662
if p, err := common.SchemaPath(s, "schedule", "pause_status"); err == nil {
663663
p.ValidateFunc = validation.StringInSlice([]string{"PAUSED", "UNPAUSED"}, false)
664664
}
665-
s["max_concurrent_runs"].ValidateDiagFunc = validation.ToDiagFunc(validation.IntAtLeast(1))
665+
s["max_concurrent_runs"].ValidateDiagFunc = validation.ToDiagFunc(validation.IntAtLeast(0))
666666
s["max_concurrent_runs"].Default = 1
667667
s["url"] = &schema.Schema{
668668
Type: schema.TypeString,

0 commit comments

Comments
 (0)