forked from kyma-incubator/terraform-provider-gardener
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
73 lines (63 loc) · 1.57 KB
/
main.tf
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
provider "gardener" {
kube_file = "${file("<my-gardener-service-account-kubeconfig>")}"
/*kube_file =<<-EOT
kind: Config
clusters:
- cluster:
certificate-authority-data: >-
<certificate-authority-data>
server: "https://gardener.garden.canary.k8s.ondemand.com"
name: garden
users:
- user:
token: >-
<token>
name: robot
contexts:
- context:
cluster: garden
user: robot
namespace: garden-<profile>
name: garden-<profile>-robot
current-context: garden-<profile>-robot
EOT*/
}
resource "gardener_shoot" "test_cluster" {
metadata {
name = "test-cluster"
namespace = "garden-<profile>"
}
spec {
cloud {
profile = "aws"
region = "eu-central-1"
secret_binding_ref {
name = "<secret_binding>"
}
aws {
networks {
vpc {
cidr = "10.250.0.0/16"
}
internal = ["10.250.112.0/22"]
public = ["10.250.96.0/22"]
workers = ["10.250.0.0/19"]
}
worker {
name = "cpu-worker"
machine_type = "m5.large"
auto_scaler_min = 3
auto_scaler_max = 4
max_surge = 1
max_unavailable = 0
volume_type = "gp2"
volume_size = "50Gi"
}
zones = ["eu-central-1a"]
}
}
kubernetes {
version = "1.15.4"
}
}
}