You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resource/gitlab_project: Fix admin token requirement to check default branch protection
This bugfix change set gracefully handles checking for the
instance-level default branch protection setting if the provider token
is not from an administrator user.
This bug was introduced in
#1128 in an
attempt to check the instance-level wide settings - which unfortunately,
and not to my knowledge at the time requires an admin token.
In case the token is not from an admin the project resource won't check
for the settings and by default restore the faulty behavior before #1128
which was to wait for the default branch protection to be created.
However, if this won't happen because it's disabled on the
instance-level the user can set
`skip_wait_for_default_branch_protection = true` which skips waiting for
the default branch protection.
Closes: #1167
* resource/gitlab_project_access_token: Add `owner` as possible value to `access_level` ([#1145](https://github.com/gitlabhq/terraform-provider-gitlab/pull/1145))
25
+
* resource/gitlab_project_membership: Add `owner` as possible value to `access_level` ([#1145](https://github.com/gitlabhq/terraform-provider-gitlab/pull/1145))
26
+
* resource/gitlab_project_share_group: Add `owner` as possible value to `access_level` ([#1145](https://github.com/gitlabhq/terraform-provider-gitlab/pull/1145))
* resource/gitlab_project: Fix project creation when default branch protection is disabled on instance-level (#[1128])
26
-
* resource/gitlab_project: Fix a case where a change to a project in terraform can never apply when certain fields are modified ([#1158])
27
-
* resource/gitlab_project: Fix passing `false` to API for explicitly set optional attributes ([#1152])
28
-
* resource/gitlab_group: Fix passing false to API for explicitly set optional attributes ([#1152])
33
+
* resource/gitlab_project: Fix project creation when default branch protection is disabled on instance-level ([#1128](https://github.com/gitlabhq/terraform-provider-gitlab/pull/1128))
34
+
* resource/gitlab_project: Fix a case where a change to a project in terraform can never apply when certain fields are modified ([#1158](https://github.com/gitlabhq/terraform-provider-gitlab/pull/1158))
35
+
* resource/gitlab_project: Fix passing `false` to API for explicitly set optional attributes ([#1152](https://github.com/gitlabhq/terraform-provider-gitlab/pull/1152))
36
+
* resource/gitlab_group: Fix passing false to API for explicitly set optional attributes ([#1152](https://github.com/gitlabhq/terraform-provider-gitlab/pull/1152))
-`resolve_outdated_diff_discussions` (Boolean) Automatically resolve merge request diffs discussions on lines changed with a push.
137
137
-`security_and_compliance_access_level` (String) Set the security and compliance access level. Valid values are `disabled`, `private`, `enabled`.
138
138
-`shared_runners_enabled` (Boolean) Enable shared runners for this project.
139
+
-`skip_wait_for_default_branch_protection` (Boolean) If `true`, the default behavior to wait for the default branch protection to be created is skipped.
140
+
This is necessary if the current user is not an admin and the default branch protection is disabled on an instance-level.
141
+
There is currently no known way to determine if the default branch protection is disabled on an instance-level for non-admin users.
142
+
This attribute is only used during resource creation, thus changes are suppressed and the attribute cannot be imported.
139
143
-`snippets_access_level` (String) Set the snippets access level. Valid values are `disabled`, `private`, `enabled`.
140
144
-`snippets_enabled` (Boolean) Enable snippets for the project.
141
145
-`squash_commit_template` (String) Template used to create squash commit message in merge requests. (Introduced in GitLab 14.6.)
0 commit comments