This repository has been archived by the owner on Oct 10, 2022. It is now read-only.
forked from josenk/terraform-provider-esxi
/
resource_resource-pool.go
81 lines (79 loc) · 2.12 KB
/
resource_resource-pool.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
package esxi
import (
"github.com/hashicorp/terraform/helper/schema"
)
func resourceRESOURCEPOOL() *schema.Resource {
return &schema.Resource{
Create: resourceRESOURCEPOOLCreate,
Read: resourceRESOURCEPOOLRead,
Update: resourceRESOURCEPOOLUpdate,
Delete: resourceRESOURCEPOOLDelete,
Importer: &schema.ResourceImporter{
State: resourceRESOURCEPOOLImport,
},
Schema: map[string]*schema.Schema{
"resource_pool_name": &schema.Schema{
Type: schema.TypeString,
Required: true,
ForceNew: false,
Description: "Resource Pool Name",
},
"cpu_min": &schema.Schema{
Type: schema.TypeInt,
Optional: true,
ForceNew: false,
Computed: true,
Description: "CPU minimum (in MHz).",
},
"cpu_min_expandable": &schema.Schema{
Type: schema.TypeString,
Optional: true,
ForceNew: false,
Computed: true,
Description: "Can pool borrow CPU resources from parent?",
},
"cpu_max": &schema.Schema{
Type: schema.TypeInt,
Optional: true,
ForceNew: false,
Computed: true,
Description: "CPU maximum (in MHz).",
},
"cpu_shares": &schema.Schema{
Type: schema.TypeString,
Optional: true,
ForceNew: false,
Computed: true,
Description: "CPU shares (low/normal/high/<custom>).",
},
"mem_min": &schema.Schema{
Type: schema.TypeInt,
Optional: true,
ForceNew: false,
Computed: true,
Description: "Memory minimum (in MB).",
},
"mem_min_expandable": &schema.Schema{
Type: schema.TypeString,
Optional: true,
ForceNew: false,
Computed: true,
Description: "Can pool borrow memory resources from parent?",
},
"mem_max": &schema.Schema{
Type: schema.TypeInt,
Optional: true,
ForceNew: false,
Computed: true,
Description: "Memory maximum (in MB).",
},
"mem_shares": &schema.Schema{
Type: schema.TypeString,
Optional: true,
ForceNew: false,
Computed: true,
Description: "Memory shares (low/normal/high/<custom>).",
},
},
}
}