Skip to content

feat(identity): group, group_membership, and group data source - #27

Merged
PF9-pushkar merged 1 commit into
mainfrom
feat/identity-group
Jul 13, 2026
Merged

feat(identity): group, group_membership, and group data source#27
PF9-pushkar merged 1 commit into
mainfrom
feat/identity-group

Conversation

@PF9-pushkar

Copy link
Copy Markdown
Collaborator

Closes the identity gap the api-docs audit found — groups was the highest-value missing Keystone object.

  • pcd_identity_group — resource (name / description / domain_id, domain_id ForceNew) + data source (lookup by id or name), matching the project/user/role pattern.
  • pcd_identity_group_membership — one user↔group pair per resource, mapping directly to PUT/DELETE /groups/{id}/users/{user_id}. Chosen over upstream's authoritative-users-set variant because it's simpler and composable (no read-modify-write set, no authoritative-vs-additive footgun). Read uses IsMemberOfGroup to drop the resource if the membership is removed out of band; composite <group_id>/<user_id> import.

Adversarial review (state-consistency + gophercloud/membership lenses, each verified against source) returned 0 findings — including confirmation that AddToGroup/RemoveFromGroup/IsMemberOfGroup are called with the correct (groupID, userID) arg order.

Testing: build / vet / gofmt / golangci-lint (0) / unit tests / terraform fmt / docs generate — all clean. Acceptance tests are self-contained (Keystone needs no backend), so they can validate whenever the campaign resumes.

Part of the api-docs coverage build-out. Remaining: Cluster Blueprint and Kubernetes (both new REST-client families).

Close the identity api-docs coverage gap:

- pcd_identity_group: resource (name/description/domain_id) + data source
  (lookup by id or name). A first-class Keystone object that role assignments
  and group membership can target.
- pcd_identity_group_membership: models a single user↔group pair, mapping
  directly to PUT/DELETE /groups/{id}/users/{user_id} (simpler and more
  composable than the upstream authoritative-set variant); Read uses
  IsMemberOfGroup to detect out-of-band removal; composite <group_id>/<user_id>
  import.

Includes examples, self-contained acceptance tests (Keystone needs no backend),
CHANGELOG, and generated docs. Adversarial review: 0 findings.
@PF9-pushkar
PF9-pushkar merged commit ec85607 into main Jul 13, 2026
5 checks passed
@PF9-pushkar
PF9-pushkar deleted the feat/identity-group branch July 13, 2026 23:25
PF9-pushkar added a commit that referenced this pull request Jul 14, 2026
feat(identity): group, group_membership, and group data source
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant