Skip to content

core: Add pingone-go-sdk-v2/management SDK for non-DaVinci PingOne resources - #132

Closed
samir-gandhi wants to merge 2 commits into
mainfrom
polaris/sdk-management-integration
Closed

core: Add pingone-go-sdk-v2/management SDK for non-DaVinci PingOne resources#132
samir-gandhi wants to merge 2 commits into
mainfrom
polaris/sdk-management-integration

Conversation

@samir-gandhi

Copy link
Copy Markdown
Contributor

Summary

  • The repo's only PingOne SDK, pingone-go-client, exposes just DaVinci, Environments, Connectors, and ConfigurationManagement APIs — none of the ~92 open export-support issues (resource/pingone_administrator_security: add export support #27-resource/pingone_verify_voice_phrase_content: add export support #118, tracked in PingOne Provider Coverage Tracker #119) for Platform/SSO/Authorize/MFA/Protect/Verify resources can be implemented against it.
  • Adds github.com/patrickcping/pingone-go-sdk-v2/management (the same SDK terraform-provider-pingone uses) as a second client on internal/platform/pingone.Client, alongside the existing DaVinci client — no existing resource_*.go files are touched.
  • The management client is built lazily via Client.management(ctx) because pingonesdkv2.Config.ManagementAPIClient(ctx) performs an OAuth token exchange at construction time (unlike the DaVinci SDK, which defers auth to first request) — eager construction would break NewFromCredentials unit tests with fake credentials and make every Client construction do a live network call.
  • Updated internal/platform/pingone/client_test.go fixtures to use UUID-shaped client/environment IDs, since the new SDK's Config.Validate() rejects non-UUID-shaped values (the old fixtures used placeholder strings like "client-123").

This is prep work only — no new resources are added in this PR. It unblocks the pilot batch (pingone_resource, pingone_population, pingone_group, pingone_application) which needs this client.

Test plan

  • go build ./...
  • go vet ./...
  • go fmt ./...
  • go test ./internal/... -count=1 — all packages pass, including internal/platform/pingone with updated TestNewFromCredentials fixtures
  • Live smoke test: built a throwaway probe against real credentials, confirmed ManagementAPIClient authenticates and ResourcesApi.ReadAllResources succeeds against the target environment (not part of this diff, done to verify the wiring before handing off to resource-implementation agents)

🤖 Generated with Claude Code

…sources

pingone-go-client only covers DaVinci, Environments, Connectors, and
ConfigurationManagement APIs, so the ~92 open Platform/SSO/Authorize/MFA/
Protect/Verify export-support issues cannot be implemented against it.
Add patrickcping/pingone-go-sdk-v2/management (the SDK terraform-provider-
pingone itself uses) as a second client on Client, built lazily since it
performs an OAuth exchange at construction time rather than on first
request.
@github-actions

Copy link
Copy Markdown

Regression Test Results

Matrix Entry Status Breaking Acceptable
default-hcl ✅ PASS 0 0
default-tfjson ✅ PASS 0 0
hcl-include-all ✅ PASS 0 0
hcl-skip-deps ✅ PASS 0 0
tfjson-skip-deps ✅ PASS 0 0

✅ No regressions detected

All export configurations produced compatible output.


Generated by regression workflow • View run

The go:embed directive listed pingone/base and pingone/davinci explicitly,
so every new resource category (sso, platform, mfa, ...) would require
editing this file — violating the "new resource requires zero edits to
existing files" invariant. A single pingone/*/*.yaml wildcard covers any
category subdirectory automatically.
@github-actions

Copy link
Copy Markdown

Regression Test Results

Matrix Entry Status Breaking Acceptable
default-hcl ✅ PASS 0 0
default-tfjson ✅ PASS 0 0
hcl-include-all ✅ PASS 0 0
hcl-skip-deps ✅ PASS 0 0
tfjson-skip-deps ✅ PASS 0 0

✅ No regressions detected

All export configurations produced compatible output.


Generated by regression workflow • View run

@samir-gandhi

Copy link
Copy Markdown
Contributor Author

Superseded by the pingone-core-resources branch — this PR's commits now live directly on that branch, which is being used as the integration target for the ongoing PingOne resource coverage pilot (tracked in #119) instead of main. Future resource PRs in this pilot target pingone-core-resources directly. Closing without merging to main.

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