Skip to content

Commit fb2e42d

Browse files
authored
Merge pull request #921 from timofurrer/docs/descriptions
Improve documentation and reference upstream API for every data source and resource
2 parents fbbcb72 + c4cfe2b commit fb2e42d

File tree

110 files changed

+544
-338
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+544
-338
lines changed

docs/data-sources/branch.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
page_title: "gitlab_branch Data Source - terraform-provider-gitlab"
44
subcategory: ""
55
description: |-
6-
Provide details about a gitlab project branch
6+
The gitlab_branch data source allows details of a repository branch to be retrieved by its name and project.
7+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/branches.html#get-single-repository-branch
78
---
89

910
# gitlab_branch (Data Source)
1011

11-
Provide details about a gitlab project branch
12+
The `gitlab_branch` data source allows details of a repository branch to be retrieved by its name and project.
13+
14+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/branches.html#get-single-repository-branch)
1215

1316
## Example Usage
1417

docs/data-sources/group.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
page_title: "gitlab_group Data Source - terraform-provider-gitlab"
44
subcategory: ""
55
description: |-
6-
Provide details about a specific group in the gitlab provider.
7-
Note: exactly one of groupid or fullpath must be provided.
6+
The gitlab_group data source allows details of a group to be retrieved by its id or full path.
7+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/groups.html#details-of-a-group
88
---
99

1010
# gitlab_group (Data Source)
1111

12-
Provide details about a specific group in the gitlab provider.
12+
The `gitlab_group` data source allows details of a group to be retrieved by its id or full path.
1313

14-
> **Note**: exactly one of group_id or full_path must be provided.
14+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#details-of-a-group)
1515

1616
## Example Usage
1717

docs/data-sources/group_membership.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
page_title: "gitlab_group_membership Data Source - terraform-provider-gitlab"
44
subcategory: ""
55
description: |-
6-
Provide details about a list of group members in the gitlab provider. The results include id, username, name and more about the requested members.
7-
Note: exactly one of groupid or fullpath must be provided.
6+
The gitlab_group_membership data source allows to list and filter all members of a group specified by either its id or full path.
7+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project
88
---
99

1010
# gitlab_group_membership (Data Source)
1111

12-
Provide details about a list of group members in the gitlab provider. The results include id, username, name and more about the requested members.
12+
The `gitlab_group_membership` data source allows to list and filter all members of a group specified by either its id or full path.
1313

14-
> **Note**: exactly one of group_id or full_path must be provided.
14+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project)
1515

1616
## Example Usage
1717

docs/data-sources/project.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
page_title: "gitlab_project Data Source - terraform-provider-gitlab"
44
subcategory: ""
55
description: |-
6-
Provide details about a specific project in the gitlab provider. The results include the name of the project, path, description, default branch, etc.
6+
The gitlab_project data source allows details of a project to be retrieved by either its ID or its path with namespace.
7+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/projects.html#get-single-project
78
---
89

910
# gitlab_project (Data Source)
1011

11-
Provide details about a specific project in the gitlab provider. The results include the name of the project, path, description, default branch, etc.
12+
The `gitlab_project` data source allows details of a project to be retrieved by either its ID or its path with namespace.
13+
14+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#get-single-project)
1215

1316
## Example Usage
1417

docs/data-sources/project_protected_branch.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
page_title: "gitlab_project_protected_branch Data Source - terraform-provider-gitlab"
44
subcategory: ""
55
description: |-
6-
Provides details about a specific protected branch in a given project.
6+
The gitlab_protected_branch data source allows details of a protected branch to be retrieved by its name and the project it belongs to.
7+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/protected_branches.html#get-a-single-protected-branch-or-wildcard-protected-branch
78
---
89

910
# gitlab_project_protected_branch (Data Source)
1011

11-
Provides details about a specific protected branch in a given project.
12+
The `gitlab_protected_branch` data source allows details of a protected branch to be retrieved by its name and the project it belongs to.
13+
14+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/protected_branches.html#get-a-single-protected-branch-or-wildcard-protected-branch)
1215

1316
## Example Usage
1417

docs/data-sources/project_protected_branches.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
page_title: "gitlab_project_protected_branches Data Source - terraform-provider-gitlab"
44
subcategory: ""
55
description: |-
6-
Provides details about all protected branches in a given project.
6+
The gitlab_protected_branches data source allows details of the protected branches of a given project.
7+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/protected_branches.html#list-protected-branches
78
---
89

910
# gitlab_project_protected_branches (Data Source)
1011

11-
Provides details about all protected branches in a given project.
12+
The `gitlab_protected_branches` data source allows details of the protected branches of a given project.
13+
14+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/protected_branches.html#list-protected-branches)
1215

1316
## Example Usage
1417

