kanidm (Fix): opencloud-groups without entry_managed_by - unblocks the apply permanently #175

Merged
ginjiruu merged 1 commit from opencloud-groups-manager-free into master 2026-11-20 22:16:30 +00:00
Owner

Successor to #174, which guessed wrong. Root cause, verified in the provider source (seanlatimer/kanidm 0.1.10, latest release): group updates call resolveManagerSPN, which fetches GET /v1/person|service_account|group/. The live entry_managed_by of opencloud-groups points at the opencloud-bind OAUTH CLIENT ACCOUNT (live UUID 018fa4a0-0d5b-4068-98e0-534e0f00e735, entry still present, member list intact); oauth accounts are a class the provider never queries, so all three fetches return null - resource not found - and every kanidm apply aborts there (drift detection re-triggers it forever). No config value converges: opencloud-bind, opencloud-web, or the raw UUID all hit the same blind spot. Opencloud only READS group membership (owner-confirmed), so the write-delegation is dead weight: drop the attribute; this plan clears it live and the group returns to plain admin management - which also lets tofu manage its members again. Reads (applyGroupState) swallow the resolution failure, so refresh never complained; only Update aborts, hence the August config failing only now that the group drifted.

Successor to #174, which guessed wrong. Root cause, verified in the provider source (seanlatimer/kanidm 0.1.10, latest release): group updates call resolveManagerSPN, which fetches GET /v1/person|service_account|group/<identifier>. The live entry_managed_by of opencloud-groups points at the opencloud-bind OAUTH CLIENT ACCOUNT (live UUID 018fa4a0-0d5b-4068-98e0-534e0f00e735, entry still present, member list intact); oauth accounts are a class the provider never queries, so all three fetches return null - resource not found - and every kanidm apply aborts there (drift detection re-triggers it forever). No config value converges: opencloud-bind, opencloud-web, or the raw UUID all hit the same blind spot. Opencloud only READS group membership (owner-confirmed), so the write-delegation is dead weight: drop the attribute; this plan clears it live and the group returns to plain admin management - which also lets tofu manage its members again. Reads (applyGroupState) swallow the resolution failure, so refresh never complained; only Update aborts, hence the August config failing only now that the group drifted.
Collaborator

tf-controller plan output:


OpenTofu used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place (current -> planned)

OpenTofu will perform the following actions:

  # kanidm_group.opencloud_groups will be updated in-place
  ~ resource "kanidm_group" "opencloud_groups" {
      - entry_managed_by = "018fa4a0-0d5b-4068-98e0-534e0f00e735" -> null
        id               = "c893a6cf-23b8-4569-942a-986bc20ad81d"
      ~ members          = [
          - "0c020e8a-2da6-415e-8316-7e5e873aae46",
          - "38068641-dba1-43cd-a178-37ecb01825d9",
          - "5fc24424-e6b0-4cef-8e73-e1c4e67f1af2",
          - "d131685d-249c-4adb-9941-600c6c1ddfb4",
          - "opencloud-bind@auth.animeteamspeak.moe",
        ] -> (known after apply)
        name             = "opencloud-groups"
        # (1 unchanged attribute hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

To apply this plan, please merge this pull request.

tf-controller plan output: ```hcl OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: ~ update in-place (current -> planned) OpenTofu will perform the following actions: # kanidm_group.opencloud_groups will be updated in-place ~ resource "kanidm_group" "opencloud_groups" { - entry_managed_by = "018fa4a0-0d5b-4068-98e0-534e0f00e735" -> null id = "c893a6cf-23b8-4569-942a-986bc20ad81d" ~ members = [ - "0c020e8a-2da6-415e-8316-7e5e873aae46", - "38068641-dba1-43cd-a178-37ecb01825d9", - "5fc24424-e6b0-4cef-8e73-e1c4e67f1af2", - "d131685d-249c-4adb-9941-600c6c1ddfb4", - "opencloud-bind@auth.animeteamspeak.moe", ] -> (known after apply) name = "opencloud-groups" # (1 unchanged attribute hidden) } Plan: 0 to add, 1 to change, 0 to destroy. ``` To apply this plan, please **merge** this pull request.
ginjiruu merged commit 9ccf7b4295 into master 2026-11-20 22:16:30 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lab/iac!175
No description provided.