You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
│ Error: Unsupported argument
│
│ on db_restore.tf line 53, in resource "kubernetes_job_v1" "restore_db":
│ 53: suspend = true
│
│ An argument named "suspend" is not expected here.
Steps to Reproduce
terraform validate
Expected Behavior
What should have happened?
Kubernetes job spec support the suspend field since v1.21, I should be able to specify the suspend field in the kubernetes_job_v1 resource too.
Actual Behavior
What actually happened?
I cannot specify the suspend field, terraform rejects it. It is strange because kubernetes_cronjob_v1 supports it.
The text was updated successfully, but these errors were encountered:
So. I think the main reason suspend was not implemented for a Job resource is existence of wait_for_completion which tells Terraform to wait until the Job either succeeds or fails. If suspend is set to true, wait_for_completion cannot be set to true, because it is unclear when (and whether at all) the user sets suspend to false and resumes the job.
A proposal:
do not allow setting both suspend and wait_for_completion to true at the same time
suspend is allowed to change, and changing suspend leads to resource update in-place
"suspend": {
Type: schema.TypeBool,
Optional: true,
ForceNew: false,
Description: "Tells the controller to suspend subsequent executions, and terminate all active executions. suspend and wait_for_completion cannot be both set to true. Defaults to false. More info: https://kubernetes.io/docs/concepts/workloads/controllers/job/#suspending-a-job",
},
I am creating this new issue because the original one has been closed without resolving it (#1739).
Terraform Version, Provider Version and Kubernetes Version
Affected Resource(s)
Terraform Configuration Files
Output
Steps to Reproduce
Expected Behavior
What should have happened?
Kubernetes job spec support the suspend field since v1.21, I should be able to specify the suspend field in the kubernetes_job_v1 resource too.
Actual Behavior
What actually happened?
I cannot specify the suspend field, terraform rejects it. It is strange because kubernetes_cronjob_v1 supports it.
The text was updated successfully, but these errors were encountered: