Skip to content

Commit bd4f033

Browse files
committed
Add Allow as an option to workload job concurrency policy
1 parent cd50105 commit bd4f033

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"args": [
2121
//
2222
"-test.run",
23-
"TestAccControlPlaneMk8s_basic",
23+
"TestAccControlPlaneWorkload_basic",
2424
"-test.v"
2525
]
2626
}

docs/data-sources/workload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ Exports cron workload settings.
411411
Read-Only:
412412

413413
- **schedule** (String) Cron schedule expression determining job execution times.
414-
- **concurrency_policy** (String) Either `Forbid` or `Replace`. Determines how overlapping jobs are handled.
414+
- **concurrency_policy** (String) Either `Forbid`, `Replace` or `Allow`. Determines how overlapping jobs are handled.
415415
- **history_limit** (Number) Maximum completed job instances retained. Integer between `1` and `10`. Default: `5`.
416416
- **restart_policy** (String) Either `OnFailure` or `Never`. Default: `Never`.
417417
- **active_deadline_seconds** (Number) Maximum seconds a job can run before it is forcibly stopped.

docs/resources/workload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ Required:
461461

462462
Optional:
463463

464-
- **concurrency_policy** (String) Either 'Forbid' or 'Replace'. This determines what Control Plane will do when the schedule requires a job to start, while a prior instance of the job is still running. Enum: [ Forbid, Replace ] Default: `Forbid`
464+
- **concurrency_policy** (String) Either `Forbid`, `Replace`, or `Allow`. This determines what Control Plane will do when the schedule requires a job to start, while a prior instance of the job is still running.
465465
- **history_limit** (Number) The maximum number of completed job instances to display. This should be an integer between 1 and 10. Default: `5`
466466
- **restart_policy** (String) Either 'OnFailure' or 'Never'. This determines what Control Plane will do when a job instance fails. Enum: [ OnFailure, Never ] Default: `Never`
467467
- **active_deadline_seconds** (Number) The maximum number of seconds Control Plane will wait for the job to complete. If a job does not succeed or fail in the allotted time, Control Plane will stop the job, moving it into the Removed status.

internal/provider/data_source_workload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ func (d *WorkloadDataSource) Schema(ctx context.Context, req datasource.SchemaRe
511511
Computed: true,
512512
},
513513
"concurrency_policy": schema.StringAttribute{
514-
Description: "Either 'Forbid' or 'Replace'. This determines what Control Plane will do when the schedule requires a job to start, while a prior instance of the job is still running. Enum: [ Forbid, Replace ] Default: `Forbid`.",
514+
Description: "Either 'Forbid', 'Replace', or 'Allow'. This determines what Control Plane will do when the schedule requires a job to start, while a prior instance of the job is still running.",
515515
Computed: true,
516516
},
517517
"history_limit": schema.Int32Attribute{

internal/provider/resource_catalog_template_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
/*** Acceptance Test ***/
1717

1818
// TestAccControlPlaneCatalogTemplate_basic performs an acceptance test for the resource.
19-
func Skip_TestAccControlPlaneCatalogTemplate_basic(t *testing.T) {
19+
func TestAccControlPlaneCatalogTemplate_basic(t *testing.T) {
2020
// Initialize the test
2121
resourceTest := NewCatalogTemplateResourceTest()
2222

internal/provider/resource_workload.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,12 +760,12 @@ func (wr *WorkloadResource) Schema(ctx context.Context, req resource.SchemaReque
760760
Required: true,
761761
},
762762
"concurrency_policy": schema.StringAttribute{
763-
Description: "Either 'Forbid' or 'Replace'. This determines what Control Plane will do when the schedule requires a job to start, while a prior instance of the job is still running. Enum: [ Forbid, Replace ] Default: `Forbid`.",
763+
Description: "Either 'Forbid', 'Replace', or 'Allow'. This determines what Control Plane will do when the schedule requires a job to start, while a prior instance of the job is still running.",
764764
Optional: true,
765765
Computed: true,
766766
Default: stringdefault.StaticString("Forbid"),
767767
Validators: []validator.String{
768-
stringvalidator.OneOf("Forbid", "Replace"),
768+
stringvalidator.OneOf("Forbid", "Replace", "Allow"),
769769
},
770770
},
771771
"history_limit": schema.Int32Attribute{

0 commit comments

Comments
 (0)