-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathschema_Identity.go
90 lines (81 loc) · 1.53 KB
/
schema_Identity.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
package main
import "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
func identityFields() map[string]*schema.Schema {
s := map[string]*schema.Schema{
"alias": {
Type: schema.TypeString,
Required: true,
},
"name": {
Type: schema.TypeString,
Computed: true,
Description: "Identity name",
},
"description": {
Type: schema.TypeString,
Computed: true,
},
"email_address": {
Type: schema.TypeString,
Computed: true,
},
"enabled": {
Type: schema.TypeBool,
Computed: true,
},
"is_manager": {
Type: schema.TypeBool,
Computed: true,
},
"identity_status": {
Type: schema.TypeString,
Computed: true,
},
"attributes": {
Type: schema.TypeList,
Optional: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: identityAttributesFields(),
},
},
}
return s
}
func identityAttributesFields() map[string]*schema.Schema {
s := map[string]*schema.Schema{
"adp_id": {
Type: schema.TypeString,
Optional: true,
},
"lastname": {
Type: schema.TypeString,
Optional: true,
},
"firstname": {
Type: schema.TypeString,
Optional: true,
},
"phone": {
Type: schema.TypeString,
Optional: true,
},
"user_type": {
Type: schema.TypeString,
Optional: true,
},
"uid": {
Type: schema.TypeString,
Optional: true,
},
"email": {
Type: schema.TypeString,
Optional: true,
},
"workday_id": {
Type: schema.TypeString,
Optional: true,
},
}
return s
}