-
Notifications
You must be signed in to change notification settings - Fork 228
/
schema_global_role.go
57 lines (52 loc) · 1.29 KB
/
schema_global_role.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
package rancher2
import (
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)
//Schemas
func globalRoleFields() map[string]*schema.Schema {
s := map[string]*schema.Schema{
"builtin": {
Type: schema.TypeBool,
Computed: true,
Description: "Builtin global role",
},
"description": {
Type: schema.TypeString,
Optional: true,
Computed: true,
Description: "Global role policy description",
},
"name": {
Type: schema.TypeString,
Required: true,
Description: "Global role policy name",
},
"new_user_default": {
Type: schema.TypeBool,
Optional: true,
Default: false,
Description: "Whether or not this role should be added to new users",
},
"rules": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Description: "Global role policy rules",
Elem: &schema.Resource{
Schema: policyRuleFields(),
},
},
"inherited_cluster_roles": {
Type: schema.TypeList,
Optional: true,
Description: "Names of role templates whose permissions are granted by this global role in every cluster besides the local cluster",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
}
for k, v := range commonAnnotationLabelFields() {
s[k] = v
}
return s
}