This repository has been archived by the owner on Oct 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
schema_azure.go
63 lines (61 loc) · 1.82 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
package shoot
import (
"github.com/hashicorp/terraform/helper/schema"
)
func azureResource() *schema.Resource {
return &schema.Resource{
Schema: map[string]*schema.Schema{
"zoned": {
Type: schema.TypeString,
Description: "Boolean telling if the cluster has availability zones",
Optional: true,
},
"networks": {
Type: schema.TypeList,
Description: "Networks is the network configuration (VNet, subnets, etc.).",
Required: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"workers": {
Type: schema.TypeString,
Description: "Workers is the worker subnet range to create (used for the VMs).",
Required: true,
},
"service_endpoints": {
Type: schema.TypeSet,
Description: "List of Azure service endpoints connect to the created VNet.",
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: schema.HashString,
},
"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{
"name": {
Type: schema.TypeString,
Description: "Name is the VNet name.",
Optional: true,
},
"cidr": {
Type: schema.TypeString,
Description: "CIDR is the VNet CIDR.",
Optional: true,
},
"resource_group": {
Type: schema.TypeString,
Description: "ResourceGroup is the resource group where the existing vNet belongs to.",
Optional: true,
},
},
},
},
},
},
},
},
}
}