@@ -11,10 +11,10 @@ import (
11
11
12
12
func resourceGitlabProjectMirror () * schema.Resource {
13
13
return & schema.Resource {
14
- Create : resourceGitlabMirrorCreate ,
14
+ Create : resourceGitlabProjectMirrorCreate ,
15
15
Read : resourceGitlabProjectMirrorRead ,
16
- Update : resourceGitlabMirrorUpdate ,
17
- Delete : resourceGitlabMirrorDelete ,
16
+ Update : resourceGitlabProjectMirrorUpdate ,
17
+ Delete : resourceGitlabProjectMirrorDelete ,
18
18
Importer : & schema.ResourceImporter {
19
19
State : schema .ImportStatePassthrough ,
20
20
},
@@ -53,7 +53,7 @@ func resourceGitlabProjectMirror() *schema.Resource {
53
53
}
54
54
}
55
55
56
- func resourceGitlabMirrorCreate (d * schema.ResourceData , meta interface {}) error {
56
+ func resourceGitlabProjectMirrorCreate (d * schema.ResourceData , meta interface {}) error {
57
57
client := meta .(* gitlab.Client )
58
58
59
59
projectID := d .Get ("project" ).(string )
@@ -82,7 +82,7 @@ func resourceGitlabMirrorCreate(d *schema.ResourceData, meta interface{}) error
82
82
return resourceGitlabProjectMirrorRead (d , meta )
83
83
}
84
84
85
- func resourceGitlabMirrorUpdate (d * schema.ResourceData , meta interface {}) error {
85
+ func resourceGitlabProjectMirrorUpdate (d * schema.ResourceData , meta interface {}) error {
86
86
client := meta .(* gitlab.Client )
87
87
88
88
mirrorID := d .Get ("mirror_id" ).(int )
@@ -106,7 +106,7 @@ func resourceGitlabMirrorUpdate(d *schema.ResourceData, meta interface{}) error
106
106
}
107
107
108
108
// Documented remote mirrors API does not support a delete method, instead mirror is disabled.
109
- func resourceGitlabMirrorDelete (d * schema.ResourceData , meta interface {}) error {
109
+ func resourceGitlabProjectMirrorDelete (d * schema.ResourceData , meta interface {}) error {
110
110
client := meta .(* gitlab.Client )
111
111
112
112
enabled := false
@@ -167,10 +167,7 @@ func resourceGitlabProjectMirrorRead(d *schema.ResourceData, meta interface{}) e
167
167
}
168
168
169
169
func resourceGitlabProjectMirrorSetToState (d * schema.ResourceData , projectMirror * gitlab.ProjectMirror , projectID * string ) {
170
-
171
- mirrorID := strconv .Itoa (projectMirror .ID )
172
170
d .Set ("enabled" , projectMirror .Enabled )
173
171
d .Set ("only_protected_branches" , projectMirror .OnlyProtectedBranches )
174
172
d .Set ("keep_divergent_refs" , projectMirror .KeepDivergentRefs )
175
- d .SetId (buildTwoPartID (projectID , & mirrorID ))
176
173
}
0 commit comments