Skip to content

Commit

Permalink
cleanup: removed commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Prikhno committed Feb 2, 2025
1 parent 74170dc commit 11e7148
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions kubernetes/resource_kubernetes_job_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ func resourceKubernetesJobV1Create(ctx context.Context, d *schema.ResourceData,
return diag.FromErr(err)
}

// if d.Get("wait_for_completion").(bool) && *spec.Suspend {
// return diag.Errorf("Cannot set both suspend and wait_for_completion to true")
// }

job := batchv1.Job{
ObjectMeta: metadata,
Spec: spec,
Expand Down Expand Up @@ -186,15 +182,6 @@ func resourceKubernetesJobV1Update(ctx context.Context, d *schema.ResourceData,
return diag.FromErr(err)
}

// // Rollback wait_for_completion and suspend in state if both of them were updated be true
// if d.Get("wait_for_completion").(bool) && d.Get("spec.0.suspend").(bool) {
// prevWaitForCompletion, _ := d.GetChange("wait_for_completion")
// prevSuspend, _ := d.GetChange("spec.0.suspend")
// d.Set("wait_for_completion", prevWaitForCompletion)
// d.Set("spec.0.suspend", prevSuspend)
// return diag.Errorf("Cannot set both suspend and wait_for_completion to true")
// }

namespace, name, err := idParts(d.Id())
if err != nil {
return diag.FromErr(err)
Expand Down

0 comments on commit 11e7148

Please sign in to comment.