Skip to content

Conversation

@henryrecker-pingidentity
Copy link
Contributor

Change Description

Add various beta data sources for DaVinci:

  • pingone_davinci_application
  • pingone_davinci_applications
  • pingone_davinci_connector
  • pingone_davinci_connectors
  • pingone_davinci_connector_instance
  • pingone_davinci_connector_instances

Change Characteristics

  • This PR contains beta functionality
  • This PR requires introduction of breaking changes
  • No changelog entry is needed

Checklist

All full (or complete) PRs that need review prior to merge should have the following box checked.

If contributing a partial or incomplete change (expecting the development team to complete the remaining work) please leave the box unchecked

  • Check to confirm: I have performed a review of my PR against the PR checklist and confirm that:
    • The changelog entry has been included according to the changelog process
    • Changes have proper test coverage (including regression tests)
    • Impacted resource, data source and schema descriptions have been reviewed and updated
    • Impacted resource and data source documentation HCL examples have been reviewed and updated
    • Does not introduce breaking changes (unless required to do so)
    • I am aware that changes to generated code may not be merged

Required SDK Upgrades

Testing

This PR has been tested with:

  • Unit tests (please paste commands and results below)
  • Acceptance tests (please paste commands and results below)
  • End-to-end tests (please paste the link to the actions workflow runs)
  • Not applicable (no evidences needed)

Shell Command(s)

TF_ACC=1 TESTACC_BETA=true go test -tags=beta -v -timeout 300s -run "^TestAccDavinci.*DataSource" github.com/pingidentity/terraform-provider-pingone/internal/service/davinci

Testing Results

Expand Results
=== RUN   TestAccDavinciApplicationDataSource_ByIDFull_Clean
=== PAUSE TestAccDavinciApplicationDataSource_ByIDFull_Clean
=== RUN   TestAccDavinciApplicationDataSource_ByIDFull_WithBootstrap
=== PAUSE TestAccDavinciApplicationDataSource_ByIDFull_WithBootstrap
=== RUN   TestAccDavinciApplicationDataSource_BootstrapApplicationByIDFull
=== PAUSE TestAccDavinciApplicationDataSource_BootstrapApplicationByIDFull
=== RUN   TestAccDavinciApplicationDataSource_NotFound_Clean
=== PAUSE TestAccDavinciApplicationDataSource_NotFound_Clean
=== RUN   TestAccDavinciApplicationDataSource_NotFound_WithBootstrap
=== PAUSE TestAccDavinciApplicationDataSource_NotFound_WithBootstrap
=== RUN   TestAccDavinciApplicationsDataSource_Get_Clean
=== PAUSE TestAccDavinciApplicationsDataSource_Get_Clean
=== RUN   TestAccDavinciApplicationsDataSource_Get_WithBootstrap
=== PAUSE TestAccDavinciApplicationsDataSource_Get_WithBootstrap
=== RUN   TestAccDavinciConnectorDataSource_ByIDFull_Clean
=== PAUSE TestAccDavinciConnectorDataSource_ByIDFull_Clean
=== RUN   TestAccDavinciConnectorDataSource_ByIDFull_WithBootstrap
=== PAUSE TestAccDavinciConnectorDataSource_ByIDFull_WithBootstrap
=== RUN   TestAccDavinciConnectorDataSource_NotFound
=== PAUSE TestAccDavinciConnectorDataSource_NotFound
=== RUN   TestAccDavinciConnectorInstanceDataSource_ByIDFull_Clean
=== PAUSE TestAccDavinciConnectorInstanceDataSource_ByIDFull_Clean
=== RUN   TestAccDavinciConnectorInstanceDataSource_ByIDFull_WithBootstrap
=== PAUSE TestAccDavinciConnectorInstanceDataSource_ByIDFull_WithBootstrap
=== RUN   TestAccDavinciConnectorInstanceDataSource_NotFound_Clean
=== PAUSE TestAccDavinciConnectorInstanceDataSource_NotFound_Clean
=== RUN   TestAccDavinciConnectorInstanceDataSource_NotFound_WithBootstrap
=== PAUSE TestAccDavinciConnectorInstanceDataSource_NotFound_WithBootstrap
=== RUN   TestAccDavinciConnectorInstanceDataSource_BootstrapConnectionByID_Clean
=== PAUSE TestAccDavinciConnectorInstanceDataSource_BootstrapConnectionByID_Clean
=== RUN   TestAccDavinciConnectorInstanceDataSource_BootstrapConnectionByID_WithBootstrap
=== PAUSE TestAccDavinciConnectorInstanceDataSource_BootstrapConnectionByID_WithBootstrap
=== RUN   TestAccDavinciConnectorInstancesDataSource_Get_Clean
=== PAUSE TestAccDavinciConnectorInstancesDataSource_Get_Clean
=== RUN   TestAccDavinciConnectorInstancesDataSource_Get_WithBootstrap
=== PAUSE TestAccDavinciConnectorInstancesDataSource_Get_WithBootstrap
=== RUN   TestAccDavinciConnectorsDataSource_Get_Clean
=== PAUSE TestAccDavinciConnectorsDataSource_Get_Clean
=== RUN   TestAccDavinciConnectorsDataSource_Get_WithBootstrap
=== PAUSE TestAccDavinciConnectorsDataSource_Get_WithBootstrap
=== CONT  TestAccDavinciApplicationDataSource_ByIDFull_Clean
=== CONT  TestAccDavinciConnectorInstanceDataSource_ByIDFull_Clean
=== CONT  TestAccDavinciApplicationsDataSource_Get_Clean
=== CONT  TestAccDavinciConnectorDataSource_ByIDFull_WithBootstrap
=== CONT  TestAccDavinciApplicationDataSource_NotFound_Clean
=== CONT  TestAccDavinciConnectorInstancesDataSource_Get_WithBootstrap
=== CONT  TestAccDavinciApplicationDataSource_NotFound_WithBootstrap
=== CONT  TestAccDavinciConnectorInstancesDataSource_Get_Clean
=== CONT  TestAccDavinciConnectorInstanceDataSource_NotFound_WithBootstrap
=== CONT  TestAccDavinciConnectorInstanceDataSource_BootstrapConnectionByID_Clean
=== CONT  TestAccDavinciApplicationsDataSource_Get_WithBootstrap
=== CONT  TestAccDavinciConnectorDataSource_ByIDFull_Clean
=== CONT  TestAccDavinciConnectorInstanceDataSource_BootstrapConnectionByID_WithBootstrap
=== CONT  TestAccDavinciConnectorDataSource_NotFound
=== CONT  TestAccDavinciConnectorsDataSource_Get_Clean
=== CONT  TestAccDavinciConnectorsDataSource_Get_WithBootstrap
--- PASS: TestAccDavinciApplicationDataSource_NotFound_WithBootstrap (5.30s)
=== CONT  TestAccDavinciConnectorInstanceDataSource_ByIDFull_WithBootstrap
--- PASS: TestAccDavinciConnectorInstanceDataSource_BootstrapConnectionByID_Clean (5.56s)
=== CONT  TestAccDavinciApplicationDataSource_BootstrapApplicationByIDFull
--- PASS: TestAccDavinciApplicationDataSource_NotFound_Clean (6.00s)
=== CONT  TestAccDavinciConnectorInstanceDataSource_NotFound_Clean
--- PASS: TestAccDavinciConnectorInstanceDataSource_NotFound_WithBootstrap (7.39s)
=== CONT  TestAccDavinciApplicationDataSource_ByIDFull_WithBootstrap
--- PASS: TestAccDavinciConnectorDataSource_NotFound (9.78s)
--- PASS: TestAccDavinciConnectorInstanceDataSource_BootstrapConnectionByID_WithBootstrap (13.34s)
--- PASS: TestAccDavinciConnectorDataSource_ByIDFull_WithBootstrap (13.53s)
--- PASS: TestAccDavinciConnectorInstanceDataSource_NotFound_Clean (7.73s)
--- PASS: TestAccDavinciConnectorInstancesDataSource_Get_WithBootstrap (14.95s)
--- PASS: TestAccDavinciApplicationDataSource_ByIDFull_Clean (15.06s)
--- PASS: TestAccDavinciConnectorDataSource_ByIDFull_Clean (15.52s)
--- PASS: TestAccDavinciConnectorInstanceDataSource_ByIDFull_Clean (15.82s)
--- PASS: TestAccDavinciApplicationsDataSource_Get_WithBootstrap (16.77s)
--- PASS: TestAccDavinciApplicationDataSource_BootstrapApplicationByIDFull (11.41s)
--- PASS: TestAccDavinciApplicationsDataSource_Get_Clean (17.17s)
--- PASS: TestAccDavinciConnectorInstancesDataSource_Get_Clean (17.40s)
--- PASS: TestAccDavinciApplicationDataSource_ByIDFull_WithBootstrap (10.27s)
--- PASS: TestAccDavinciConnectorInstanceDataSource_ByIDFull_WithBootstrap (14.52s)
--- PASS: TestAccDavinciConnectorsDataSource_Get_WithBootstrap (24.52s)
--- PASS: TestAccDavinciConnectorsDataSource_Get_Clean (25.64s)
PASS
ok  	github.com/pingidentity/terraform-provider-pingone/internal/service/davinci	26.433s

