-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resource/gitlab_project: Fix admin token requirement to check default branch protection #1169
Conversation
19a2c11
to
a8cc890
Compare
Holding little bit on this before we merge it - Timo and I have an outstanding discussion on Discord around whether we need to store this value in state. We likely do, because otherwise we'll have non-empty plans on subsequent runs. |
bb825ec
to
22cd624
Compare
… 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 gitlabhq#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 gitlabhq#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
This functionality has been released in v3.16.1 of the Terraform GitLab Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue. Thank you! |
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 forthe default branch protection.
Closes: #1167