Skip to content
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2de5c2a
Untouched generated flow policy resource
henryrecker-pingidentity Jul 30, 2025
b854e8a
Basic compilation fixes for spec problems
henryrecker-pingidentity Jul 30, 2025
8ec5da1
Schema defaults updates
henryrecker-pingidentity Jul 30, 2025
0bc1ec7
Don't default success_nodes to emtpy set on read
henryrecker-pingidentity Jul 30, 2025
4d54da3
Use nil check instead of 0 check
henryrecker-pingidentity Jul 30, 2025
c190a64
Basic test coverage
henryrecker-pingidentity Jul 30, 2025
4f6f124
Fix import id handling
henryrecker-pingidentity Jul 30, 2025
83ac4a9
Test comment to clarify
henryrecker-pingidentity Jul 31, 2025
fb9dcf9
Handle imports in connector instance read logic
henryrecker-pingidentity Jul 31, 2025
ab421bd
Add example and generate doc
henryrecker-pingidentity Aug 11, 2025
b546943
Create davinci bootstrapped test env
henryrecker-pingidentity Aug 11, 2025
eab0183
Add bootstrap tests
henryrecker-pingidentity Aug 11, 2025
dd2f620
Adjust read logic for flow distribution id
henryrecker-pingidentity Aug 14, 2025
32df34e
Move some custom-written logic to separate file
henryrecker-pingidentity Aug 14, 2025
d9d6dde
Cleanup schema and linter error
henryrecker-pingidentity Aug 15, 2025
06be21c
Merge branch 'DavinciApplicationResource' into DavinciApplicationFlow…
henryrecker-pingidentity Sep 4, 2025
f524a74
Fix defaults for DV application
henryrecker-pingidentity Sep 4, 2025
082429f
Merge branch 'DavinciApplicationResource' into DavinciApplicationFlow…
henryrecker-pingidentity Dec 1, 2025
2df505b
Mark app flow policy resource as beta
henryrecker-pingidentity Dec 1, 2025
88899b4
Merge fixes and new prechecks
henryrecker-pingidentity Dec 1, 2025
0dba1bf
Fix bool default in dv application resource
henryrecker-pingidentity Dec 1, 2025
f9f0c91
Remove NewEnv test
henryrecker-pingidentity Dec 16, 2025
ff64a3d
Consistent id attr name
henryrecker-pingidentity Dec 16, 2025
c58fb98
Fix terrafmt error
henryrecker-pingidentity Dec 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions betatemplates/resources/davinci_application_flow_policy.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
page_title: "{{.Name}} {{.Type}} - {{.RenderedProviderName}}"
subcategory: "DaVinci"
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

# {{.Name}} ({{.Type}})

{{ .Description | trimspace }}

{{ if .HasExample -}}
## Example Usage

{{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
{{- end }}

{{ .SchemaMarkdown | trimspace }}

{{ if .HasImport -}}
## Import

Import is supported using the following syntax, where attributes in `<>` brackets are replaced with the relevant ID. For example, `<environment_id>` should be replaced with the ID of the environment to import from.

{{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import pingone_davinci_application_flow_policy.example <environment_id>/<application_id>/<flow_policy_id>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
resource "pingone_davinci_application" "my_awesome_registration_flow_application" {
environment_id = var.pingone_environment_id

name = "My Awesome Registration Application"

oauth {
grant_types = ["authorizationCode"]
scopes = ["openid", "profile"]
enforce_signed_request_openid = false
redirect_uris = ["https://auth.pingone.com/0000-0000-000/rp/callback/openid_connect"]
}
}

resource "pingone_davinci_application_flow_policy" "my_awesome_registration_flow_application_policy" {
environment_id = var.pingone_environment_id
application_id = pingone_davinci_application.my_awesome_registration_flow_application.id

name = "PingOne - Registration"
status = "enabled"

flow_distributions = [
{
id = pingone_davinci_flow.registration.id
version = -1
weight = 100
}
]
}
38 changes: 38 additions & 0 deletions internal/service/davinci/resource_davinci_application.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"net/http"

"github.com/google/uuid"
"github.com/hashicorp/terraform-plugin-framework/attr"
"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/resource"
Expand All @@ -18,6 +19,43 @@ import (
"github.com/pingidentity/terraform-provider-pingone/internal/framework"
)

var (
davinciApplicationApiKeyDefault = types.ObjectValueMust(map[string]attr.Type{
"enabled": types.BoolType,
"value": types.StringType,
}, map[string]attr.Value{
"enabled": types.BoolValue(true),
"value": types.StringUnknown(),
})
davinciApplicationOauthGrantTypesDefault = types.SetValueMust(types.StringType, []attr.Value{
types.StringValue("authorizationCode"),
})
davinciApplicationOauthScopesDefault = types.SetValueMust(types.StringType, []attr.Value{
types.StringValue("openid"),
types.StringValue("profile"),
})
emptySetDefault = types.SetValueMust(types.StringType, nil)
davinciApplicationOauthDefault = types.ObjectValueMust(map[string]attr.Type{
"client_secret": types.StringType,
"enforce_signed_request_openid": types.BoolType,
"grant_types": types.SetType{ElemType: types.StringType},
"logout_uris": types.SetType{ElemType: types.StringType},
"redirect_uris": types.SetType{ElemType: types.StringType},
"scopes": types.SetType{ElemType: types.StringType},
"sp_jwks_openid": types.StringType,
"sp_jwks_url": types.StringType,
}, map[string]attr.Value{
"client_secret": types.StringUnknown(),
"enforce_signed_request_openid": types.BoolValue(false),
"grant_types": davinciApplicationOauthGrantTypesDefault,
"logout_uris": emptySetDefault,
"redirect_uris": emptySetDefault,
"scopes": davinciApplicationOauthScopesDefault,
"sp_jwks_openid": types.StringNull(),
"sp_jwks_url": types.StringNull(),
})
)

// Build the PUT client struct to be used after initial creation
func (model *davinciApplicationResourceModel) buildClientStructPutAfterCreate(createResponse *pingone.DaVinciApplicationResponse) (*pingone.DaVinciApplicationReplaceRequest, diag.Diagnostics) {
result := &pingone.DaVinciApplicationReplaceRequest{}
Expand Down
Loading