docs/data-sources/projects.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@
33
page_title: "gitlab_projects Data Source - terraform-provider-gitlab"
44
subcategory: ""
55
description: |-
6-
Provide details about a list of projects in the Gitlab provider. Listing all projects and group projects with project filtering https://docs.gitlab.com/ee/api/projects.html#list-user-projects or group project filtering https://docs.gitlab.com/ee/api/groups.html#list-a-groups-projects is supported.
7-
NOTE: This data source supports all available filters exposed by the xanzy/go-gitlab package, which might not expose all available filters exposed by the Gitlab APIs.
8-
NOTE: The owner sub-attributes are only populated if the Gitlab token used has an administrator scope.
6+
The gitlab_projects data source allows details of multiple projects to be retrieved. Optionally filtered by the set attributes.
7+
-> This data source supports all available filters exposed by the xanzy/go-gitlab package, which might not expose all available filters exposed by the Gitlab APIs.
8+
-> The owner sub-attributes are only populated if the Gitlab token used has an administrator scope.
9+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/projects.html#list-all-projects
910
---
1011

1112
# gitlab_projects (Data Source)
1213

13-
Provide details about a list of projects in the Gitlab provider. Listing all projects and group projects with [project filtering](https://docs.gitlab.com/ee/api/projects.html#list-user-projects) or [group project filtering](https://docs.gitlab.com/ee/api/groups.html#list-a-groups-projects) is supported.
14+
The `gitlab_projects` data source allows details of multiple projects to be retrieved. Optionally filtered by the set attributes.
1415

15-
> **NOTE**: This data source supports all available filters exposed by the `xanzy/go-gitlab` package, which might not expose all available filters exposed by the Gitlab APIs.
16+
-> This data source supports all available filters exposed by the xanzy/go-gitlab package, which might not expose all available filters exposed by the Gitlab APIs.
1617

17-
> **NOTE**: The [owner sub-attributes](#nestedobjatt--projects--owner) are only populated if the Gitlab token used has an administrator scope.
18+
-> The [owner sub-attributes](#nestedobjatt--projects--owner) are only populated if the Gitlab token used has an administrator scope.
19+
20+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/projects.html#list-all-projects)
1821

1922
## Example Usage
2023

docs/data-sources/user.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33
page_title: "gitlab_user Data Source - terraform-provider-gitlab"
44
subcategory: ""
55
description: |-
6-
Provide details about a specific user in the gitlab provider. Especially the ability to lookup the id for linking to other resources.
7-
-> Some attributes might not be returned depending on if you're an admin or not. Please refer to Gitlab documentation https://docs.gitlab.com/ce/api/users.html#single-user for more details.
6+
The gitlab_user data source allows details of a user to be retrieved by either the user ID, username or email address.
7+
-> Some attributes might not be returned depending on if you're an admin or not.
8+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/users.html#single-user
89
---
910

1011
# gitlab_user (Data Source)
1112

12-
Provide details about a specific user in the gitlab provider. Especially the ability to lookup the id for linking to other resources.
13+
The `gitlab_user` data source allows details of a user to be retrieved by either the user ID, username or email address.
1314

14-
-> Some attributes might not be returned depending on if you're an admin or not. Please refer to [Gitlab documentation](https://docs.gitlab.com/ce/api/users.html#single-user) for more details.
15+
-> Some attributes might not be returned depending on if you're an admin or not.
16+
17+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/users.html#single-user)
1518

1619
## Example Usage
1720

docs/data-sources/users.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,21 @@
33
page_title: "gitlab_users Data Source - terraform-provider-gitlab"
44
subcategory: ""
55
description: |-
6-
Provide details about a list of users in the gitlab provider. The results include id, username, email, name and more about the requested users. Users can also be sorted and filtered using several options.
7-
NOTE: Some available options require administrator privileges. Please visit [Gitlab API documentation][usersforadmins] for more information.
6+
The gitlab_users data source allows details of multiple users to be retrieved given some optional filter criteria.
7+
-> Some attributes might not be returned depending on if you're an admin or not.
8+
-> Some available options require administrator privileges.
9+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ce/api/users.html#list-users
810
---
911

1012
# gitlab_users (Data Source)
1113

12-
Provide details about a list of users in the gitlab provider. The results include id, username, email, name and more about the requested users. Users can also be sorted and filtered using several options.
14+
The `gitlab_users` data source allows details of multiple users to be retrieved given some optional filter criteria.
1315

14-
**NOTE**: Some available options require administrator privileges. Please visit [Gitlab API documentation][users_for_admins] for more information.
16+
-> Some attributes might not be returned depending on if you're an admin or not.
17+
18+
-> Some available options require administrator privileges.
19+
20+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ce/api/users.html#list-users)
1521

1622
## Example Usage
1723

docs/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ Use the GitLab provider to interact with GitLab resources, like
99
users, groups, projects and more. You must configure the provider with
1010
the proper credentials before you can use it.
1111

12+
The provider uses the [`xanzy/go-gitlab`](https://github.com/xanzy/go-gitlab) library
13+
to interact with the [GitLab REST API](https://docs.gitlab.com/ee/api/api_resources.html).
14+
15+
Each data source and resource references the appropriate upstream GitLab REST API documentation,
16+
which may be consumed to better understand the behavior of the API.
17+
1218
Use the navigation to the left to read about the valid data sources and resources.
1319

1420
This provider requires at least [Terraform 0.12](https://www.terraform.io/downloads.html).

0 commit comments

Comments
 (0)