Skip to content
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_approval_rule: fix potential accidental destroy of resource if not in first page #950

Merged
merged 2 commits into from
Mar 19, 2022

Conversation

timofurrer
Copy link
Member

This fixes a potential bug that the resource is marked for destroy after a read,
because it was not found on the first page. Pagination was not implemented.
However, there exist a specific API to get a single project-level approval rule.
I have implemented it in go-gitlab:

After it is released, we should be able to just rebase and LGTM ;)

Refs: #949

@timofurrer timofurrer added this to the v3.13.0 milestone Mar 12, 2022
@timofurrer timofurrer self-assigned this Mar 12, 2022
@github-actions github-actions bot added provider resource Adds or modifies a resource size/S labels Mar 12, 2022
@timofurrer timofurrer added blocked We are currently blocked to implement this go-gitlab Is related to go-gitlab. Maybe be combined with other labels, like `blocked`. labels Mar 12, 2022
@timofurrer timofurrer marked this pull request as draft March 12, 2022 08:27
@timofurrer timofurrer removed blocked We are currently blocked to implement this go-gitlab Is related to go-gitlab. Maybe be combined with other labels, like `blocked`. labels Mar 18, 2022
…roy of resource if not in first page

This fixes a potential bug that the resource is marked for destroy after a read,
because it was not found on the first page. Pagination was not implemented.
However, there exist a specific API to get a single project-level approval rule.
I have implemented it in go-gitlab:

* xanzy/go-gitlab#1410

After it is released, we should be able to just rebase and LGTM ;)
@timofurrer timofurrer marked this pull request as ready for review March 18, 2022 15:58
@github-actions github-actions bot added data-source Adds or modifies a data-source dependencies size/M and removed size/S labels Mar 18, 2022
@timofurrer timofurrer merged commit d8c97a0 into gitlabhq:main Mar 19, 2022
@github-actions
Copy link

This functionality has been released in v3.13.0 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!

@github-actions github-actions bot locked and limited conversation to collaborators Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
data-source Adds or modifies a data-source dependencies provider resource Adds or modifies a resource size/M
2 participants