@@ -15,6 +15,7 @@ func resourceGithubRepositoryCollaborator() *schema.Resource {
15
15
return & schema.Resource {
16
16
Create : resourceGithubRepositoryCollaboratorCreate ,
17
17
Read : resourceGithubRepositoryCollaboratorRead ,
18
+ Update : resourceGithubRepositoryCollaboratorUpdate ,
18
19
Delete : resourceGithubRepositoryCollaboratorDelete ,
19
20
Importer : & schema.ResourceImporter {
20
21
State : schema .ImportStatePassthrough ,
@@ -39,6 +40,19 @@ func resourceGithubRepositoryCollaborator() *schema.Resource {
39
40
ForceNew : true ,
40
41
Default : "push" ,
41
42
ValidateFunc : validateValueFunc ([]string {"pull" , "triage" , "push" , "maintain" , "admin" }),
43
+ DiffSuppressFunc : func (k , old , new string , d * schema.ResourceData ) bool {
44
+ if d .Get ("permission_diff_suppression" ).(bool ) {
45
+ if new == "triage" || new == "maintain" {
46
+ return true
47
+ }
48
+ }
49
+ return false
50
+ },
51
+ },
52
+ "permission_diff_suppression" : {
53
+ Type : schema .TypeBool ,
54
+ Optional : true ,
55
+ Default : false ,
42
56
},
43
57
"invitation_id" : {
44
58
Type : schema .TypeString ,
@@ -158,6 +172,10 @@ func resourceGithubRepositoryCollaboratorRead(d *schema.ResourceData, meta inter
158
172
return nil
159
173
}
160
174
175
+ func resourceGithubRepositoryCollaboratorUpdate (d * schema.ResourceData , meta interface {}) error {
176
+ return resourceGithubRepositoryCollaboratorRead (d , meta )
177
+ }
178
+
161
179
func resourceGithubRepositoryCollaboratorDelete (d * schema.ResourceData , meta interface {}) error {
162
180
client := meta .(* Owner ).v3client
163
181
0 commit comments