gitlab_group_ldap_link does not enforce state

Bug Report

I am using gitlab_group_ldap_link to enforce LDAP groups being linked to a Gitlab group. However when an admin removes an LDAP group link, terraform does not see that the link has been removed and does not add it back.

I need terraform to put back the LDAP link when it is removed from Gitlab.

Relevant Terraform Configuration

resource "gitlab_group_ldap_link" "default" {
  for_each = local.ldap_mapping

  group_id      = gitlab_group.group.id
  cn            = each.value.path
  group_access  = each.value.access_level
  ldap_provider = "ldapmain"
}

Relevant Terraform Command

terraform plan/apply

Relevant Log Output

Additional Details

  • GitLab Terraform Provider Version: 15.10.0
  • GitLab Version: 15.9.3
  • Terraform Version: 1.3.5
Edited by Arch Oversight