Skip to content

feat(identity): Phase 1 identity resources and data sources - #3

Merged
PF9-pushkar merged 4 commits into
mainfrom
feat/identity-resources
Jul 12, 2026
Merged

feat(identity): Phase 1 identity resources and data sources#3
PF9-pushkar merged 4 commits into
mainfrom
feat/identity-resources

Conversation

@PF9-pushkar

Copy link
Copy Markdown
Collaborator

Phase 1 — identity (Keystone v3)

The first feature family for terraform-provider-pcd. Every resource and data source is
acceptance-tested green against the CE 2026.4 lab (create/update/import, CheckDestroy,
name/id lookups), serialized on the single lab.

Resources

  • pcd_identity_project
  • pcd_identity_role
  • pcd_identity_user — write-only password, preserved across Read, ignored on import
  • pcd_identity_role_assignment — composite id domain/project/group/user/role, all-ForceNew, list-based existence check; exactly one of user_id/group_id and one of project_id/domain_id enforced
  • pcd_identity_application_credential — create-only; secret returned once and kept in state; created for the authenticated (token) user

Data sources

  • pcd_identity_project, pcd_identity_user, pcd_identity_role (lookup by name or id)

Patterns established (reused by later families)

  • SDKv2 → framework port: typed models, RequiresReplace/UseStateForUnknown, defaults, 404-as-removal in Read, ImportState passthrough.
  • internal/acctest PreCheck + LabConfig helpers; per-resource CheckDestroy/CheckExists via gophercloud.

Test evidence

TF_ACC=1 make testacc for ./internal/services/identity/7/7 passing against the lab.

Notes

  • clouds.yaml (cloud) and per-resource region override remain deferred (tracked in DECISIONS.md).
  • Next family: images (Glance).

Reference implementation for the framework CRUD port pattern: typed model with
RequiresReplace/UseStateForUnknown plan modifiers and defaults, 404-as-removal in
Read, and ImportState passthrough. Acceptance test (create/update/import with
CheckDestroy + CheckExists) passes against the CE lab.

Adds acctest.LabConfig helper so tests can query the API out of band, and registers
the resource on the provider.
…ta sources

All acceptance-tested against the CE lab (create/update/import, name/id lookups).
- pcd_identity_role, pcd_identity_user (write-only password, preserved across Read)
- pcd_identity_project / _user / _role data sources (lookup by name or id)
- shared configureClient helper for resource/data-source ProviderData wiring
Completes the Phase 1 identity family; both acceptance-tested against the CE lab.
- pcd_identity_role_assignment: composite id (domain/project/group/user/role),
  all-ForceNew, list-based existence check, import passthrough. Exactly one of
  user_id/group_id and one of project_id/domain_id is enforced.
- pcd_identity_application_credential: create-only; the secret is returned once and
  preserved in state; created for the authenticated (token) user.
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