Skip to content

Commit d4600a1

Browse files
Update docs for v15.8.0 release
1 parent b5c87a3 commit d4600a1

File tree

7 files changed

+37
-5
lines changed

7 files changed

+37
-5
lines changed

docs/data-sources/group_membership.md

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ data "gitlab_group_membership" "example" {
3535
- `access_level` (String) Only return members with the desired access level. Acceptable values are: `guest`, `reporter`, `developer`, `maintainer`, `owner`.
3636
- `full_path` (String) The full path of the group.
3737
- `group_id` (Number) The ID of the group.
38+
- `inherited` (Boolean) Return all project members including members through ancestor groups.
3839

3940
### Read-Only
4041

docs/data-sources/projects.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ data "gitlab_projects" "projects" {
5252
- `max_queryable_pages` (Number) The maximum number of project results pages that may be queried. Prevents overloading your Gitlab instance in case of a misconfiguration.
5353
- `membership` (Boolean) Limit by projects that the current user is a member of.
5454
- `min_access_level` (Number) Limit to projects where current user has at least this access level, refer to the [official documentation](https://docs.gitlab.com/ee/api/members.html) for values. Cannot be used with `group_id`.
55-
- `order_by` (String) Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, or `last_activity_at` fields. Default is `created_at`.
55+
- `order_by` (String) Return projects ordered ordered by: `id`, `name`, `path`, `created_at`, `updated_at`, `last_activity_at`, `similarity`, `repository_size`, `storage_size`, `packages_size`, `wiki_size`. Some values or only available in certain circumstances. See [upstream docs](https://docs.gitlab.com/ee/api/projects.html#list-all-projects) for details.
5656
- `owned` (Boolean) Limit by projects owned by the current user.
5757
- `page` (Number) The first page to begin the query on.
5858
- `per_page` (Number) The number of results to return per page.

docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ which may be consumed to better understand the behavior of the API.
1717

1818
Use the navigation to the left to read about the valid data sources and resources.
1919

20-
This provider requires at least [Terraform 0.12](https://www.terraform.io/downloads.html).
20+
This provider requires at least [Terraform 1.0](https://www.terraform.io/downloads.html).
2121

2222
## Example Usage
2323

docs/resources/group.md

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ resource "gitlab_project" "example" {
5050
- `description` (String) The description of the group.
5151
- `emails_disabled` (Boolean) Defaults to false. Disable email notifications.
5252
- `extra_shared_runners_minutes_limit` (Number) Can be set by administrators only. Additional CI/CD minutes for this group.
53+
- `ip_restriction_ranges` (List of String) A list of IP addresses or subnet masks to restrict group access. Will be concatenated together into a comma separated string. Only allowed on top level groups.
5354
- `lfs_enabled` (Boolean) Defaults to true. Enable/disable Large File Storage (LFS) for the projects in this group.
5455
- `membership_lock` (Boolean) Users cannot be added to projects in this group.
5556
- `mentions_disabled` (Boolean) Defaults to false. Disable the capability of a group from getting mentioned.

docs/resources/project.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,22 @@ resource "gitlab_project" "peters_repo" {
6161
description = "This is a description"
6262
namespace_id = data.gitlab_user.peter_parker.namespace_id
6363
}
64+
65+
# Fork a project
66+
resource "gitlab_project" "fork" {
67+
name = "my-fork"
68+
description = "This is a fork"
69+
forked_from_project_id = gitlab_project.example.id
70+
}
71+
72+
# Fork a project and setup a pull mirror
73+
resource "gitlab_project" "fork" {
74+
name = "my-fork"
75+
description = "This is a fork"
76+
forked_from_project_id = gitlab_project.example.id
77+
import_url = gitlab_project.example.http_url_to_repo
78+
mirror = true
79+
}
6480
```
6581

6682
<!-- schema generated by tfplugindocs -->
@@ -104,7 +120,7 @@ resource "gitlab_project" "peters_repo" {
104120
- `forked_from_project_id` (Number) The id of the project to fork. During create the project is forked and during an update the fork relation is changed.
105121
- `forking_access_level` (String) Set the forking access level. Valid values are `disabled`, `private`, `enabled`.
106122
- `group_with_project_templates_id` (Number) For group-level custom templates, specifies ID of group from which all the custom project templates are sourced. Leave empty for instance-level templates. Requires use_custom_template to be true (enterprise edition).
107-
- `import_url` (String) Git URL to a repository to be imported.
123+
- `import_url` (String) Git URL to a repository to be imported. Together with `mirror = true` it will setup a Pull Mirror. This can also be used together with `forked_from_project_id` to setup a Pull Mirror for a fork. The fork takes precedence over the import. This field cannot be imported via `terraform import`.
108124
- `initialize_with_readme` (Boolean) Create main branch with first commit containing a README.md file.
109125
- `issues_access_level` (String) Set the issues access level. Valid values are `disabled`, `private`, `enabled`.
110126
- `issues_enabled` (Boolean) Enable issue tracking for the project.
@@ -120,6 +136,7 @@ resource "gitlab_project" "peters_repo" {
120136
- `mirror` (Boolean) Enable project pull mirror.
121137
- `mirror_overwrites_diverged_branches` (Boolean) Enable overwrite diverged branches for a mirrored project.
122138
- `mirror_trigger_builds` (Boolean) Enable trigger builds on pushes for a mirrored project.
139+
- `mr_default_target_self` (Boolean) For forked projects, target merge requests to this project. If false, the target will be the upstream project.
123140
- `namespace_id` (Number) The namespace (group or user) of the project. Defaults to your user.
124141
- `only_allow_merge_if_all_discussions_are_resolved` (Boolean) Set to true if you want allow merges only if all discussions are resolved.
125142
- `only_allow_merge_if_pipeline_succeeds` (Boolean) Set to true if you want allow merges only if a pipeline succeeds.

docs/resources/project_approval_rule.md

+13
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ subcategory: ""
55
description: |-
66
The gitlab_project_approval_rule resource allows to manage the lifecycle of a project-level approval rule.
77
-> This resource requires a GitLab Enterprise instance.
8+
~> A project is limited to one "anyapprover" rule at a time, any attempt to create a second rule of type "anyapprover" will fail. As a result, if
9+
an "any_approver" rule is already present on a project at creation time, and that rule requires 0 approvers, the rule will be automatically imported
10+
to prevent a common error with this resource.
11+
~> Since a project is limited to one "anyapprover" rule, attempting to add two "anyapprover" rules to the same project in terraform will result in
12+
terraform identifying changes with every "plan" operation, and may result in an error during the "apply" operation.
813
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/merge_request_approvals.html#project-level-mr-approvals
914
---
1015

@@ -14,6 +19,13 @@ The `gitlab_project_approval_rule` resource allows to manage the lifecycle of a
1419

1520
-> This resource requires a GitLab Enterprise instance.
1621

22+
~> A project is limited to one "any_approver" rule at a time, any attempt to create a second rule of type "any_approver" will fail. As a result, if
23+
an "any_approver" rule is already present on a project at creation time, and that rule requires 0 approvers, the rule will be automatically imported
24+
to prevent a common error with this resource.
25+
26+
~> Since a project is limited to one "any_approver" rule, attempting to add two "any_approver" rules to the same project in terraform will result in
27+
terraform identifying changes with every "plan" operation, and may result in an error during the "apply" operation.
28+
1729
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/merge_request_approvals.html#project-level-mr-approvals)
1830

1931
## Example Usage
@@ -78,6 +90,7 @@ resource "gitlab_project_approval_rule" "any_approver" {
7890

7991
### Optional
8092

93+
- `disable_importing_default_any_approver_rule_on_create` (Boolean) When this flag is set, the default `any_approver` rule will not be imported if present.
8194
- `group_ids` (Set of Number) A list of group IDs whose members can approve of the merge request.
8295
- `protected_branch_ids` (Set of Number) A list of protected branch IDs (not branch names) for which the rule applies.
8396
- `rule_type` (String) String, defaults to 'regular'. The type of rule. `any_approver` is a pre-configured default rule with `approvals_required` at `0`. Valid values are `regular`, `any_approver`.

docs/resources/project_protected_environment.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,17 @@ resource "gitlab_project_protected_environment" "example_with_multiple" {
8989

9090
### Required
9191

92-
- `deploy_access_levels` (Block List, Min: 1) Array of access levels allowed to deploy, with each described by a hash. (see [below for nested schema](#nestedblock--deploy_access_levels))
9392
- `environment` (String) The name of the environment.
9493
- `project` (String) The ID or full path of the project which the protected environment is created against.
9594

9695
### Optional
9796

97+
- `deploy_access_levels` (Block Set) Array of access levels allowed to deploy, with each described by a hash. (see [below for nested schema](#nestedblock--deploy_access_levels))
9898
- `required_approval_count` (Number) The number of approvals required to deploy to this environment.
9999

100100
### Read-Only
101101

102-
- `id` (String) The ID of this resource.
102+
- `id` (String) The ID of this Terraform resource. In the format of `<project>:<environment-name>`.
103103

104104
<a id="nestedblock--deploy_access_levels"></a>
105105
### Nested Schema for `deploy_access_levels`

0 commit comments

Comments
 (0)