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_aws.go
74 lines (72 loc) · 1.81 KB
/
schema_aws.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
package shoot
import (
"github.com/hashicorp/terraform/helper/schema"
)
func awsResource() *schema.Resource {
return &schema.Resource{
Schema: map[string]*schema.Schema{
"enableecraccess": {
Type: schema.TypeBool,
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{
"vpc": {
Type: schema.TypeList,
Description: "VPC ID or CIDR for aws",
Required: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"id": {
Type: schema.TypeString,
Description: "ID of the VPC.",
Optional: true,
},
"cidr": {
Type: schema.TypeString,
Description: "CIDR is the VPC CIDR.",
Optional: true,
},
},
},
},
"zones": {
Type: schema.TypeSet,
Description: "List of zones.",
Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"name": {
Type: schema.TypeString,
Description: "Name is the zone name.",
Optional: true,
},
"internal": {
Type: schema.TypeString,
Description: "internal CIDR",
Optional: true,
},
"public": {
Type: schema.TypeString,
Description: "public cidr",
Optional: true,
},
"workers": {
Type: schema.TypeString,
Description: "worker cidr",
Optional: true,
},
},
},
},
},
},
},
},
}
}