Skip to content

Commit 728cb94

Browse files
committed
datasource/gitlab_project: Add ci_default_git_depth attribute
1 parent 9777b1b commit 728cb94

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

docs/data-sources/projects.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ Read-Only:
9393
- `build_timeout` (Number)
9494
- `builds_access_level` (String)
9595
- `ci_config_path` (String)
96+
- `ci_default_git_depth` (Number)
9697
- `ci_forward_deployment_enabled` (Boolean)
9798
- `container_expiration_policy` (List of Object) (see [below for nested schema](#nestedobjatt--projects--container_expiration_policy))
9899
- `container_registry_access_level` (String)

internal/provider/data_source_gitlab_projects.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ func flattenProjects(projects []*gitlab.Project) (values []map[string]interface{
190190
"wiki_access_level": string(project.WikiAccessLevel),
191191
"squash_commit_template": project.SquashCommitTemplate,
192192
"merge_commit_template": project.MergeCommitTemplate,
193+
"ci_default_git_depth": project.CIDefaultGitDepth,
193194
}
194195
values = append(values, v)
195196
}
@@ -944,6 +945,12 @@ var _ = registerDataSource("gitlab_projects", func() *schema.Resource {
944945
Type: schema.TypeString,
945946
Computed: true,
946947
},
948+
"ci_default_git_depth": {
949+
Description: "Default number of revisions for shallow cloning.",
950+
Type: schema.TypeInt,
951+
Optional: true,
952+
Computed: true,
953+
},
947954
},
948955
},
949956
},

0 commit comments

Comments
 (0)