-
Notifications
You must be signed in to change notification settings - Fork 7
pingone_davinci_application_flow_policy beta resource #1172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: DavinciApplicationResource
Are you sure you want to change the base?
pingone_davinci_application_flow_policy beta resource #1172
Conversation
To be expanded when flow resource is available
patrickcping
left a comment
There was a problem hiding this 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
internal/service/davinci/resource_davinci_application_flow_policy_gen.go
Outdated
Show resolved
Hide resolved
| stringplanmodifier.RequiresReplace(), | ||
| }, | ||
| }, | ||
| "environment_id": schema.StringAttribute{ |
There was a problem hiding this comment.
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{ |
There was a problem hiding this comment.
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{ |
There was a problem hiding this comment.
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{ |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 = { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
Change Description
pingone_davinci_application_flow_policyresource. Currently targeted at theDavinciApplicationResourcebranch for a cleaner diff.pingone_davinci_applicationinto a separate fileChange Characteristics
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
Required SDK Upgrades
Testing
This PR has been tested with:
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