@@ -277,6 +277,10 @@ var resourceGitLabProjectSchema = map[string]*schema.Schema{
277
277
Type : schema .TypeString ,
278
278
Optional : true ,
279
279
},
280
+ "ci_config_path" : {
281
+ Type : schema .TypeString ,
282
+ Optional : true ,
283
+ },
280
284
}
281
285
282
286
func resourceGitlabProject () * schema.Resource {
@@ -330,7 +334,7 @@ func resourceGitlabProjectSetToState(d *schema.ResourceData, project *gitlab.Pro
330
334
d .Set ("mirror_overwrites_diverged_branches" , project .MirrorOverwritesDivergedBranches )
331
335
d .Set ("only_mirror_protected_branches" , project .OnlyMirrorProtectedBranches )
332
336
d .Set ("build_coverage_regex" , project .BuildCoverageRegex )
333
-
337
+ d . Set ( "ci_config_path" , project . CIConfigPath )
334
338
return nil
335
339
}
336
340
@@ -358,6 +362,7 @@ func resourceGitlabProjectCreate(d *schema.ResourceData, meta interface{}) error
358
362
Mirror : gitlab .Bool (d .Get ("mirror" ).(bool )),
359
363
MirrorTriggerBuilds : gitlab .Bool (d .Get ("mirror_trigger_builds" ).(bool )),
360
364
BuildCoverageRegex : gitlab .String (d .Get ("build_coverage_regex" ).(string )),
365
+ CIConfigPath : gitlab .String (d .Get ("ci_config_path" ).(string )),
361
366
}
362
367
363
368
if v , ok := d .GetOk ("path" ); ok {
@@ -408,6 +413,10 @@ func resourceGitlabProjectCreate(d *schema.ResourceData, meta interface{}) error
408
413
options .PagesAccessLevel = stringToAccessControlValue (v .(string ))
409
414
}
410
415
416
+ if v , ok := d .GetOk ("ci_config_path" ); ok {
417
+ options .CIConfigPath = gitlab .String (v .(string ))
418
+ }
419
+
411
420
log .Printf ("[DEBUG] create gitlab project %q" , * options .Name )
412
421
413
422
project , _ , err := client .Projects .CreateProject (options )
@@ -687,6 +696,10 @@ func resourceGitlabProjectUpdate(d *schema.ResourceData, meta interface{}) error
687
696
options .BuildCoverageRegex = gitlab .String (d .Get ("build_coverage_regex" ).(string ))
688
697
}
689
698
699
+ if d .HasChange ("ci_config_path" ) {
700
+ options .CIConfigPath = gitlab .String (d .Get ("ci_config_path" ).(string ))
701
+ }
702
+
690
703
if * options != (gitlab.EditProjectOptions {}) {
691
704
log .Printf ("[DEBUG] update gitlab project %s" , d .Id ())
692
705
_ , _ , err := client .Projects .EditProject (d .Id (), options )
0 commit comments