Skip to content

Conversation

@henryrecker-pingidentity
Copy link
Contributor

@henryrecker-pingidentity henryrecker-pingidentity commented Dec 1, 2025

Change Description

  • Adds a new beta pingone_davinci_application_flow_policy resource. Currently targeted at the DavinciApplicationResource branch for a cleaner diff.
  • Moves some custom default code for pingone_davinci_application into a separate file

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)

Tests rely on changes in later flow branch. I'll attach test results from testing on that branch.

Testing Results

Expand Results

End-to-end Tests Workflow Links

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 comments, then good to merge once all the TODO markers are rounded out

stringplanmodifier.RequiresReplace(),
},
},
"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

resp.Schema = schema.Schema{
Description: "Resource to create and manage a DaVinci application flow policy.",
Attributes: map[string]schema.Attribute{
"da_vinci_application_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.

If this is a DaVinci ID, we have a custom type that makes these consistent

"flow_distributions": schema.SetNestedAttribute{
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"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.

This is a foreign key of the flow resource, it probably would benefit from the DaVinci ID custom type

setvalidator.SizeBetween(1, 100),
},
},
"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 the framework.Attr_ID for consistency

version = 1
weight = 100
}
#TODO add a second flow
Copy link
Collaborator

Choose a reason for hiding this comment

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

++

name = "Updated policy"
status = "disabled"
#TODO test trigger with a pingone flow
// trigger = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

++

}

// Maximal HCL with all values set, with ordering changes in lists and sets from the default CompleteHCL
// TODO update when the pingone_davinci_flow resource is available, reorder the updated CompleteHCL to form this
Copy link
Collaborator

Choose a reason for hiding this comment

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

++

da_vinci_application_id = pingone_davinci_application.%[3]s.id
flow_distributions = [
{
#TODO use flow resource to create this, rather than using a hardcoded id
Copy link
Collaborator

Choose a reason for hiding this comment

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

++

}

// Validate any computed values when applying complete HCL
// TODO This may not be needed as a separate function from minimal HCL if the expected values match
Copy link
Collaborator

Choose a reason for hiding this comment

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

++

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