fix: handle 404 gracefully on gitlab_group_membership delete

What does this MR do and why?

Fixes gitlab_group_membership to handle 404 Not Found responses gracefully during delete operations.

When a GitLab user is blocked (e.g. via IT offboarding), their group membership becomes invisible to the API, causing the provider to receive a 404 when Terraform tries to destroy the resource. Previously this surfaced as an error, blocking the entire apply run and requiring manual terraform state rm intervention.

This MR applies the same 404 → remove-from-state pattern already used in:

Changes

  • resource_gitlab_group_membership.go: Added api.Is404(err) check in the Delete function — when a 404 is received, the resource is treated as already gone and the destroy succeeds silently.
  • resource_gitlab_group_membership_test.go: Added TestAccGitlabGroupMembership_deleteOutOfBand acceptance test that removes the membership out-of-band before a Terraform destroy, verifying no 404 error is returned.

MR acceptance checklist

Closes #6853 (closed)

Merge request reports

Loading