-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathmain.tf
More file actions
42 lines (38 loc) · 756 Bytes
/
main.tf
File metadata and controls
42 lines (38 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Copyright IBM Corp. 2017, 2025
# SPDX-License-Identifier: MPL-2.0
terraform {
required_providers {
kubernetes = {
source = "hashicorp/kubernetes"
version = ">= 2.0"
}
}
}
variable "kube_config_file" {
default = "~/.kube/config"
}
provider "kubernetes" {
config_path = var.kube_config_file
}
resource "kubernetes_job" "test" {
metadata {
name = "test"
}
spec {
active_deadline_seconds = 120
backoff_limit = 10
completions = 10
parallelism = 2
template {
metadata {}
spec {
container {
name = "hello"
image = "busybox"
command = ["sleep", "30"]
}
}
}
}
wait_for_completion = true
}