Skip to content

Commit 4ca022d

Browse files
committed
Add ci_config_path to data.gitlab_project
1 parent 7ce5222 commit 4ca022d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

docs/data-sources/project.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ data "gitlab_project" "example" {
4646
- `build_git_strategy` (String) The Git strategy. Defaults to fetch.
4747
- `build_timeout` (Number) The maximum amount of time, in seconds, that a job can run.
4848
- `builds_access_level` (String) Set the builds access level. Valid values are `disabled`, `private`, `enabled`.
49+
- `ci_config_path` (String) CI config file path for the project.
4950
- `container_expiration_policy` (List of Object) Set the image cleanup policy for this project. **Note**: this field is sometimes named `container_expiration_policy_attributes` in the GitLab Upstream API. (see [below for nested schema](#nestedatt--container_expiration_policy))
5051
- `container_registry_access_level` (String) Set visibility of container registry, for this project. Valid values are `disabled`, `private`, `enabled`.
5152
- `default_branch` (String) The default branch for the project.

internal/provider/data_source_gitlab_project.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,11 @@ var _ = registerDataSource("gitlab_project", func() *schema.Resource {
295295
Optional: true,
296296
Computed: true,
297297
},
298+
"ci_config_path": {
299+
Description: "CI config file path for the project.",
300+
Type: schema.TypeString,
301+
Computed: true,
302+
},
298303
"push_rules": {
299304
Description: "Push rules for the project.",
300305
Type: schema.TypeList,
@@ -436,6 +441,7 @@ func dataSourceGitlabProjectRead(ctx context.Context, d *schema.ResourceData, me
436441
d.Set("squash_commit_template", found.SquashCommitTemplate)
437442
d.Set("merge_commit_template", found.MergeCommitTemplate)
438443
d.Set("ci_default_git_depth", found.CIDefaultGitDepth)
444+
d.Set("ci_config_path", found.CIConfigPath)
439445

440446
log.Printf("[DEBUG] Reading Gitlab project %q push rules", d.Id())
441447

0 commit comments

Comments
 (0)