forked from kyma-incubator/terraform-provider-gardener
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema_azure.go
174 lines (172 loc) · 5.2 KB
/
schema_azure.go
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
package shoot
import (
"github.com/hashicorp/terraform/helper/schema"
)
func cloudResourceAzure() *schema.Resource {
return &schema.Resource{
Schema: map[string]*schema.Schema{
"machine_image": {
Type: schema.TypeList,
Description: "MachineImage holds information about the machine image to use for all workers.",
Optional: true,
MaxItems: 1,
DiffSuppressFunc: suppressMissingOptionalConfigurationBlock,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"name": {
Type: schema.TypeString,
Description: "Name is the name of the image.",
Optional: true,
Default: "coreos",
},
"version": {
Type: schema.TypeString,
Description: "Version is the version of the image.",
Optional: true,
DiffSuppressFunc: suppressEmptyNewValue,
},
},
},
},
"networks": {
Type: schema.TypeList,
Description: "Networks holds information about the Kubernetes and infrastructure networks.",
Required: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"nodes": {
Type: schema.TypeString,
Description: "Nodes is the CIDR of the node network.",
Optional: true,
},
"pods": {
Type: schema.TypeString,
Description: "Pods is the CIDR of the pod network.",
Optional: true,
},
"services": {
Type: schema.TypeString,
Description: "Services is the CIDR of the service network.",
Optional: true,
},
"vnet": {
Type: schema.TypeList,
Description: "VNet indicates whether to use an existing Vnet or create a new one.",
Required: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"id": {
Type: schema.TypeString,
Description: "ID is the AWS VPC id of an existing VPC.",
Optional: true,
},
"cidr": {
Type: schema.TypeString,
Description: "CIDR is a CIDR range for a new VPC.",
Optional: true,
},
},
},
},
"workers": {
Type: schema.TypeString,
Description: "Services is the CIDR of the service network.",
Optional: true,
},
},
},
},
"worker": {
Type: schema.TypeList,
Description: "Workers is a list of worker groups.",
Required: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"name": {
Type: schema.TypeString,
Description: "Name is the name of the worker group.",
Required: true,
},
"machine_type": {
Type: schema.TypeString,
Description: "MachineType is the machine type of the worker group.",
Required: true,
},
"auto_scaler_min": {
Type: schema.TypeInt,
Description: "AutoScalerMin is the minimum number of VMs to create.",
Required: true,
},
"auto_scaler_max": {
Type: schema.TypeInt,
Description: "AutoScalerMax is the maximum number of VMs to create.",
Required: true,
},
"max_surge": {
Type: schema.TypeInt,
Description: "MaxSurge is maximum number of VMs that are created during an update.",
Optional: true,
},
"max_unavailable": {
Type: schema.TypeInt,
Description: "MaxUnavailable is the maximum number of VMs that can be unavailable during an update.",
Optional: true,
},
"annotations": {
Type: schema.TypeMap,
Description: "Annotations is a map of key/value pairs for annotations for all the `Node` objects in this worker pool.",
Optional: true,
},
"labels": {
Type: schema.TypeMap,
Description: "Labels is a map of key/value pairs for labels for all the `Node` objects in this worker pool.",
Optional: true,
},
"taints": {
Type: schema.TypeList,
Description: "Taints is a list of taints for all the `Node` objects in this worker pool.",
Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"key": {
Type: schema.TypeString,
Required: true,
},
"operator": {
Type: schema.TypeString,
Required: true,
},
"value": {
Type: schema.TypeString,
Optional: true,
},
"effect": {
Type: schema.TypeString,
Required: true,
},
},
},
},
"volume_type": {
Type: schema.TypeString,
Description: "VolumeType is the type of the root volumes.",
Required: true,
},
"volume_size": {
Type: schema.TypeString,
Description: "VolumeSize is the size of the root volume.",
Required: true,
},
},
},
},
"cabundle": {
Type: schema.TypeString,
Description: "caBundle configuration",
Optional: true,
},
},
}
}