End-to-end Tests Workflow Links

@henryrecker-pingidentity henryrecker-pingidentity requested a review from a team as a code owner December 1, 2025 22:01
Copy link
Collaborator

@patrickcping patrickcping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor things to review, but once done LGTM 🚀 🚀

github.com/patrickcping/pingone-go-sdk-v2/risk v0.21.0
github.com/patrickcping/pingone-go-sdk-v2/verify v0.10.0
github.com/pingidentity/pingone-go-client v0.2.0
github.com/pingidentity/pingone-go-client v0.3.1-0.20251117224159-0cf427981cb9
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

},
"GetDavinciApplicationById",
framework.DefaultCustomError,
framework.DefaultRetryable,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DefaultCreateReadRetryable

},
Computed: true,
},
"environment_id": schema.StringAttribute{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

stringvalidator.RegexMatches(regexp.MustCompile("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), "Must be a valid UUID"),
},
},
"id": schema.StringAttribute{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

},
"GetConnectorInstances",
framework.DefaultCustomError,
framework.DefaultRetryable,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DefaultCreateReadRetryable

},
Computed: true,
},
"environment_id": schema.StringAttribute{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have framework.Attr_LinkID for consistency

stringvalidator.RegexMatches(regexp.MustCompile("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"), "Must be a valid UUID"),
},
},
"id": schema.StringAttribute{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have framework.Attr_ID for consistency

},
"GetConnectors",
framework.DefaultCustomError,
framework.DefaultRetryable,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DefaultCreateReadRetryable


func() (any, *http.Response, error) {
fO, fR, fErr := r.Client.DaVinciConnectorsApi.GetConnectors(ctx, environmentIdUuid).Execute()
return framework.CheckEnvironmentExistsOnPermissionsError(ctx, r.Client, data.EnvironmentId.ValueString(), fO, fR, fErr)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't pointed it out on any other reviews so far, but it occurs to me that the new SDK should now be fulfilling the role of framework.CheckEnvironmentExistsOnPermissionsError. Anything that exists on the new SDK could have this check removed (although it does not hurt to have it remain)

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.

3 participants