diff --git a/betatemplates/resources/davinci_flow.md.tmpl b/betatemplates/resources/davinci_flow.md.tmpl new file mode 100644 index 000000000..bc3a0e48c --- /dev/null +++ b/betatemplates/resources/davinci_flow.md.tmpl @@ -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, `` should be replaced with the ID of the environment to import from. + +{{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }} +{{- end }} \ No newline at end of file diff --git a/examples/resources/pingone_davinci_flow/import.sh b/examples/resources/pingone_davinci_flow/import.sh new file mode 100644 index 000000000..387feb70f --- /dev/null +++ b/examples/resources/pingone_davinci_flow/import.sh @@ -0,0 +1 @@ +terraform import pingone_davinci_flow.example / \ No newline at end of file diff --git a/examples/resources/pingone_davinci_flow/resource.tf b/examples/resources/pingone_davinci_flow/resource.tf new file mode 100644 index 000000000..6361bfca6 --- /dev/null +++ b/examples/resources/pingone_davinci_flow/resource.tf @@ -0,0 +1,76 @@ +resource "pingone_davinci_connector_instance" "example-errors" { + environment_id = var.environment_id + connector = { + id = "errorConnector" + } + name = "example-errors" +} + +resource "pingone_davinci_flow" "example" { + environment_id = var.environment_id + description = "A simple flow that shows an error message" + name = "simple" + settings = { + csp = "worker-src 'self' blob:; script-src 'self' https://cdn.jsdelivr.net https://code.jquery.com https://devsdk.singularkey.com http://cdnjs.cloudflare.com 'unsafe-inline' 'unsafe-eval';" + intermediate_loading_screen_css = "" + intermediate_loading_screen_html = "" + flow_http_timeout_in_seconds = 300 + log_level = 1 + use_custom_css = true + } + color = "#FFC8C1" + graph_data = { + elements = { + nodes = [ + { + data = { + id = "2pzouq7el7" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.example-errors.id + connector_id = "errorConnector" + label = "Error Message" + status = "configured" + capability_name = "customErrorMessage" + type = "action" + properties = jsonencode({ + "error_message" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"This is an error\"\n }\n ]\n }\n]" + }, + "error_description" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"This is an error, really\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 400 + y = 400 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + } + ] + } + + zooming_enabled = true + user_zooming_enabled = true + zoom = 1 + min_zoom = 1e-50 + max_zoom = 1e+50 + panning_enabled = true + user_panning_enabled = true + pan = { + x = 0 + y = 0 + } + box_selection_enabled = true + renderer = jsonencode({ + "name" : "null" + }) + } +} diff --git a/examples/resources/pingone_davinci_variable/resource-dynamic-value.tf b/examples/resources/pingone_davinci_variable/resource-dynamic-value.tf index 6fde03343..6da3a7303 100644 --- a/examples/resources/pingone_davinci_variable/resource-dynamic-value.tf +++ b/examples/resources/pingone_davinci_variable/resource-dynamic-value.tf @@ -1,11 +1,10 @@ -#TODO update with real flow resource resource "pingone_davinci_flow" "my_awesome_main_flow" { environment_id = var.environment_id + name = "My Awesome Main Flow" - name = "My Awesome Main Flow" - flow_json = file("./path/to/example-mainflow.json") - - # ... subflow_link and connection_link arguments + graph_data = { + // edges, nodes, etc. + } } resource "pingone_davinci_variable" "my_awesome_usercontext_variable" { diff --git a/examples/resources/pingone_davinci_variable/resource-static-value.tf b/examples/resources/pingone_davinci_variable/resource-static-value.tf index 921049c93..e473472cb 100644 --- a/examples/resources/pingone_davinci_variable/resource-static-value.tf +++ b/examples/resources/pingone_davinci_variable/resource-static-value.tf @@ -1,11 +1,10 @@ -#TODO use real flow resource resource "pingone_davinci_flow" "my_awesome_main_flow" { environment_id = var.environment_id + name = "My Awesome Main Flow" - name = "My Awesome Main Flow" - flow_json = file("./path/to/example-mainflow.json") - - # ... subflow_link and connection_link arguments + graph_data = { + // edges, nodes, etc. + } } resource "pingone_davinci_variable" "my_awesome_usercontext_variable" { diff --git a/examples/resources/pingone_davinci_variable/resource.tf b/examples/resources/pingone_davinci_variable/resource.tf index a007364b3..f4cdb2855 100644 --- a/examples/resources/pingone_davinci_variable/resource.tf +++ b/examples/resources/pingone_davinci_variable/resource.tf @@ -13,18 +13,17 @@ resource "pingone_davinci_variable" "my_awesome_region_variable" { } } -#TODO update for real flow resource resource "pingone_davinci_flow" "my_awesome_main_flow" { depends_on = [ pingone_davinci_variable.my_awesome_region_variable, ] environment_id = var.environment_id + name = "My Awesome Main Flow" - name = "My Awesome Main Flow" - flow_json = file("./path/to/example-mainflow.json") - - # ... subflow_link and connection_link arguments + graph_data = { + // edges, nodes, etc. + } } resource "pingone_davinci_variable" "my_awesome_usercontext_variable" { diff --git a/go.mod b/go.mod index ab707e9ac..b8ce76f80 100644 --- a/go.mod +++ b/go.mod @@ -32,7 +32,7 @@ require ( github.com/patrickcping/pingone-go-sdk-v2/mfa v0.23.2 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.3.1-0.20251117224159-0cf427981cb9 + github.com/pingidentity/pingone-go-client v0.3.2-0.20251201224222-0310cc8fc128 ) require ( @@ -390,7 +390,7 @@ require ( golang.org/x/crypto v0.42.0 // indirect golang.org/x/mod v0.27.0 // indirect golang.org/x/net v0.43.0 // indirect - golang.org/x/oauth2 v0.32.0 // indirect + golang.org/x/oauth2 v0.33.0 // indirect golang.org/x/sys v0.36.0 // indirect golang.org/x/text v0.29.0 // indirect google.golang.org/appengine v1.6.8 // indirect diff --git a/go.sum b/go.sum index d362a4eda..5c5e441b0 100644 --- a/go.sum +++ b/go.sum @@ -1496,8 +1496,8 @@ github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2 github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pingidentity/pingone-go-client v0.3.1-0.20251117224159-0cf427981cb9 h1:tjRKI8gRimaLZrUzXTyuKMqcqbJpzenG/+51B4QUc6Y= -github.com/pingidentity/pingone-go-client v0.3.1-0.20251117224159-0cf427981cb9/go.mod h1:cI4exDxqhSAEzazgVmiY7T0HZC4XF/lgTMy2hKjs5no= +github.com/pingidentity/pingone-go-client v0.3.2-0.20251201224222-0310cc8fc128 h1:M+lInytttL22soVCcujPspARzjuLWrQMF4PajX5Gi/k= +github.com/pingidentity/pingone-go-client v0.3.2-0.20251201224222-0310cc8fc128/go.mod h1:UAraIiLEymjK8AzR68+VchJ3AZf2legV3O8VKf5GsE8= github.com/pjbgf/sha1cd v0.3.2 h1:a9wb0bp1oC2TGwStyn0Umc/IGKQnEgF0vVaZ8QF8eo4= github.com/pjbgf/sha1cd v0.3.2/go.mod h1:zQWigSxVmsHEZow5qaLtPYxpcKMMQpa09ixqBxuCS6A= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= @@ -2002,8 +2002,8 @@ golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= -golang.org/x/oauth2 v0.32.0 h1:jsCblLleRMDrxMN29H3z/k1KliIvpLgCkE6R8FXXNgY= -golang.org/x/oauth2 v0.32.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/oauth2 v0.33.0 h1:4Q+qn+E5z8gPRJfmRy7C2gGG3T4jIprK6aSYgTXGRpo= +golang.org/x/oauth2 v0.33.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/internal/acctest/testhcl/pingone_davinci_flow/full_basic.tf b/internal/acctest/testhcl/pingone_davinci_flow/full_basic.tf new file mode 100644 index 000000000..09e388f19 --- /dev/null +++ b/internal/acctest/testhcl/pingone_davinci_flow/full_basic.tf @@ -0,0 +1,925 @@ + %[1]s + +resource "pingone_davinci_connector_instance" "%[2]s-http" { + environment_id = data.pingone_environment.general_test.id + connector = { + id = "httpConnector" + } + name = "%[2]s-http" +} + +resource "pingone_davinci_connector_instance" "%[2]s-functions" { + environment_id = data.pingone_environment.general_test.id + connector = { + id = "functionsConnector" + } + name = "%[2]s-functions" +} + +resource "pingone_davinci_connector_instance" "%[2]s-errors" { + environment_id = data.pingone_environment.general_test.id + connector = { + id = "errorConnector" + } + name = "%[2]s-errors" +} + +resource "pingone_davinci_connector_instance" "%[2]s-flow" { + environment_id = data.pingone_environment.general_test.id + connector = { + id = "flowConnector" + } + name = "%[2]s-flow" +} + +resource "pingone_davinci_connector_instance" "%[2]s-variables" { + environment_id = data.pingone_environment.general_test.id + connector = { + id = "variablesConnector" + } + name = "%[2]s-variables" +} + +resource "pingone_davinci_flow" "%[2]s-subflow1" { + environment_id = data.pingone_environment.general_test.id + name = "subflow 1" + description = "subflow 1 desc" + color = "#AFD5FF" + + graph_data = { + elements = { + nodes = [ + { + data = { + id = "9awrr4q360" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-http.id + connector_id = "httpConnector" + name = "Http" + label = "Http" + status = "configured" + capability_name = "customHtmlMessage" + type = "trigger" + properties = jsonencode({ + "message": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"Subflow 1\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 277 + y = 236 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "rbi38g672i" + node_type = "EVAL" + label = "Evaluator" + + } + position = { + x = 394 + y = 237.25 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "exljnczoqz" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-http.id + connector_id = "httpConnector" + name = "Http" + label = "HTTP" + status = "configured" + capability_name = "createSuccessResponse" + type = "action" + + } + position = { + x = 511 + y = 238.5 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + } + ] + edges = [ + { + data = { + id = "jv7enynltp" + source = "9awrr4q360" + target = "rbi38g672i" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "bn6hy8ycra" + source = "rbi38g672i" + target = "exljnczoqz" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + } + ] + } + + zooming_enabled = true + user_zooming_enabled = true + zoom = 1 + min_zoom = 1e-50 + max_zoom = 1e+50 + panning_enabled = true + user_panning_enabled = true + pan = { + x = 0 + y = 0 + } + box_selection_enabled = true + renderer = jsonencode({ + "name": "null" + }) + } +} + + +resource "pingone_davinci_flow" "%[2]s-subflow2" { + environment_id = data.pingone_environment.general_test.id + name = "subflow 2" + description = "Cloned on Wed Jan 31 2024 13:43:43 GMT+0000 (Coordinated Universal Time). \n" + color = "#AFD5FF" + + graph_data = { + elements = { + nodes = [ + { + data = { + id = "9awrr4q360" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-http.id + connector_id = "httpConnector" + name = "Http" + label = "Http" + status = "configured" + capability_name = "customHtmlMessage" + type = "trigger" + properties = jsonencode({ + "message": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"Subflow 2\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 277 + y = 236 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "rbi38g672i" + node_type = "EVAL" + label = "Evaluator" + + } + position = { + x = 394 + y = 237.25 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "exljnczoqz" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-http.id + connector_id = "httpConnector" + name = "Http" + label = "HTTP" + status = "configured" + capability_name = "createSuccessResponse" + type = "action" + + } + position = { + x = 511 + y = 238.5 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + } + ] + edges = [ + { + data = { + id = "jv7enynltp" + source = "9awrr4q360" + target = "rbi38g672i" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "bn6hy8ycra" + source = "rbi38g672i" + target = "exljnczoqz" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + } + ] + } + + zooming_enabled = true + user_zooming_enabled = true + zoom = 1 + min_zoom = 1e-50 + max_zoom = 1e+50 + panning_enabled = true + user_panning_enabled = true + pan = { + x = 0 + y = 0 + } + box_selection_enabled = true + renderer = jsonencode({ + "name": "null" + }) + } + + trigger = { + type = "AUTHENTICATION" + configuration = { + mfa = { + enabled = true + time = 5 + time_format = "hour" + } + pwd = { + enabled = false + time = 3 + time_format = "day" + } + } + } +} + +resource "pingone_davinci_flow" "%[2]s" { + environment_id = data.pingone_environment.general_test.id + name = "full-basic" + color = "#E3F0FF" + + graph_data = { + elements = { + nodes = [ + { + data = { + id = "1u2m5vzr49" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-http.id + connector_id = "httpConnector" + name = "%[2]s-http" + label = "Http" + status = "configured" + capability_name = "customHtmlMessage" + type = "trigger" + properties = jsonencode({ + "message": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"Hello, world?\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 277 + y = 336 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "8fvg7tfr8j" + node_type = "EVAL" + label = "Evaluator" + } + position = { + x = 426.5 + y = 337.25 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "nx0o1b2cmw" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-functions.id + connector_id = "functionsConnector" + name = "%[2]s-functions" + label = "Functions" + status = "configured" + capability_name = "AEqualsB" + type = "trigger" + properties = jsonencode({ + "leftValueA": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"1\"\n }\n ]\n }\n]" + }, + "rightValueB": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"1\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 576 + y = 338.5 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "cdcw8k7dnx" + node_type = "EVAL" + label = "Evaluator" + properties = jsonencode({ + "vsp1ewtr9m": { + "value": "allTriggersFalse" + }, + "xb74p6rkd8": { + "value": "anyTriggersFalse" + } + }) + } + position = { + x = 717 + y = 326 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "ikt13crnhy" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-http.id + connector_id = "httpConnector" + name = "%[2]s-http" + label = "Http" + status = "configured" + capability_name = "createSuccessResponse" + type = "action" + + } + position = { + x = 1197 + y = 266 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "vsp1ewtr9m" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-errors.id + connector_id = "errorConnector" + label = "Error Message" + status = "configured" + capability_name = "customErrorMessage" + type = "action" + properties = jsonencode({ + "errorMessage": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"Error\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 1197 + y = 416 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "xb74p6rkd8" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-flow.id + connector_id = "flowConnector" + name = "%[2]s-flow" + label = "Flow Conductor" + status = "configured" + capability_name = "startUiSubFlow" + type = "trigger" + properties = jsonencode({ + "subFlowId": { + "value": { + "label": "subflow 2", + "value": "${pingone_davinci_flow.%[2]s-subflow2.id}" + } + }, + "subFlowVersionId": { + "value": -1 + } + }) + } + position = { + x = 867 + y = 446 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "kq5ybvwvro" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-flow.id + connector_id = "flowConnector" + name = "%[2]s-flow" + label = "Flow Conductor" + status = "configured" + capability_name = "startUiSubFlow" + type = "trigger" + properties = jsonencode({ + "subFlowId": { + "value": { + "label": "subflow 1", + "value": "${pingone_davinci_flow.%[2]s-subflow1.id}" + } + }, + "subFlowVersionId": { + "value": -1 + } + }) + } + position = { + x = 867 + y = 236 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "j74pmg6577" + node_type = "EVAL" + } + position = { + x = 1017 + y = 236 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "pensvkew7y" + node_type = "EVAL" + } + position = { + x = 1032 + y = 431 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "3zvjdgdljx" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-variables.id + connector_id = "variablesConnector" + name = "%[2]s-variables" + label = "Variables" + status = "configured" + capability_name = "saveFlowValue" + type = "trigger" + properties = jsonencode({ + "saveFlowVariables": { + "value": [ + { + "name": "fdgdfgfdg", + "value": "[\n {\n \"children\": [\n {\n \"text\": \"test124\"\n }\n ]\n }\n]", + "key": 0.8936786494474329, + "label": "fdgdfgfdg (string - flow)", + "type": "string" + }, + { + "name": "test123", + "value": "[\n {\n \"children\": [\n {\n \"text\": \"test456\"\n }\n ]\n }\n]", + "key": 0.379286774724122, + "label": "test123 (number - flow)", + "type": "number" + } + ] + } + }) + } + position = { + x = 270 + y = 180 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "bbemfztdyk" + node_type = "EVAL" + } + position = { + x = 273.5 + y = 258 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + } + ] + edges = [ + { + data = { + id = "hseww5vtf0" + source = "1u2m5vzr49" + target = "8fvg7tfr8j" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "ljavni2nky" + source = "8fvg7tfr8j" + target = "nx0o1b2cmw" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "0o2fqy3mf3" + source = "nx0o1b2cmw" + target = "cdcw8k7dnx" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "493yd0jbi6" + source = "cdcw8k7dnx" + target = "kq5ybvwvro" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "pn2kixnzms" + source = "j74pmg6577" + target = "ikt13crnhy" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "0sb4quzlgx" + source = "kq5ybvwvro" + target = "j74pmg6577" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "v5p4i55lt9" + source = "cdcw8k7dnx" + target = "xb74p6rkd8" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "k0trrhjqt6" + source = "xb74p6rkd8" + target = "pensvkew7y" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "2g0chago4l" + source = "pensvkew7y" + target = "vsp1ewtr9m" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "gs1fx4x303" + source = "3zvjdgdljx" + target = "bbemfztdyk" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "cum544luro" + source = "bbemfztdyk" + target = "1u2m5vzr49" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + } + ] + } + + zooming_enabled = true + user_zooming_enabled = true + zoom = 1 + min_zoom = 1e-50 + max_zoom = 1e+50 + panning_enabled = true + user_panning_enabled = true + pan = { + x = 0 + y = 0 + } + box_selection_enabled = true + renderer = jsonencode({ + "name": "null" + }) + } +} diff --git a/internal/acctest/testhcl/pingone_davinci_flow/full_basic_modify_node_properties.tf b/internal/acctest/testhcl/pingone_davinci_flow/full_basic_modify_node_properties.tf new file mode 100644 index 000000000..a69202ea0 --- /dev/null +++ b/internal/acctest/testhcl/pingone_davinci_flow/full_basic_modify_node_properties.tf @@ -0,0 +1,904 @@ + %[1]s + +resource "pingone_davinci_connector_instance" "%[2]s-http" { + environment_id = data.pingone_environment.general_test.id + connector = { + id = "httpConnector" + } + name = "%[2]s-http" +} + +resource "pingone_davinci_connector_instance" "%[2]s-functions" { + environment_id = data.pingone_environment.general_test.id + connector = { + id = "functionsConnector" + } + name = "%[2]s-functions" +} + +resource "pingone_davinci_connector_instance" "%[2]s-errors" { + environment_id = data.pingone_environment.general_test.id + connector = { + id = "errorConnector" + } + name = "%[2]s-errors" +} + +resource "pingone_davinci_connector_instance" "%[2]s-flow" { + environment_id = data.pingone_environment.general_test.id + connector = { + id = "flowConnector" + } + name = "%[2]s-flow" +} + +resource "pingone_davinci_connector_instance" "%[2]s-variables" { + environment_id = data.pingone_environment.general_test.id + connector = { + id = "variablesConnector" + } + name = "%[2]s-variables" +} + +resource "pingone_davinci_flow" "%[2]s-subflow1" { + environment_id = data.pingone_environment.general_test.id + name = "subflow 1" + description = "subflow 1 desc" + color = "#AFD5FF" + + graph_data = { + elements = { + nodes = [ + { + data = { + id = "9awrr4q360" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-http.id + connector_id = "httpConnector" + name = "Http" + label = "Http" + status = "configured" + capability_name = "customHtmlMessage" + type = "trigger" + properties = jsonencode({ + "message": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"Subflow 1\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 277 + y = 236 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "rbi38g672i" + node_type = "EVAL" + label = "Evaluator" + } + position = { + x = 394 + y = 237.25 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "exljnczoqz" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-http.id + connector_id = "httpConnector" + name = "Http" + label = "HTTP" + status = "configured" + capability_name = "createSuccessResponse" + type = "action" + } + position = { + x = 511 + y = 238.5 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + } + ] + edges = [ + { + data = { + id = "jv7enynltp" + source = "9awrr4q360" + target = "rbi38g672i" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "bn6hy8ycra" + source = "rbi38g672i" + target = "exljnczoqz" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + } + ] + } + + zooming_enabled = true + user_zooming_enabled = true + zoom = 1 + min_zoom = 1e-50 + max_zoom = 1e+50 + panning_enabled = true + user_panning_enabled = true + pan = { + x = 0 + y = 0 + } + box_selection_enabled = true + renderer = jsonencode({ + "name": "null" + }) + } +} + + +resource "pingone_davinci_flow" "%[2]s-subflow2" { + environment_id = data.pingone_environment.general_test.id + name = "subflow 2" + description = "Cloned on Wed Jan 31 2024 13:43:43 GMT+0000 (Coordinated Universal Time). \n" + color = "#AFD5FF" + + graph_data = { + elements = { + nodes = [ + { + data = { + id = "9awrr4q360" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-http.id + connector_id = "httpConnector" + name = "Http" + label = "Http" + status = "configured" + capability_name = "customHtmlMessage" + type = "trigger" + properties = jsonencode({ + "message": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"Subflow 2\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 277 + y = 236 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "rbi38g672i" + node_type = "EVAL" + label = "Evaluator" + } + position = { + x = 394 + y = 237.25 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "exljnczoqz" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-http.id + connector_id = "httpConnector" + name = "Http" + label = "HTTP" + status = "configured" + capability_name = "createSuccessResponse" + type = "action" + } + position = { + x = 511 + y = 238.5 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + } + ] + edges = [ + { + data = { + id = "jv7enynltp" + source = "9awrr4q360" + target = "rbi38g672i" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "bn6hy8ycra" + source = "rbi38g672i" + target = "exljnczoqz" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + } + ] + } + + zooming_enabled = true + user_zooming_enabled = true + zoom = 1 + min_zoom = 1e-50 + max_zoom = 1e+50 + panning_enabled = true + user_panning_enabled = true + pan = { + x = 0 + y = 0 + } + box_selection_enabled = true + renderer = jsonencode({ + "name": "null" + }) + } +} + +resource "pingone_davinci_flow" "%[2]s" { + environment_id = data.pingone_environment.general_test.id + name = "full-basic" + color = "#E3F0FF" + + graph_data = { + elements = { + nodes = [ + { + data = { + id = "1u2m5vzr49" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-http.id + connector_id = "httpConnector" + name = "%[2]s-http" + label = "Http" + status = "configured" + capability_name = "customHtmlMessage" + type = "trigger" + properties = jsonencode({ + "message": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"Hello, world?\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 277 + y = 336 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "8fvg7tfr8j" + node_type = "EVAL" + label = "Evaluator" + } + position = { + x = 426.5 + y = 337.25 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "nx0o1b2cmw" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-functions.id + connector_id = "functionsConnector" + name = "%[2]s-functions" + label = "Functions" + status = "configured" + capability_name = "AEqualsB" + type = "trigger" + properties = jsonencode({ + "leftValueA": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"1\"\n }\n ]\n }\n]" + }, + "rightValueB": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"1\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 576 + y = 338.5 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "cdcw8k7dnx" + node_type = "EVAL" + label = "Evaluator" + properties = jsonencode({ + "vsp1ewtr9m": { + "value": "allTriggersFalse" + }, + "xb74p6rkd8": { + "value": "anyTriggersFalse" + } + }) + } + position = { + x = 717 + y = 326 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "ikt13crnhy" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-http.id + connector_id = "httpConnector" + name = "%[2]s-http" + label = "Http" + status = "configured" + capability_name = "createSuccessResponse" + type = "action" + } + position = { + x = 1197 + y = 266 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "vsp1ewtr9m" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-errors.id + connector_id = "errorConnector" + label = "Error Message" + status = "configured" + capability_name = "customErrorMessage" + type = "action" + properties = jsonencode({ + "errorMessage": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"Error\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 1197 + y = 416 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "xb74p6rkd8" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-flow.id + connector_id = "flowConnector" + name = "%[2]s-flow" + label = "Flow Conductor" + status = "configured" + capability_name = "startUiSubFlow" + type = "trigger" + properties = jsonencode({ + "subFlowId": { + "value": { + "label": "subflow 2", + "value": "${pingone_davinci_flow.%[2]s-subflow2.id}" + } + }, + "subFlowVersionId": { + "value": -1 + } + }) + } + position = { + x = 867 + y = 446 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "kq5ybvwvro" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-flow.id + connector_id = "flowConnector" + name = "%[2]s-flow" + label = "Flow Conductor" + status = "configured" + capability_name = "startUiSubFlow" + type = "trigger" + properties = jsonencode({ + "subFlowId": { + "value": { + "label": "subflow 1", + "value": "${pingone_davinci_flow.%[2]s-subflow1.id}" + } + }, + "subFlowVersionId": { + "value": -1 + } + }) + } + position = { + x = 867 + y = 236 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "j74pmg6577" + node_type = "EVAL" + } + position = { + x = 1017 + y = 236 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "pensvkew7y" + node_type = "EVAL" + } + position = { + x = 1032 + y = 431 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "3zvjdgdljx" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-variables.id + connector_id = "variablesConnector" + name = "%[2]s-variables" + label = "Variables" + status = "configured" + capability_name = "saveFlowValue" + type = "trigger" + properties = jsonencode({ + "saveFlowVariables": { + "value": [ + { + "name": "test123", + "value": "[\n {\n \"children\": [\n {\n \"text\": \"test456\"\n }\n ]\n }\n]", + "key": 0.379286774724122, + "label": "test123 (string - flow)", + "type": "string" + }, + { + "name": "test123NEW", + "value": "[\n {\n \"children\": [\n {\n \"text\": \"25\"\n }\n ]\n }\n]", + "key": 0.379286774724122, + "label": "test123NEW (number - flow)", + "type": "number" + } + ] + } + }) + } + position = { + x = 270 + y = 180 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "bbemfztdyk" + node_type = "EVAL" + } + position = { + x = 273.5 + y = 258 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + } + ] + edges = [ + { + data = { + id = "hseww5vtf0" + source = "1u2m5vzr49" + target = "8fvg7tfr8j" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "ljavni2nky" + source = "8fvg7tfr8j" + target = "nx0o1b2cmw" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "0o2fqy3mf3" + source = "nx0o1b2cmw" + target = "cdcw8k7dnx" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "493yd0jbi6" + source = "cdcw8k7dnx" + target = "kq5ybvwvro" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "pn2kixnzms" + source = "j74pmg6577" + target = "ikt13crnhy" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "0sb4quzlgx" + source = "kq5ybvwvro" + target = "j74pmg6577" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "v5p4i55lt9" + source = "cdcw8k7dnx" + target = "xb74p6rkd8" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "k0trrhjqt6" + source = "xb74p6rkd8" + target = "pensvkew7y" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "2g0chago4l" + source = "pensvkew7y" + target = "vsp1ewtr9m" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "gs1fx4x303" + source = "3zvjdgdljx" + target = "bbemfztdyk" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "cum544luro" + source = "bbemfztdyk" + target = "1u2m5vzr49" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + } + ] + } + + zooming_enabled = true + user_zooming_enabled = true + zoom = 1 + min_zoom = 1e-50 + max_zoom = 1e+50 + panning_enabled = true + user_panning_enabled = true + pan = { + x = 0 + y = 0 + } + box_selection_enabled = true + renderer = jsonencode({ + "name": "null" + }) + } +} diff --git a/internal/acctest/testhcl/pingone_davinci_flow/full_basic_with_variable_refs.tf b/internal/acctest/testhcl/pingone_davinci_flow/full_basic_with_variable_refs.tf new file mode 100644 index 000000000..2856028d3 --- /dev/null +++ b/internal/acctest/testhcl/pingone_davinci_flow/full_basic_with_variable_refs.tf @@ -0,0 +1,1164 @@ + %[1]s + +resource "pingone_davinci_connector_instance" "%[2]s-http" { + environment_id = data.pingone_environment.general_test.id + connector = { + id = "httpConnector" + } + name = "%[2]s-http" +} + +resource "pingone_davinci_connector_instance" "%[2]s-functions" { + environment_id = data.pingone_environment.general_test.id + connector = { + id = "functionsConnector" + } + name = "%[2]s-functions" +} + +resource "pingone_davinci_connector_instance" "%[2]s-errors" { + environment_id = data.pingone_environment.general_test.id + connector = { + id = "errorConnector" + } + name = "%[2]s-errors" +} + +resource "pingone_davinci_connector_instance" "%[2]s-flow" { + environment_id = data.pingone_environment.general_test.id + connector = { + id = "flowConnector" + } + name = "%[2]s-flow" +} + +resource "pingone_davinci_connector_instance" "%[2]s-variables" { + environment_id = data.pingone_environment.general_test.id + connector = { + id = "variablesConnector" + } + name = "%[2]s-variables" +} + +resource "pingone_davinci_variable" "%[2]s-variable1" { + environment_id = data.pingone_environment.general_test.id + name = "testVariable" + context = "company" + display_name = "Test Variable" + data_type = "string" + mutable = true +} + +resource "pingone_davinci_variable" "%[2]s-variable2" { + environment_id = data.pingone_environment.general_test.id + name = "testVariable2" + context = "company" + display_name = "Test Variable" + data_type = "string" + mutable = true +} + +resource "pingone_davinci_variable" "%[2]s-flowInstanceVariable1" { + environment_id = data.pingone_environment.general_test.id + name = "flowInstanceVariable1" + context = "flowInstance" + data_type = "string" + mutable = true +} + +resource "pingone_davinci_variable" "%[2]s-flowVariable" { + environment_id = data.pingone_environment.general_test.id + name = "testuser" + context = "flow" + flow = { + id = pingone_davinci_flow.%[2]s.id + } + data_type = "string" + mutable = true +} + +resource "pingone_davinci_flow" "%[2]s-subflow1" { + environment_id = data.pingone_environment.general_test.id + name = "subflow 1" + description = "subflow 1 desc" + color = "#AFD5FF" + + graph_data = { + elements = { + nodes = [ + { + data = { + id = "9awrr4q360" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-http.id + connector_id = "httpConnector" + name = "Http" + label = "Http" + status = "configured" + capability_name = "customHtmlMessage" + type = "trigger" + properties = jsonencode({ + "message": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"Subflow 1\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 277 + y = 236 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "rbi38g672i" + node_type = "EVAL" + label = "Evaluator" + + } + position = { + x = 394 + y = 237.25 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "exljnczoqz" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-http.id + connector_id = "httpConnector" + name = "Http" + label = "HTTP" + status = "configured" + capability_name = "createSuccessResponse" + type = "action" + + } + position = { + x = 511 + y = 238.5 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + } + ] + edges = [ + { + data = { + id = "jv7enynltp" + source = "9awrr4q360" + target = "rbi38g672i" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "bn6hy8ycra" + source = "rbi38g672i" + target = "exljnczoqz" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + } + ] + } + + zooming_enabled = true + user_zooming_enabled = true + zoom = 1 + min_zoom = 1e-50 + max_zoom = 1e+50 + panning_enabled = true + user_panning_enabled = true + pan = { + x = 0 + y = 0 + } + box_selection_enabled = true + renderer = jsonencode({ + "name": "null" + }) + } +} + + +resource "pingone_davinci_flow" "%[2]s-subflow2" { + environment_id = data.pingone_environment.general_test.id + name = "subflow 2" + description = "Cloned on Wed Jan 31 2024 13:43:43 GMT+0000 (Coordinated Universal Time). \n" + color = "#AFD5FF" + + graph_data = { + elements = { + nodes = [ + { + data = { + id = "9awrr4q360" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-http.id + connector_id = "httpConnector" + name = "Http" + label = "Http" + status = "configured" + capability_name = "customHtmlMessage" + type = "trigger" + properties = jsonencode({ + "message": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"Subflow 2\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 277 + y = 236 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "rbi38g672i" + node_type = "EVAL" + label = "Evaluator" + + } + position = { + x = 394 + y = 237.25 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "exljnczoqz" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-http.id + connector_id = "httpConnector" + name = "Http" + label = "HTTP" + status = "configured" + capability_name = "createSuccessResponse" + type = "action" + + } + position = { + x = 511 + y = 238.5 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + } + ] + edges = [ + { + data = { + id = "jv7enynltp" + source = "9awrr4q360" + target = "rbi38g672i" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "bn6hy8ycra" + source = "rbi38g672i" + target = "exljnczoqz" + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + } + ] + } + + zooming_enabled = true + user_zooming_enabled = true + zoom = 1 + min_zoom = 1e-50 + max_zoom = 1e+50 + panning_enabled = true + user_panning_enabled = true + pan = { + x = 0 + y = 0 + } + box_selection_enabled = true + renderer = jsonencode({ + "name": "null" + }) + } +} + +resource "pingone_davinci_flow" "%[2]s" { + environment_id = data.pingone_environment.general_test.id + name = "%[2]s" + description = "Imported on Fri Aug 16 2024 09:44:27 GMT+0000 (Coordinated Universal Time)" + color = "#E3F0FF" + + graph_data = { + elements = { + nodes = [ + { + data = { + id = "1u2m5vzr49" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-http.id + connector_id = "httpConnector" + name = "%[2]s-http" + label = "Http" + status = "configured" + capability_name = "customHtmlMessage" + type = "trigger" + properties = jsonencode({ + "message": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"Hello, world?\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"variable.svg\",\n \"url\": \"${pingone_davinci_variable.%[2]s-variable1.name}\",\n \"data\": \"{{global.company.variables.${pingone_davinci_variable.%[2]s-variable1.name}}}\",\n \"tooltip\": \"{{global.company.variables.${pingone_davinci_variable.%[2]s-variable1.name}}}\",\n \"children\": [\n {\n \"text\": \"${pingone_davinci_variable.%[2]s-variable1.name}\"\n }\n ]\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"variable.svg\",\n \"url\": \"${pingone_davinci_variable.%[2]s-variable2.name}\",\n \"data\": \"{{global.company.variables.${pingone_davinci_variable.%[2]s-variable2.name}}}\",\n \"tooltip\": \"{{global.company.variables.${pingone_davinci_variable.%[2]s-variable2.name}}}\",\n \"children\": [\n {\n \"text\": \"${pingone_davinci_variable.%[2]s-variable2.name}\"\n }\n ]\n }\n ]\n }\n]" + } + }) + } + position = { + x = 284 + y = 392 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "8fvg7tfr8j" + node_type = "EVAL" + label = "Evaluator" + + } + position = { + x = 433.5 + y = 393.25 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "nx0o1b2cmw" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-functions.id + connector_id = "functionsConnector" + name = "%[2]s-functions" + label = "Functions" + status = "configured" + capability_name = "AEqualsB" + type = "trigger" + properties = jsonencode({ + "leftValueA": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"1\"\n }\n ]\n }\n]" + }, + "rightValueB": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"1\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 583 + y = 394.5 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "cdcw8k7dnx" + node_type = "EVAL" + label = "Evaluator" + properties = jsonencode({ + "vsp1ewtr9m": { + "value": "allTriggersFalse" + }, + "xb74p6rkd8": { + "value": "anyTriggersFalse" + } + }) + } + position = { + x = 724 + y = 382 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "ikt13crnhy" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-http.id + connector_id = "httpConnector" + name = "%[2]s-http" + label = "Http" + status = "configured" + capability_name = "createSuccessResponse" + type = "action" + + } + position = { + x = 1204 + y = 322 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "vsp1ewtr9m" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-errors.id + connector_id = "errorConnector" + name = "%[2]s-error" + label = "Error Message" + status = "configured" + capability_name = "customErrorMessage" + type = "action" + properties = jsonencode({ + "errorMessage": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"Error\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 1204 + y = 472 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "xb74p6rkd8" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-flow.id + connector_id = "flowConnector" + name = "%[2]s-flow" + label = "Flow Conductor" + status = "configured" + capability_name = "startUiSubFlow" + type = "trigger" + properties = jsonencode({ + "subFlowId": { + "value": { + "label": "subflow 2", + "value": "${pingone_davinci_flow.%[2]s-subflow2.id}" + } + }, + "subFlowVersionId": { + "value": -1 + } + }) + } + position = { + x = 874 + y = 502 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "kq5ybvwvro" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-flow.id + connector_id = "flowConnector" + name = "%[2]s-flow" + label = "Flow Conductor" + status = "configured" + capability_name = "startUiSubFlow" + type = "trigger" + properties = jsonencode({ + "subFlowId": { + "value": { + "label": "subflow 1", + "value": "${pingone_davinci_flow.%[2]s-subflow1.id}" + } + }, + "subFlowVersionId": { + "value": -1 + } + }) + } + position = { + x = 874 + y = 292 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "j74pmg6577" + node_type = "EVAL" + + } + position = { + x = 1024 + y = 292 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "pensvkew7y" + node_type = "EVAL" + + } + position = { + x = 1039 + y = 487 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "3zvjdgdljx" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-variables.id + connector_id = "variablesConnector" + name = "%[2]s-variables" + label = "Variables" + status = "configured" + capability_name = "saveFlowValue" + type = "trigger" + properties = jsonencode({ + "saveFlowVariables": { + "value": [ + { + "name": "fdgdfgfdg", + "key": 0.8936786494474329, + "label": "fdgdfgfdg (string - flow)", + "type": "string", + "value": "fdgdfgfdgValue" + }, + { + "name": "fdgdfgfdgNEW", + "key": 0.8936786494474330, + "label": "fdgdfgfdgNEW (string - flow)", + "type": "string", + "value": "fdgdfgfdgNEWValue" + }, + { + "name": "test123", + "key": 0.379286774724122, + "label": "test123 (number - flow)", + "type": "number", + "value": 5 + } + ] + } + }) + } + position = { + x = 277 + y = 236 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "bbemfztdyk" + node_type = "EVAL" + + } + position = { + x = 280.5 + y = 314 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "0cj7n971ix" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-variables.id + connector_id = "variablesConnector" + name = "%[2]s-variables" + label = "%[2]s-variables" + status = "configured" + capability_name = "saveValue" + type = "trigger" + properties = jsonencode({ + "saveVariables": { + "value": [ + { + "name": "${pingone_davinci_variable.%[2]s-variable1.name}", + "key": 0.09068454768967449, + "label": "flowInstanceVariable1 (string - flowInstance)", + "type": "${pingone_davinci_variable.%[2]s-variable1.data_type}", + "value": "flowInstanceVariable1Value" + } + ] + } + }) + } + position = { + x = 270 + y = 120 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "esg7oyahen" + node_type = "EVAL" + + } + position = { + x = 273.5 + y = 178 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "j3j8fmgc9q" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-variables.id + connector_id = "variablesConnector" + name = "%[2]s-variables" + label = "%[2]s-variables" + status = "configured" + capability_name = "saveValueUserInfo" + type = "trigger" + properties = jsonencode({ + "saveVariables": { + "value": [ + { + "name": "testuser", + "key": 0.9814043007447408, + "label": "testuser (string - flow)", + "type": "string", + "value": "testuserValue" + } + ] + } + }) + } + position = { + x = 90 + y = 60 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "1uu35lv024" + node_type = "EVAL" + + } + position = { + x = 180 + y = 90 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + } + ] + edges = [ + { + data = { + id = "hseww5vtf0" + source = "1u2m5vzr49" + target = "8fvg7tfr8j" + + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "ljavni2nky" + source = "8fvg7tfr8j" + target = "nx0o1b2cmw" + + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "0o2fqy3mf3" + source = "nx0o1b2cmw" + target = "cdcw8k7dnx" + + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "493yd0jbi6" + source = "cdcw8k7dnx" + target = "kq5ybvwvro" + + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "pn2kixnzms" + source = "j74pmg6577" + target = "ikt13crnhy" + + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "0sb4quzlgx" + source = "kq5ybvwvro" + target = "j74pmg6577" + + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "v5p4i55lt9" + source = "cdcw8k7dnx" + target = "xb74p6rkd8" + + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "k0trrhjqt6" + source = "xb74p6rkd8" + target = "pensvkew7y" + + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "2g0chago4l" + source = "pensvkew7y" + target = "vsp1ewtr9m" + + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "gs1fx4x303" + source = "3zvjdgdljx" + target = "bbemfztdyk" + + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "cum544luro" + source = "bbemfztdyk" + target = "1u2m5vzr49" + + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "mz51tp7j0f" + source = "0cj7n971ix" + target = "esg7oyahen" + + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "as3c6w9yus" + source = "esg7oyahen" + target = "3zvjdgdljx" + + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "hdak1wwkml" + source = "j3j8fmgc9q" + target = "1uu35lv024" + + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + }, + { + data = { + id = "dv5jn5u6e7" + source = "1uu35lv024" + target = "0cj7n971ix" + + } + position = { + x = 0 + y = 0 + } + group = "edges" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = true + classes = "" + } + ] + } + + zooming_enabled = true + user_zooming_enabled = true + zoom = 1 + min_zoom = 1e-50 + max_zoom = 1e+50 + panning_enabled = true + user_panning_enabled = true + pan = { + x = 0 + y = 0 + } + box_selection_enabled = true + renderer = jsonencode({ + "name": "null" + }) + } +} diff --git a/internal/acctest/testhcl/pingone_davinci_flow/full_minimal.tf b/internal/acctest/testhcl/pingone_davinci_flow/full_minimal.tf new file mode 100644 index 000000000..2b00af1aa --- /dev/null +++ b/internal/acctest/testhcl/pingone_davinci_flow/full_minimal.tf @@ -0,0 +1,79 @@ + + %[1]s + +resource "pingone_davinci_connector_instance" "%[2]s-errors" { + environment_id = data.pingone_environment.general_test.id + connector = { + id = "errorConnector" + } + name = "%[2]s-errors" +} + +resource "pingone_davinci_flow" "%[2]s" { + environment_id = data.pingone_environment.general_test.id + %[3]s + name = "simple" + settings = { + csp = "worker-src 'self' blob:; script-src 'self' https://cdn.jsdelivr.net https://code.jquery.com https://devsdk.singularkey.com http://cdnjs.cloudflare.com 'unsafe-inline' 'unsafe-eval';" + intermediate_loading_screen_css = "" + intermediate_loading_screen_html = "" + flow_http_timeout_in_seconds = 300 + log_level = 1 + use_custom_css = true + } + color = "#FFC8C1" + graph_data = { + elements = { + nodes = [ + { + data = { + id = "2pzouq7el7" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-errors.id + connector_id = "errorConnector" + label = "Error Message" + status = "configured" + capability_name = "customErrorMessage" + type = "action" + properties = jsonencode({ + "error_message": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"This is an error\"\n }\n ]\n }\n]" + }, + "error_description": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"This is an error, really\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 400 + y = 400 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + } + ] + } + + zooming_enabled = true + user_zooming_enabled = true + zoom = 1 + min_zoom = 1e-50 + max_zoom = 1e+50 + panning_enabled = true + user_panning_enabled = true + pan = { + x = 0 + y = 0 + } + box_selection_enabled = true + renderer = jsonencode({ + "name": "null" + }) + } +} diff --git a/internal/acctest/testhcl/pingone_davinci_flow/full_minimal_added_node.tf b/internal/acctest/testhcl/pingone_davinci_flow/full_minimal_added_node.tf new file mode 100644 index 000000000..943aa969d --- /dev/null +++ b/internal/acctest/testhcl/pingone_davinci_flow/full_minimal_added_node.tf @@ -0,0 +1,111 @@ + + %[1]s + +resource "pingone_davinci_connector_instance" "%[2]s-errors" { + environment_id = data.pingone_environment.general_test.id + connector = { + id = "errorConnector" + } + name = "%[2]s-errors" +} + +resource "pingone_davinci_flow" "%[2]s" { + environment_id = data.pingone_environment.general_test.id + %[3]s + name = "simple" + settings = { + csp = "worker-src 'self' blob:; script-src 'self' https://cdn.jsdelivr.net https://code.jquery.com https://devsdk.singularkey.com http://cdnjs.cloudflare.com 'unsafe-inline' 'unsafe-eval';" + intermediate_loading_screen_css = "" + intermediate_loading_screen_html = "" + flow_http_timeout_in_seconds = 300 + log_level = 1 + use_custom_css = true + } + color = "#FFC8C1" + graph_data = { + elements = { + nodes = [ + { + data = { + id = "2pzouq7el7" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-errors.id + connector_id = "errorConnector" + label = "Error Message" + status = "configured" + capability_name = "customErrorMessage" + type = "action" + properties = jsonencode({ + "error_message": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"This is an error\"\n }\n ]\n }\n]" + }, + "error_description": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"This is an error, really\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 400 + y = 400 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "123456" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-errors.id + connector_id = "errorConnector" + label = "Error Message Two" + status = "configured" + capability_name = "customErrorMessage" + type = "action" + properties = jsonencode({ + "error_message": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"This is an updated error\"\n }\n ]\n }\n]" + }, + "error_description": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"This is an updated error, really\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 700 + y = 700 + } + group = "nodes" + removed = false + selected = true + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + } + ] + } + + zooming_enabled = true + user_zooming_enabled = true + zoom = 1 + min_zoom = 1e-50 + max_zoom = 1e+50 + panning_enabled = true + user_panning_enabled = true + pan = { + x = 0 + y = 0 + } + box_selection_enabled = true + renderer = jsonencode({ + "name": "null" + }) + } +} diff --git a/internal/acctest/testhcl/pingone_davinci_flow/full_minimal_complex_objects_in_settings.tf b/internal/acctest/testhcl/pingone_davinci_flow/full_minimal_complex_objects_in_settings.tf new file mode 100644 index 000000000..9b352b861 --- /dev/null +++ b/internal/acctest/testhcl/pingone_davinci_flow/full_minimal_complex_objects_in_settings.tf @@ -0,0 +1,107 @@ + + %[1]s + +resource "pingone_davinci_connector_instance" "%[2]s-errors" { + environment_id = data.pingone_environment.general_test.id + connector = { + id = "errorConnector" + } + name = "%[2]s-errors" +} + +resource "pingone_davinci_flow" "%[2]s" { + environment_id = data.pingone_environment.general_test.id + description = "empty objects in settings test" + name = "simple" + settings = { + csp = "worker-src 'self' blob:; script-src 'self' https://cdn.jsdelivr.net https://code.jquery.com https://devsdk.singularkey.com http://cdnjs.cloudflare.com 'unsafe-inline' 'unsafe-eval';" + intermediate_loading_screen_css = "" + intermediate_loading_screen_html = "" + flow_http_timeout_in_seconds = 180 + log_level = 3 + use_custom_css = true + css_links = [ + "https://assets.pingone.com/ux/end-user-nano/0.1.0-alpha.9/end-user-nano.css", + "https://assets.pingone.com/ux/astro-nano/0.1.0-alpha.11/icons.css", + "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" + ] + use_custom_script = true + js_links = [ + { + crossorigin = "test", + defer = false, + integrity = "test", + label = "https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.9.2/html2pdf.bundle.min.js", + referrerpolicy = "test", + type = "test", + value = "https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.9.2/html2pdf.bundle.min.js" + }, + { + crossorigin = "anonymous", + defer = false, + integrity = "test", + label = "https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js", + referrerpolicy = "test", + type = "test", + value = "https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js" + } + ] + flow_timeout_in_seconds = 0 + require_authentication_to_initiate = false + } + color = "#FFC8C1" + graph_data = { + elements = { + nodes = [ + { + data = { + id = "2pzouq7el7" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-errors.id + connector_id = "errorConnector" + label = "Error Message" + status = "configured" + capability_name = "customErrorMessage" + type = "action" + properties = jsonencode({ + "error_message": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"This is an error\"\n }\n ]\n }\n]" + }, + "error_description": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"This is an error, really\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 400 + y = 400 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + } + ] + } + + zooming_enabled = true + user_zooming_enabled = true + zoom = 1 + min_zoom = 1e-50 + max_zoom = 1e+50 + panning_enabled = true + user_panning_enabled = true + pan = { + x = 0 + y = 0 + } + box_selection_enabled = true + renderer = jsonencode({ + "name": "null" + }) + } +} diff --git a/internal/acctest/testhcl/pingone_davinci_flow/full_minimal_empty_objects_in_settings.tf b/internal/acctest/testhcl/pingone_davinci_flow/full_minimal_empty_objects_in_settings.tf new file mode 100644 index 000000000..1d3f904c8 --- /dev/null +++ b/internal/acctest/testhcl/pingone_davinci_flow/full_minimal_empty_objects_in_settings.tf @@ -0,0 +1,84 @@ + + %[1]s + +resource "pingone_davinci_connector_instance" "%[2]s-errors" { + environment_id = data.pingone_environment.general_test.id + connector = { + id = "errorConnector" + } + name = "%[2]s-errors" +} + +resource "pingone_davinci_flow" "%[2]s" { + environment_id = data.pingone_environment.general_test.id + description = "empty objects in settings test" + name = "simple" + settings = { + csp = "worker-src 'self' blob:; script-src 'self' https://cdn.jsdelivr.net https://code.jquery.com https://devsdk.singularkey.com http://cdnjs.cloudflare.com 'unsafe-inline' 'unsafe-eval';" + intermediate_loading_screen_css = "{}" + intermediate_loading_screen_html = "{}" + flow_http_timeout_in_seconds = 180 + log_level = 3 + use_custom_css = false + css_links = [] + use_custom_script = false + js_links = [] + flow_timeout_in_seconds = 0 + require_authentication_to_initiate = false + } + color = "#FFC8C1" + graph_data = { + elements = { + nodes = [ + { + data = { + id = "2pzouq7el7" + node_type = "CONNECTION" + connection_id = pingone_davinci_connector_instance.%[2]s-errors.id + connector_id = "errorConnector" + label = "Error Message" + status = "configured" + capability_name = "customErrorMessage" + type = "action" + properties = jsonencode({ + "error_message": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"This is an error\"\n }\n ]\n }\n]" + }, + "error_description": { + "value": "[\n {\n \"children\": [\n {\n \"text\": \"This is an error, really\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 400 + y = 400 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + } + ] + } + + zooming_enabled = true + user_zooming_enabled = true + zoom = 1 + min_zoom = 1e-50 + max_zoom = 1e+50 + panning_enabled = true + user_panning_enabled = true + pan = { + x = 0 + y = 0 + } + box_selection_enabled = true + renderer = jsonencode({ + "name": "null" + }) + } +} diff --git a/internal/acctest/testhcl/pingone_davinci_flow/ootb_device_management.tf b/internal/acctest/testhcl/pingone_davinci_flow/ootb_device_management.tf new file mode 100644 index 000000000..4a2cdaa07 --- /dev/null +++ b/internal/acctest/testhcl/pingone_davinci_flow/ootb_device_management.tf @@ -0,0 +1,4810 @@ + + %[1]s + +resource "pingone_davinci_flow" "%[2]s" { + color = "#CACED3" + description = "Imported on Fri Jan 10 2025 20:29:32 GMT+0000 (Coordinated Universal Time)" + environment_id = data.pingone_environment.general_test.id + graph_data = { + box_selection_enabled = true + elements = { + edges = [ + { + classes = null + data = { + id = "09oyswslga" + source = "ebzcromrpm" + target = "to6mgd2tyh" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "1qrl4o3wrp" + source = "efiecys0xw" + target = "7rwri5u6ra" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "1r7pq42jkr" + source = "fvt3dt1sk1" + target = "v9xx0rido4" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "1sb6nj0e17" + source = "pthery4nru" + target = "1lngxsfyuk" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "1z1rqsjsrz" + source = "17n6cajfer" + target = "odx7hiwkjx" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "24sd7t2lsx" + source = "mr62wpbo3z" + target = "cb42qgfnjd" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "2juqzc8h6j" + source = "3jsczqq7hm" + target = "bpuhlgwdhe" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "2tskkz0r8c" + source = "088nn24g3r" + target = "zekirrx0pv" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "32093ynmwn" + source = "rxrwt223m5" + target = "rsj0knmukp" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "38dq0izpjk" + source = "v9xx0rido4" + target = "c6dxhfi5rb" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "3jrqdc3903" + source = "0jgff1lx32" + target = "gz9gke603k" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "4lx314pj2q" + source = "fwpzd4lh0q" + target = "eevgv227kt" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "7o72b2gojg" + source = "d915blmeth" + target = "17n6cajfer" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "7wcpu7sber" + source = "e9gg1lr1db" + target = "b3jh5zpngp" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "855u11aqp2" + source = "vp8o2mc12q" + target = "dpv60nrlu4" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 132 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "9ek9b40eer" + source = "7rwri5u6ra" + target = "rxrwt223m5" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "9kfx52xciv" + source = "8sttri4np9" + target = "4os42modvj" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "a0x8ewnynu" + source = "pks46w5ks6" + target = "4wqs0nbs1v" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "a11x5pmwza" + source = "4i8hh3qp83" + target = "sjedcfzfgi" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "a9kvy2cmvu" + source = "to6mgd2tyh" + target = "j4l954l5hz" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "accd4yeefv" + source = "lu3t9lz7j" + target = "3qniq7ika1" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "ak2xsw06u8" + source = "61gkn04fvn" + target = "gmbeads147" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "b8n04pie3j" + source = "0mbvscfh8v" + target = "mr62wpbo3z" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "bnhd9l9a03" + source = "gz9gke603k" + target = "fwpzd4lh0q" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 92 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "bnolwt0cu4" + source = "6rcgg8opng" + target = "fzdgjjow89" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "c3ka45y0dh" + source = "4wqs0nbs1v" + target = "kdfb05yf1m" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "d1yhcdzm32" + source = "sjedcfzfgi" + target = "srhu2uexj1" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "e0tlpa5alh" + source = "xz5zj0bo0z" + target = "wxyu359jnv" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 52 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "e3bnpb5ulh" + source = "j6pgj7seov" + target = "2x2le9q98" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 52 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "eo0cz2wpe7" + source = "9pekqghawg" + target = "5mes9ynjey" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "es4tlou0aw" + source = "3jsczqq7hm" + target = "o925yy0p7r" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "ft7jetjjfc" + source = "xz5zj0bo0z" + target = "xytgoh995y" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 132 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "g09fttujco" + source = "qy6uai4d4r" + target = "j6pgj7seov" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "ghwmqlw3wq" + source = "vp8o2mc12q" + target = "o5huuauebn" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 172 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "gj08idiyg" + source = "vbk955oxjg" + target = "8sttri4np9" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "gnixex6cnk" + source = "sjedcfzfgi" + target = "lxdqcv1aa7" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "gt4oogvepx" + source = "lxdqcv1aa7" + target = "vbk955oxjg" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "ihlnks4x0o" + source = "umf4ie39n" + target = "efiecys0xw" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "jviqynfkje" + source = "o5huuauebn" + target = "u04j1zkybt" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "k02nrj9k19" + source = "xz5zj0bo0z" + target = "lu3t9lz7j" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 92 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "kfllp9ilse" + source = "921411zeq1" + target = "6nafzw7by5" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "kl6bq841px" + source = "921411zeq1" + target = "qcqgec2dmb" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "kxia34491z" + source = "c6dxhfi5rb" + target = "45rd8ajb4g" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "l4u3fgrqac" + source = "up4jkblnks" + target = "r8nxemp506" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "la070a955c" + source = "at5tmglpow" + target = "6rcgg8opng" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "ljrakf04za" + source = "xytgoh995y" + target = "erir79d26y" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "lmgbtmj39l" + source = "gz9gke603k" + target = "ako0e9ds26" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 172 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "lw4jd86e7i" + source = "vp8o2mc12q" + target = "fvt3dt1sk1" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 92 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "lxakz97582" + source = "vp8o2mc12q" + target = "0mbvscfh8v" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 52 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "m2o1ulgs9n" + source = "ako0e9ds26" + target = "5b5ckjqcix" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "mb0utgb1nz" + source = "c6dxhfi5rb" + target = "vlfgac0ix0" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "meu1jf6cvl" + source = "rsj0knmukp" + target = "3jsczqq7hm" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "mrw4n9jkit" + source = "5mes9ynjey" + target = "4i8hh3qp83" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "my92qzqw11" + source = "cb42qgfnjd" + target = "43e7ccsg4e" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "n11rh40evf" + source = "rxrwt223m5" + target = "ls0q7pxpla" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "naloj37euk" + source = "fzdgjjow89" + target = "miwpvke4ky" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "npt7qqxi0z" + source = "j6pgj7seov" + target = "e9gg1lr1db" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 92 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "nvvjihobpc" + source = "kh69z64byb" + target = "zvpx8o3npf" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "ny8c9yfuha" + source = "j4l954l5hz" + target = "2tif2w7s85" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "o1eyim62ka" + source = "2tif2w7s85" + target = "vp8o2mc12q" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "ogz64vp18p" + source = "cb42qgfnjd" + target = "wmy2hwaazd" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "oiujwsnzbl" + source = "17n6cajfer" + target = "xz5zj0bo0z" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "q9zo0rw062" + source = "wxyu359jnv" + target = "9jl5ynfchd" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "qilmoc436k" + source = "o925yy0p7r" + target = "qy6uai4d4r" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "rv1hpt8qzi" + source = "2x2le9q98" + target = "up4jkblnks" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "s3vrnhlmlj" + source = "hhnj8v9hed" + target = "m0gjea9ddr" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "sfxw16xw0p" + source = "2dvdm35xe5" + target = "hhnj8v9hed" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "ueu4z7bda9" + source = "gz9gke603k" + target = "q3ibsmt4qr" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 132 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "v20mnlg22t" + source = "m0gjea9ddr" + target = "zmy34kmwpn" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "vciqs9y7up" + source = "4os42modvj" + target = "pks46w5ks6" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "vjrohwhee2" + source = "gz9gke603k" + target = "kh69z64byb" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 52 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "vksnw90hoa" + source = "dpv60nrlu4" + target = "powjrjqmwn" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "vlot9c91qm" + source = "r8nxemp506" + target = "ev94io1fpf" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "w39uo9z927" + source = "1lngxsfyuk" + target = "d915blmeth" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "w8gmwksqtk" + source = "5b5ckjqcix" + target = "088nn24g3r" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "wcyhj4snq3" + source = "powjrjqmwn" + target = "921411zeq1" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "wj6t462l9t" + source = "zmy34kmwpn" + target = "7ujaohyyg9" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "xjil07au7c" + source = "r8nxemp506" + target = "6p1jps948p" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "xo3ag6n91l" + source = "miwpvke4ky" + target = "yaorwpte52" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "y920f1fj02" + source = "kdfb05yf1m" + target = "0jgff1lx32" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "ygobg33efv" + source = "q3ibsmt4qr" + target = "5p3ahp4peh" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "zyhdj85h4r" + source = "gmbeads147" + target = "pthery4nru" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + ] + nodes = [ + { + classes = null + data = { + capability_name = "AEqualsB" + connector_id = "functionsConnector" + id = "rsj0knmukp" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + leftValueA = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"mfaEnabled\",\n \"data\": \"{{local.7rwri5u6ra.payload.output.matchedUser.mfaEnabled}}\",\n \"tooltip\": \"{{local.7rwri5u6ra.payload.output.matchedUser.mfaEnabled}}\",\n \"children\": [\n {\n \"text\": \"mfaEnabled\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "Check If MFA Is enabled?" + } + rightValueB = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"true\"\n }\n ]\n }\n]" + } + type = { + value = "boolean" + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 997.5073852539062 + y = 377.0385437011719 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "AEqualsMultipleB" + connector_id = "functionsConnector" + id = "gz9gke603k" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + leftValueA = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"http.svg\",\n \"url\": \"buttonValue\",\n \"data\": \"{{local.kdfb05yf1m.payload.output.buttonValue}}\",\n \"tooltip\": \"{{local.kdfb05yf1m.payload.output.buttonValue}}\",\n \"children\": [\n {\n \"text\": \"buttonValue\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "User Selection" + } + rightValueMultiple = { + value = [{ + id = "dxjv90ff8t" + value = "[\n {\n \"children\": [\n {\n \"text\": \"ADD\"\n }\n ]\n }\n]" + }, { + id = "soa9lp6bnh" + value = "[\n {\n \"children\": [\n {\n \"text\": \"DONE\"\n }\n ]\n }\n]" + }, { + id = "4kqpgp5gmr" + value = "[\n {\n \"children\": [\n {\n \"text\": \"CANCEL\"\n }\n ]\n }\n]" + }] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2439.61328125 + y = 867.4180297851562 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "AEqualsMultipleB" + connector_id = "functionsConnector" + id = "j6pgj7seov" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + leftValueA = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"http.svg\",\n \"url\": \"buttonValue\",\n \"data\": \"{{local.o925yy0p7r.payload.output.buttonValue}}\",\n \"tooltip\": \"{{local.o925yy0p7r.payload.output.buttonValue}}\",\n \"children\": [\n {\n \"text\": \"buttonValue\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "MFA Form Selection" + } + rightValueMultiple = { + value = [{ + id = "p7mds1605b" + value = "[\n {\n \"children\": [\n {\n \"text\": \"NEXT\"\n }\n ]\n }\n]" + }, { + id = "p8uz28a5f7" + value = "[\n {\n \"children\": [\n {\n \"text\": \"CANCEL\"\n }\n ]\n }\n]" + }] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1705.9974365234375 + y = 503.5545959472656 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "AEqualsMultipleB" + connector_id = "functionsConnector" + id = "vp8o2mc12q" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + leftValueA = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"http.svg\",\n \"url\": \"buttonValue\",\n \"data\": \"{{local.j4l954l5hz.payload.output.buttonValue}}\",\n \"tooltip\": \"{{local.j4l954l5hz.payload.output.buttonValue}}\",\n \"children\": [\n {\n \"text\": \"buttonValue\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "Selected Device Screen Selection" + } + rightValueMultiple = { + value = [{ + id = "u1406iqbss" + value = "[\n {\n \"children\": [\n {\n \"text\": \"save\"\n }\n ]\n }\n]" + }, { + id = "cjzqrymiha" + value = "[\n {\n \"children\": [\n {\n \"text\": \"default\"\n }\n ]\n }\n]" + }, { + id = "ksteonmet4" + value = "[\n {\n \"children\": [\n {\n \"text\": \"remove\"\n }\n ]\n }\n]" + }, { + id = "sa7249yx4z" + value = "[\n {\n \"children\": [\n {\n \"text\": \"cancel\"\n }\n ]\n }\n]" + }] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 967.5570068359375 + y = 1854.6544189453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "AEqualsMultipleB" + connector_id = "functionsConnector" + id = "xz5zj0bo0z" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + leftValueA = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"flow-connector.svg\",\n \"url\": \"ciam_subflowResult\",\n \"data\": \"{{local.d915blmeth.payload.output.ciam_subflowResult}}\",\n \"tooltip\": \"{{local.d915blmeth.payload.output.ciam_subflowResult}}\",\n \"children\": [\n {\n \"text\": \"ciam_subflowResult\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "Device Registration Result" + } + rightValueB = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"PASSWORD\"\n }\n ]\n }\n]" + } + rightValueMultiple = { + value = [{ + id = "nvvspv2htd" + value = "[\n {\n \"children\": [\n {\n \"text\": \"SUCCESS\"\n }\n ]\n }\n]" + }, { + id = "joif3l174h" + value = "[\n {\n \"children\": [\n {\n \"text\": \"PASSWORD\"\n }\n ]\n }\n]" + }, { + id = "dgnzdl3n06" + value = "[\n {\n \"children\": [\n {\n \"text\": \"CANCEL\"\n }\n ]\n }\n]" + }] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1349.6455078125 + y = 1354.72119140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "ALessThanB" + connector_id = "functionsConnector" + id = "lxdqcv1aa7" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + leftValueA = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"size\",\n \"data\": \"{{local.4i8hh3qp83.payload.output.rawResponse.size}}\",\n \"tooltip\": \"{{local.4i8hh3qp83.payload.output.rawResponse.size}}\",\n \"children\": [\n {\n \"text\": \"size\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "Check If User Can Add New Device" + } + rightValueB = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"maxAllowedDevices\",\n \"data\": \"{{local.4i8hh3qp83.payload.output.mfaSettings.pairing.maxAllowedDevices}}\",\n \"tooltip\": \"{{local.4i8hh3qp83.payload.output.mfaSettings.pairing.maxAllowedDevices}}\",\n \"children\": [\n {\n \"text\": \"maxAllowedDevices\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + type = { + value = "number" + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 977.7857055664062 + y = 869.297607421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "createSuccessResponse" + connector_id = "httpConnector" + id = "m0gjea9ddr" + label = "Http" + node_type = "CONNECTION" + properties = jsonencode({ + backgroundColor = { + value = "#9dc967ff" + } + nodeTitle = { + value = "Return Success Response" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 631.5487060546875 + y = 2526.6708984375 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "createSuccessResponse" + connector_id = "httpConnector" + id = "yaorwpte52" + label = "Http" + node_type = "CONNECTION" + properties = jsonencode({ + backgroundColor = { + value = "#ffc8c1ff" + } + nodeTitle = { + value = "Send Response" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 960 + y = 2730 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "customFunction" + connector_id = "functionsConnector" + id = "5b5ckjqcix" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + code = { + value = "module.exports = a = async ({ params }) => {\n\tvar devices = JSON.parse(params.devices);\n\n\tvar selectedDevice = devices.filter(device => {\n\t\treturn device.id == params.selectedDeviceId;\n\t});\n\n\tvar isDefault = devices[0].id === params.selectedDeviceId;\n\n\tvar nickname = selectedDevice[0].nickname;\n\n\tvar applicationName = selectedDevice[0].application ? selectedDevice[0].application.nativeName : \"\";\n\n\tvar marketingName = selectedDevice[0].model ? selectedDevice[0].model.marketingName : \"\";\n\n\treturn {\n\t\ttype: selectedDevice[0].type,\n\t\temail: selectedDevice[0].email,\n\t\tphone: selectedDevice[0].phone,\n\t\tdisplayName: selectedDevice[0].displayName,\n\t\tisDefault,\n\t\tnickname,\n\t\tapplicationName,\n\t\tmarketingName\n\t};\n}" + } + nodeTitle = { + value = "Get Device Info" + } + outputSchema = { + value = "{\n\t\"output\": {\n\t\t\"type\": \"object\",\n\t\t\"properties\": {\n\t\t\t\"type\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t},\n\t\t\t\"email\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t},\n\t\t\t\"phone\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t},\n\t\t\t\"displayName\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t},\n\t\t\t\"isDefault\": {\n\t\t\t\t\"type\": \"boolean\"\n\t\t\t},\n\t\t\t\"nickname\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t},\n\t\t\t\"applicationName\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t},\n\t\t\t\"marketingName\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t}\n\t}\n}" + } + variableInputList = { + value = [{ + name = "devices" + preferredDataType = "string" + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"devices\",\n \"data\": \"{{local.4i8hh3qp83.payload.output.rawResponse._embedded.devices}}\",\n \"tooltip\": \"{{local.4i8hh3qp83.payload.output.rawResponse._embedded.devices}}\",\n \"children\": [\n {\n \"text\": \"devices\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + }, { + name = "selectedDeviceId" + preferredDataType = "string" + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"http.svg\",\n \"url\": \"buttonValue\",\n \"data\": \"{{local.kdfb05yf1m.payload.output.buttonValue}}\",\n \"tooltip\": \"{{local.kdfb05yf1m.payload.output.buttonValue}}\",\n \"children\": [\n {\n \"text\": \"buttonValue\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + }] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2764.89501953125 + y = 1165.593017578125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "customFunction" + connector_id = "functionsConnector" + id = "8sttri4np9" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + code = { + value = "// Write your code here\n// Supported language: Javascript \nmodule.exports = a = async ({params}) => {\n\tconst deviceRemovalWarning = params.size < 2\n\treturn {'deviceRemovalWarning': deviceRemovalWarning}\n}" + } + nodeTitle = { + value = "Check If Device Removal Warning Is Needed" + } + outputSchema = { + value = "{\n\t\"output\": {\n\t\t\"type\": \"object\",\n\t\t\"properties\": {\n\t\t\t\"deviceRemovalWarning\": {\n\t\t\t\t\"type\": \"boolean\"\n\t\t\t}\n\t\t}\n\t}\n}" + } + variableInputList = { + value = [{ + name = "size" + preferredDataType = "string" + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"size\",\n \"data\": \"{{local.4i8hh3qp83.payload.output.rawResponse.size}}\",\n \"tooltip\": \"{{local.4i8hh3qp83.payload.output.rawResponse.size}}\",\n \"children\": [\n {\n \"text\": \"size\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + }] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1325.1280517578125 + y = 869.297607421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "customFunction" + connector_id = "functionsConnector" + id = "pks46w5ks6" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + code = { + value = "module.exports = a = async ({ params }) => {\n var usableDevices = JSON.parse(params.devices);\n\n const allowedDeviceTypes = params.allowedDeviceTypes ? params.allowedDeviceTypes.split(\",\") : [];\n\n usableDevices = usableDevices.filter(device => {\n return allowedDeviceTypes.includes(device.type);\n });\n\n usableDevices = JSON.stringify(usableDevices);\n\n return { usableDevices: usableDevices };\n}" + } + nodeTitle = { + value = "Filter Unusable Devices" + } + outputSchema = { + value = "{\n \"output\": {\n \"type\": \"object\",\n \"properties\": {\n \"usableDevices\": {\n \"type\": \"string\"\n }\n }\n }\n}" + } + variableInputList = { + value = [{ + name = "devices" + preferredDataType = "string" + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"devices\",\n \"data\": \"{{local.4i8hh3qp83.payload.output.rawResponse._embedded.devices}}\",\n \"tooltip\": \"{{local.4i8hh3qp83.payload.output.rawResponse._embedded.devices}}\",\n \"children\": [\n {\n \"text\": \"devices\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + }, { + name = "allowedDeviceTypes" + preferredDataType = "string" + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.9pekqghawg.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.9pekqghawg.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + }] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1707.729248046875 + y = 867.4180297851562 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "customFunction" + connector_id = "functionsConnector" + id = "umf4ie39n" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + code = { + value = "// Write your code here\n// Supported language: Javascript \nmodule.exports = a = async ({params}) => {\n\tconst results = {};\n\n\tconst selectValue = (parameterValue, companyValue) => {\n\t\tif (params.flowParameters === undefined || parameterValue === undefined) {\n\t\t\treturn companyValue;\n\t\t}\n\n\t\treturn parameterValue === \"true\";\n\t};\n\n\tresults[\"username\"] = params.flowParameters.username;\n\n\t// allowed device types\n\tconst isEmailOTPEnabled = selectValue(params.flowParameters.isEmailOTPEnabled, params.ciam_emailOtpEnabled);\n\tconst isFidoPasskeyEnabled = selectValue(params.flowParameters.isFidoPasskeyEnabled, params.ciam_fidoPasskeyEnabled);\n\tconst isSmsOTPEnabled = selectValue(params.flowParameters.isSmsOTPEnabled, params.ciam_smsOtpEnabled);\t\n\n\tconst devices = [];\n\tif (isEmailOTPEnabled) {\n\t\tdevices.push(\"EMAIL\");\n\t};\n\tif (isFidoPasskeyEnabled) {\n\t\tdevices.push(\"FIDO2\");\n\t};\n\tif (isSmsOTPEnabled) {\n\t\tdevices.push(\"SMS\");\n\t};\n\n\tresults[\"flowAllowedDeviceTypes\"] = devices.join(\",\");\n\n\treturn { ...results };\n}" + } + nodeTitle = { + value = "Set Flow Variables" + } + outputSchema = { + value = "{\n\t\"output\": {\n\t\t\"type\": \"object\",\n\t\t\"properties\": {\n\t\t\t\"username\": {\n\t\t\t\t\"type\": \"boolean\"\n\t\t\t},\n\t\t\t\"flowAllowedDeviceTypes\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t}\n\t}\n}" + } + variableInputList = { + value = [{ + name = "flowParameters" + preferredDataType = "object" + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"auth.svg\",\n \"url\": \"flowParameters\",\n \"data\": \"{{global.parameters.flowParameters}}\",\n \"tooltip\": \"{{global.parameters.flowParameters}}\",\n \"children\": [\n {\n \"text\": \"flowParameters\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + }, { + name = "ciam_smsOtpEnabled" + preferredDataType = "boolean" + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"variable.svg\",\n \"url\": \"ciam_smsOtpEnabled\",\n \"data\": \"{{global.company.variables.ciam_smsOtpEnabled}}\",\n \"tooltip\": \"{{global.company.variables.ciam_smsOtpEnabled}}\",\n \"children\": [\n {\n \"text\": \"ciam_smsOtpEnabled\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + }, { + name = "ciam_fidoPasskeyEnabled" + preferredDataType = "boolean" + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"variable.svg\",\n \"url\": \"ciam_fidoPasskeyEnabled\",\n \"data\": \"{{global.company.variables.ciam_fidoPasskeyEnabled}}\",\n \"tooltip\": \"{{global.company.variables.ciam_fidoPasskeyEnabled}}\",\n \"children\": [\n {\n \"text\": \"ciam_fidoPasskeyEnabled\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + }, { + name = "ciam_emailOtpEnabled" + preferredDataType = "boolean" + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"variable.svg\",\n \"url\": \"ciam_emailOtpEnabled\",\n \"data\": \"{{global.company.variables.ciam_emailOtpEnabled}}\",\n \"tooltip\": \"{{global.company.variables.ciam_emailOtpEnabled}}\",\n \"children\": [\n {\n \"text\": \"ciam_emailOtpEnabled\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + }] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 300 + y = 390 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "customHTMLTemplate" + connector_id = "httpConnector" + id = "fzdgjjow89" + label = "Http" + node_type = "CONNECTION" + properties = jsonencode({ + customHTML = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\\n\\t
\\n\\t\\t
\\n\\t\\t\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t

Error

\\n\\t\\t\\t\\t

\\n\\t\\t\\t\\t\\t\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"errorMessage\",\n \"data\": \"{{local.at5tmglpow.payload.output.errorMessage}}\",\n \"tooltip\": \"{{local.at5tmglpow.payload.output.errorMessage}}\",\n \"children\": [\n {\n \"text\": \"errorMessage\"\n }\n ]\n },\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\\n\\t\\t\\t\\t

\\n\\t\\t\\t\\t\\n\\t\\t\\t
\\n\\t\\t
\\n\\t
\\n\"\n }\n ]\n }\n]" + } + formFieldsList = { + value = [{ + preferredControlType = "textField" + preferredDataType = "string" + propertyName = "buttonValue" + }] + } + nodeTitle = { + value = "Error Screen" + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 631.5487060546875 + y = 2733.4453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "customHTMLTemplate" + connector_id = "httpConnector" + id = "j4l954l5hz" + label = "HTTP" + node_type = "CONNECTION" + properties = jsonencode({ + FIDO2DisplayName = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"variable.svg\",\n \"url\": \"FIDO2DisplayName\",\n \"data\": \"{{global.variables.FIDO2DisplayName}}\",\n \"tooltip\": \"{{global.variables.FIDO2DisplayName}}\",\n \"children\": [\n {\n \"text\": \"FIDO2DisplayName\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + customCSS = { + value = "" + } + customHTML = { + value = "\n
\n
\n
\n
\n
\n
\n

\n Edit method\n

\n
\n

\n {{#with device}}\n
\n {{#ifEquals type \"SMS\"}}\n \n
\n
\n {{#if nickname}}\n {{nickname}}\n {{else}}\n Text message\n {{/if}}\n
\n
\n
\n {{/ifEquals}}\n\n {{#ifEquals type \"EMAIL\"}}\n \n
\n
\n {{#if nickname}}\n {{nickname}}\n {{else}}\n Email\n {{/if}}\n
\n
\n
\n {{/ifEquals}}\n\n {{#ifEquals type \"FIDO2\"}}\n \n \n \n \n \n
\n {{#if nickname}}\n {{nickname}}\n {{else}}\n Biometrics/Security Key\n {{/if}}\n
\n {{/ifEquals}}\n
\n\n
\n \n \n
\n\n
\n \n \n {{#unless isDefault}}\n \n {{/unless}}\n \n \n
\n {{/with}}\n
\n
\n
\n
\n" + } + customScript = { + value = "const renameButton = document.getElementById(\"renameButton\");\n\nconst showRenameField = () => {\n // Remove rename button\n renameButton.classList.add(\"d-sm-none\");\n\n const renameField = document.getElementById(\"renameField\");\n const deviceLabelField = document.querySelector(\".text-primary\");\n const deviceName = deviceLabelField.textContent.trim();\n // Set device name to input value\n renameField.querySelector(\"input\").value = deviceName;\n // Show input instead of label\n deviceLabelField.replaceWith(renameField);\n renameField.classList.remove(\"d-sm-none\");\n\n // Show save buttin\n const saveButton = document.getElementById(\"save\");\n saveButton.classList.remove(\"d-sm-none\");\n};\n\nrenameButton.addEventListener(\"click\", showRenameField);\n" + } + device = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"deviceInfo\",\n \"data\": \"{{local.ebzcromrpm.payload.output.deviceInfo}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.deviceInfo}}\",\n \"children\": [\n {\n \"text\": \"deviceInfo\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + formFieldsList = { + value = [{ + preferredControlType = "textField" + preferredDataType = "string" + propertyName = "buttonValue" + }, { + hashedVisibility = false + preferredControlType = "textField" + preferredDataType = "string" + propertyName = "nickname" + value = "" + }] + } + inputSchema = { + value = "{\n \"type\": \"object\",\n \"properties\": {\n \"device\": {\n \"preferedControlType\": \"textField\",\n \"enableParameters\": true\n }\n }\n}" + } + nodeTitle = { + value = "Selected Device Screen" + } + outputSchema = { + value = {} + } + validationRules = { + value = [] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 631.5487060546875 + y = 1854.6544189453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "customHTMLTemplate" + connector_id = "httpConnector" + id = "kdfb05yf1m" + label = "Http" + node_type = "CONNECTION" + properties = jsonencode({ + canAddNewMethod = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"functions.svg\",\n \"url\": \"success\",\n \"data\": \"{{local.lxdqcv1aa7.payload.success}}\",\n \"tooltip\": \"{{local.lxdqcv1aa7.payload.success}}\",\n \"children\": [\n {\n \"text\": \"success\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + customCSS = { + value = "[id^=\"mfa-type-list-button\"] div {\n flex: 1;\n}" + } + customHTML = { + value = "\n
\n
\n
\n
\n
\n
\n
\n

Your authentication methods

\n {{#if successMessage}}\n

{{successMessage}}

\n {{/if}}\n {{#if deviceRemovalWarning}}\n

\n Removing all authentication methods could prevent you from signing on to your account.\n

\n {{/if}}\n

\n
\n
\n {{#each devices}}\n {{#ifEquals type \"SMS\"}}\n \n {{/ifEquals}}\n {{#ifEquals type \"EMAIL\"}}\n \n {{/ifEquals}}\n {{#ifEquals type \"FIDO2\"}}\n \n {{/ifEquals}}\n {{/each}}\n
\n
\n {{#if canAddNewMethod}}\n \n {{/if}}\n {{#unless successMessage}}\n \n {{else}}\n \n {{/unless}}\n
\n
\n
\n
\n \n" + } + customScript = { + value = "document.onclick = function(e) {\n const divToHide = document.getElementById(\"successMessage\")\n if (divToHide != null) {\n divToHide.style.display = \"none\";\n }\n}\n" + } + deviceRemovalWarning = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"functions.svg\",\n \"url\": \"deviceRemovalWarning\",\n \"data\": \"{{local.8sttri4np9.payload.output.deviceRemovalWarning}}\",\n \"tooltip\": \"{{local.8sttri4np9.payload.output.deviceRemovalWarning}}\",\n \"children\": [\n {\n \"text\": \"deviceRemovalWarning\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + devices = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"functions.svg\",\n \"url\": \"usableDevices\",\n \"data\": \"{{local.pks46w5ks6.payload.output.usableDevices}}\",\n \"tooltip\": \"{{local.pks46w5ks6.payload.output.usableDevices}}\",\n \"children\": [\n {\n \"text\": \"usableDevices\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + formFieldsList = { + value = [{ + hashedVisibility = false + preferredControlType = "textField" + preferredDataType = "string" + propertyName = "buttonValue" + value = "" + }] + } + inputSchema = { + value = "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"devices\":{\n\t\t\t\"type\":\"array\"\n\t\t},\n\t\t\"canAddNewMethod\":{\n\t\t\t\"type\":\"boolean\"\n\t\t},\n\t\t\"successMessage\":{\n\t\t\t\"type\":\"string\"\n\t\t},\n\t\t\"deviceRemovalWarning\":{\n\t\t\t\"type\":\"boolean\"\n\t\t}\n\t}\n}" + } + nodeTitle = { + value = "Display User Devices" + } + outputSchema = { + value = {} + } + successMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"successMessage\",\n \"data\": \"{{local.9pekqghawg.payload.output.successMessage}}\",\n \"tooltip\": \"{{local.9pekqghawg.payload.output.successMessage}}\",\n \"children\": [\n {\n \"text\": \"successMessage\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + undefined = { + value = null + } + validationRules = { + value = [] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2060.117919921875 + y = 867.4180297851562 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "customHTMLTemplate" + connector_id = "httpConnector" + id = "o925yy0p7r" + label = "Http" + node_type = "CONNECTION" + properties = jsonencode({ + customHTML = { + value = "\n
\n
\n
\n
\n
\n
\n

Enable Multi-Factor Authentication

\n

\n

\n Enable multi-factor authentication (MFA) for your account. With MFA enabled, you can sign on using any of the preferred passwordless methods available to you.\n

\n
\n
\n \n Next\n \n \n Cancel\n \n
\n
\n
\n
\n
\n" + } + formFieldsList = { + value = [{ + hashedVisibility = false + preferredControlType = "textField" + preferredDataType = "string" + propertyName = "buttonValue" + value = "" + }] + } + nodeDescription = { + value = "Ask user to enable MFA" + } + nodeTitle = { + value = "MFA Form" + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1351.75244140625 + y = 503.5545959472656 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "customHTMLTemplate" + connector_id = "httpConnector" + id = "pthery4nru" + label = "Http" + node_type = "CONNECTION" + properties = jsonencode({ + customCSS = {} + customHTML = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"
\\n\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"data\": \"[[[skcomponent###c2tjb21wb25lbnQgInNrcG9sbGluZyIgIGNsYXNzPSIiIHBvbGxJbnRlcnZhbD0iMTAiIHBvbGxSZXRyaWVzPSIxIiBwb2xsQ2hhbGxlbmdlU3RhdHVzPSJmYWxzZSI=###eyJuYW1lIjoic2twb2xsaW5nIiwib3B0aW9ucyI6eyJjbGFzcyI6IiIsInBvbGxJbnRlcnZhbCI6IjEwIiwicG9sbFJldHJpZXMiOiIxIiwicG9sbENoYWxsZW5nZVN0YXR1cyI6ImZhbHNlIn0sImNvbXBvbmVudFByb3BzIjp7ImNsYXNzIjp7Im5hbWUiOiJjbGFzcyIsImRpc3BsYXlOYW1lIjoiQ1NTIENsYXNzIn0sInBvbGxJbnRlcnZhbCI6eyJuYW1lIjoicG9sbEludGVydmFsIiwiZGlzcGxheU5hbWUiOiJQb2xsIEludGVydmFsIiwidmFsdWUiOjIwMDB9LCJwb2xsUmV0cmllcyI6eyJuYW1lIjoicG9sbFJldHJpZXMiLCJkaXNwbGF5TmFtZSI6IlBvbGwgUmV0cmllcyIsInZhbHVlIjo2MH0sInBvbGxDaGFsbGVuZ2VTdGF0dXMiOnsibmFtZSI6InBvbGxDaGFsbGVuZ2VTdGF0dXMiLCJkaXNwbGF5TmFtZSI6IlBvbGwgQ2hhbGxlbmdlIFN0YXR1cyIsInR5cGUiOiJzZWxlY3QiLCJ2YWx1ZSI6InRydWUiLCJvcHRpb25zIjpbeyJuYW1lIjoiVHJ1ZSIsInZhbHVlIjoidHJ1ZSJ9LHsibmFtZSI6IkZhbHNlIiwidmFsdWUiOiJmYWxzZSJ9XX19fQ==]]]\",\n \"src\": \"auth.svg\",\n \"url\": \"skpolling\",\n \"children\": [\n {\n \"text\": \"skpolling\"\n }\n ],\n \"component\": \"skpolling\",\n \"options\": {\n \"class\": \"\",\n \"pollInterval\": \"10\",\n \"pollRetries\": \"1\",\n \"pollChallengeStatus\": \"false\"\n },\n \"componentProps\": {\n \"class\": {\n \"name\": \"class\",\n \"displayName\": \"CSS Class\"\n },\n \"pollInterval\": {\n \"name\": \"pollInterval\",\n \"displayName\": \"Poll Interval\",\n \"value\": 2000\n },\n \"pollRetries\": {\n \"name\": \"pollRetries\",\n \"displayName\": \"Poll Retries\",\n \"value\": 60\n },\n \"pollChallengeStatus\": {\n \"name\": \"pollChallengeStatus\",\n \"displayName\": \"Poll Challenge Status\",\n \"type\": \"select\",\n \"value\": \"true\",\n \"options\": [\n {\n \"name\": \"True\",\n \"value\": \"true\"\n },\n {\n \"name\": \"False\",\n \"value\": \"false\"\n }\n ]\n }\n },\n \"tooltip\": \"{{component.skpolling}}\"\n },\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\\n
\"\n }\n ]\n }\n]" + } + customScript = {} + formFieldsList = { + value = [] + } + nodeTitle = { + value = "NOP UI Page" + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 635.6295166015625 + y = 1354.72119140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "deleteDevice" + connector_id = "pingOneMfaConnector" + id = "powjrjqmwn" + label = "PingOne MFA" + node_type = "CONNECTION" + properties = jsonencode({ + deviceId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"deviceId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.deviceId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.deviceId}}\",\n \"children\": [\n {\n \"text\": \"deviceId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "Delete Device" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1355.2589111328125 + y = 2164.81591796875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "3qniq7ika1" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + errorMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"Unexpected selection.\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "at5tmglpow" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1734.11572265625 + y = 1464.56982421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "43e7ccsg4e" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + errorCode = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"code\",\n \"data\": \"{{local.mr62wpbo3z.payload.error.code}}\",\n \"tooltip\": \"{{local.mr62wpbo3z.payload.error.code}}\",\n \"children\": [\n {\n \"text\": \"code\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + errorMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"message\",\n \"data\": \"{{local.mr62wpbo3z.payload.error.message}}\",\n \"tooltip\": \"{{local.mr62wpbo3z.payload.error.message}}\",\n \"children\": [\n {\n \"text\": \"message\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "at5tmglpow" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1691.2672119140625 + y = 1932.1947021484375 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "45rd8ajb4g" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + errorCode = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"code\",\n \"data\": \"{{local.v9xx0rido4.payload.error.code}}\",\n \"tooltip\": \"{{local.v9xx0rido4.payload.error.code}}\",\n \"children\": [\n {\n \"text\": \"code\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + errorMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"message\",\n \"data\": \"{{local.v9xx0rido4.payload.error.message}}\",\n \"tooltip\": \"{{local.v9xx0rido4.payload.error.message}}\",\n \"children\": [\n {\n \"text\": \"message\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "at5tmglpow" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1691.2672119140625 + y = 2087.275390625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "5p3ahp4peh" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + nodeInstanceId = { + value = "2dvdm35xe5" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2764.89501953125 + y = 1057.165771484375 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "6nafzw7by5" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + errorCode = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"code\",\n \"data\": \"{{local.powjrjqmwn.payload.error.code}}\",\n \"tooltip\": \"{{local.powjrjqmwn.payload.error.code}}\",\n \"children\": [\n {\n \"text\": \"code\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + errorMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"message\",\n \"data\": \"{{local.powjrjqmwn.payload.error.message}}\",\n \"tooltip\": \"{{local.powjrjqmwn.payload.error.message}}\",\n \"children\": [\n {\n \"text\": \"message\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "at5tmglpow" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1691.2672119140625 + y = 2242.356201171875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "6p1jps948p" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"functions.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.umf4ie39n.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.umf4ie39n.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "9pekqghawg" + } + successMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"MFA enabled.\"\n }\n ]\n }\n]" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"id\",\n \"data\": \"{{local.7rwri5u6ra.payload.output.matchedUser.id}}\",\n \"tooltip\": \"{{local.7rwri5u6ra.payload.output.matchedUser.id}}\",\n \"children\": [\n {\n \"text\": \"id\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2389.18408203125 + y = 503.5545959472656 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "7ujaohyyg9" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + errorMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"Failed to send success response.\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "at5tmglpow" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 967.5570068359375 + y = 2526.6708984375 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "9jl5ynfchd" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.61gkn04fvn.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.61gkn04fvn.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "9pekqghawg" + } + successMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"Registered new method.\"\n }\n ]\n }\n]" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.61gkn04fvn.payload.output.userId}}\",\n \"tooltip\": \"{{local.61gkn04fvn.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1734.11572265625 + y = 1354.72119140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "b3jh5zpngp" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + nodeInstanceId = { + value = "2dvdm35xe5" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2060.242431640625 + y = 604.7674560546875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "bpuhlgwdhe" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"functions.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.umf4ie39n.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.umf4ie39n.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "9pekqghawg" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"id\",\n \"data\": \"{{local.7rwri5u6ra.payload.output.matchedUser.id}}\",\n \"tooltip\": \"{{local.7rwri5u6ra.payload.output.matchedUser.id}}\",\n \"children\": [\n {\n \"text\": \"id\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1351.75244140625 + y = 377.0385437011719 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "eevgv227kt" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + nodeInstanceId = { + value = "2dvdm35xe5" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2764.89501953125 + y = 975.8452758789062 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "erir79d26y" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.61gkn04fvn.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.61gkn04fvn.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "9pekqghawg" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.61gkn04fvn.payload.output.userId}}\",\n \"tooltip\": \"{{local.61gkn04fvn.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1734.11572265625 + y = 1546.956298828125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "ev94io1fpf" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + errorCode = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"code\",\n \"data\": \"{{local.up4jkblnks.payload.error.code}}\",\n \"tooltip\": \"{{local.up4jkblnks.payload.error.code}}\",\n \"children\": [\n {\n \"text\": \"code\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + errorMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"message\",\n \"data\": \"{{local.up4jkblnks.payload.error.message}}\",\n \"tooltip\": \"{{local.up4jkblnks.payload.error.message}}\",\n \"children\": [\n {\n \"text\": \"message\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "at5tmglpow" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2389.18408203125 + y = 604.7674560546875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "ls0q7pxpla" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + errorCode = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"code\",\n \"data\": \"{{local.7rwri5u6ra.payload.error.code}}\",\n \"tooltip\": \"{{local.7rwri5u6ra.payload.error.code}}\",\n \"children\": [\n {\n \"text\": \"code\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + errorMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"message\",\n \"data\": \"{{local.7rwri5u6ra.payload.error.message}}\",\n \"tooltip\": \"{{local.7rwri5u6ra.payload.error.message}}\",\n \"children\": [\n {\n \"text\": \"message\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "at5tmglpow" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 997.5073852539062 + y = 503.5545959472656 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "odx7hiwkjx" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + errorMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"flow-connector.svg\",\n \"url\": \"ciam_errorMessage\",\n \"data\": \"{{local.d915blmeth.payload.output.ciam_errorMessage}}\",\n \"tooltip\": \"{{local.d915blmeth.payload.output.ciam_errorMessage}}\",\n \"children\": [\n {\n \"text\": \"ciam_errorMessage\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "at5tmglpow" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1349.6455078125 + y = 1629.3427734375 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "qcqgec2dmb" + label = "Node" + node_type = "CONNECTION" + properties = jsonencode({ + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.ebzcromrpm.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "9pekqghawg" + } + successMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"Method successfully removed.\"\n }\n ]\n }\n]" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1691.2672119140625 + y = 2164.81591796875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "srhu2uexj1" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + errorCode = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"code\",\n \"data\": \"{{local.4i8hh3qp83.payload.error.code}}\",\n \"tooltip\": \"{{local.4i8hh3qp83.payload.error.code}}\",\n \"children\": [\n {\n \"text\": \"code\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + errorMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"message\",\n \"data\": \"{{local.4i8hh3qp83.payload.error.message}}\",\n \"tooltip\": \"{{local.4i8hh3qp83.payload.error.message}}\",\n \"children\": [\n {\n \"text\": \"message\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "at5tmglpow" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 977.7857055664062 + y = 968.538330078125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "u04j1zkybt" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.ebzcromrpm.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "9pekqghawg" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1355.2589111328125 + y = 2319.896728515625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "vlfgac0ix0" + label = "Node" + node_type = "CONNECTION" + properties = jsonencode({ + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.ebzcromrpm.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "9pekqghawg" + } + successMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"Method set as default.\"\n }\n ]\n }\n]" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1691.2672119140625 + y = 2009.735107421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "wmy2hwaazd" + label = "Node" + node_type = "CONNECTION" + properties = jsonencode({ + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.ebzcromrpm.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "9pekqghawg" + } + successMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"Method nickname saved.\"\n }\n ]\n }\n]" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1691.2672119140625 + y = 1854.6544189453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "zekirrx0pv" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + deviceId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"http.svg\",\n \"url\": \"buttonValue\",\n \"data\": \"{{local.kdfb05yf1m.payload.output.buttonValue}}\",\n \"tooltip\": \"{{local.kdfb05yf1m.payload.output.buttonValue}}\",\n \"children\": [\n {\n \"text\": \"buttonValue\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + deviceInfo = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"functions.svg\",\n \"url\": \"output\",\n \"data\": \"{{local.5b5ckjqcix.payload.output}}\",\n \"tooltip\": \"{{local.5b5ckjqcix.payload.output}}\",\n \"children\": [\n {\n \"text\": \"output\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.9pekqghawg.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.9pekqghawg.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "ebzcromrpm" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.9pekqghawg.payload.output.userId}}\",\n \"tooltip\": \"{{local.9pekqghawg.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 3090.1767578125 + y = 1165.593017578125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "zvpx8o3npf" + label = "Node" + node_type = "CONNECTION" + properties = jsonencode({ + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.9pekqghawg.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.9pekqghawg.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "61gkn04fvn" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.9pekqghawg.payload.output.userId}}\",\n \"tooltip\": \"{{local.9pekqghawg.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2737.7880859375 + y = 867.4180297851562 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "readAllDevices" + connector_id = "pingOneMfaConnector" + id = "4i8hh3qp83" + label = "PingOne MFA" + node_type = "CONNECTION" + properties = jsonencode({ + deviceTypes = { + value = ["EMAIL", "SMS", "FIDO2"] + } + nodeTitle = { + value = "Get User Devices" + } + setFilterFlag = { + value = true + } + statusFilter = { + value = "ACTIVE" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.9pekqghawg.payload.output.userId}}\",\n \"tooltip\": \"{{local.9pekqghawg.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 630.4432983398438 + y = 869.297607421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "setDeviceOrder" + connector_id = "pingOneMfaConnector" + id = "v9xx0rido4" + label = "PingOne MFA" + node_type = "CONNECTION" + properties = jsonencode({ + defaultDeviceId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"deviceId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.deviceId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.deviceId}}\",\n \"children\": [\n {\n \"text\": \"deviceId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "Set Device As Default" + } + setDeviceOrder = { + value = "SET_DEFAULT_DEVICE" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1355.2589111328125 + y = 2009.735107421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "startNode" + connector_id = "nodeConnector" + id = "2dvdm35xe5" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + inputSchema = { + value = "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t}\n}" + } + nodeTitle = { + value = "Success" + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 321.3871765136719 + y = 2526.6708984375 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "startNode" + connector_id = "nodeConnector" + id = "61gkn04fvn" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + inputSchema = { + value = "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"userId\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"displayName\": \"userId\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"userId\"\n\t\t},\n\t\t\"flowAllowedDeviceTypes\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"displayName\": \"flowAllowedDeviceTypes\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"flowAllowedDeviceTypes\"\n\t\t}\n\t}\n}" + } + nodeTitle = { + value = "Register Device" + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 334 + y = 1354 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "startNode" + connector_id = "nodeConnector" + id = "9pekqghawg" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + inputSchema = { + value = "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"userId\": {\n\t\t\t\"type\": \"text\",\n\t\t\t\"displayName\": \"userId\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"userId\"\n\t\t},\n\t\t\"successMessage\": {\n\t\t\t\"type\": \"text\",\n\t\t\t\"displayName\": \"successMessage\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"successMessage\"\n\t\t},\n\t\t\"flowAllowedDeviceTypes\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"displayName\": \"flowAllowedDeviceTypes\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"flowAllowedDeviceTypes\"\n\t\t}\n\t}\n}" + } + nodeTitle = { + value = "Device Selection" + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 307.91107177734375 + y = 869.297607421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "startNode" + connector_id = "nodeConnector" + id = "at5tmglpow" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + inputSchema = { + value = "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"errorCode\": {\n\t\t\t\"type\": \"number\",\n\t\t\t\"displayName\": \"errorCode\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"errorCode\"\n\t\t},\n\t\t\"errorMessage\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"displayName\": \"errorMessage\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"errorMessage\"\n\t\t}\n\t}\n}" + } + nodeTitle = { + value = "Error" + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 321.3871765136719 + y = 2733.4453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "startNode" + connector_id = "nodeConnector" + id = "ebzcromrpm" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + inputSchema = { + value = "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"userId\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"displayName\": \"userId\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"userId\"\n\t\t},\n\t\t\"deviceId\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"displayName\": \"deviceId\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"deviceId\"\n\t\t},\n\t\t\"deviceInfo\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"displayName\": \"deviceInfo\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"deviceInfo\"\n\t\t},\n\t\t\"flowAllowedDeviceTypes\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"displayName\": \"flowAllowedDeviceTypes\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"flowAllowedDeviceTypes\"\n\t\t}\n\t}\n}" + } + nodeTitle = { + value = "Selected Device" + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 295.5403747558594 + y = 1854.6544189453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "startUiSubFlow" + connector_id = "flowConnector" + id = "d915blmeth" + label = "Flow Conductor" + node_type = "CONNECTION" + properties = jsonencode({ + allowCancel = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"true\"\n }\n ]\n }\n]" + } + allowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.61gkn04fvn.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.61gkn04fvn.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + ciam_companyLogo = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"
\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "Device Registration" + } + passwordlessRequired = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"true\"\n }\n ]\n }\n]" + } + pingOneUserId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.61gkn04fvn.payload.output.userId}}\",\n \"tooltip\": \"{{local.61gkn04fvn.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + subFlowId = { + value = { + label = "OOTB - Device Registration - Subflow" + value = "a584da2cce2a1b95e5dc9843dea2dd89" + } + } + subFlowVersionId = { + value = -1 + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 965.1754150390625 + y = 1354.72119140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateAnnotationProperties" + connector_id = "annotationConnector" + id = "bs6yqhx1jp" + label = null + node_type = "ANNOTATION" + properties = jsonencode({ + annotation = { + value = "Update Device" + } + annotationTextColor = { + value = "#000000" + } + backgroundColor = { + value = "#B5DFFF" + } + fontFamily = { + value = "sans-serif" + } + fontSize = { + value = 16 + } + width = { + value = 1600 + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 218 + y = 1751.2672119140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateAnnotationProperties" + connector_id = "annotationConnector" + id = "kwuvuydmom" + label = null + node_type = "ANNOTATION" + properties = jsonencode({ + annotation = { + value = "Display user devices" + } + annotationTextColor = { + value = "#000000" + } + backgroundColor = { + value = "#B5DFFF" + } + fontFamily = { + value = "sans-serif" + } + fontSize = { + value = 16 + } + width = { + value = 3000 + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 243.84678649902344 + y = 743.2422485351562 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateAnnotationProperties" + connector_id = "annotationConnector" + id = "mcskw8iiy8" + label = null + node_type = "ANNOTATION" + properties = jsonencode({ + annotation = { + value = "Enable MFA" + } + annotationTextColor = { + value = "#000000" + } + backgroundColor = { + value = "#B5DFFF" + } + fontFamily = { + value = "sans-serif" + } + fontSize = { + value = 16 + } + width = { + value = 1200 + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1251.8717041015625 + y = 278 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateAnnotationProperties" + connector_id = "annotationConnector" + id = "mxfrvhu3rw" + label = null + node_type = "ANNOTATION" + properties = jsonencode({ + annotation = { + value = "Check Pre-Requisite For Device Management" + } + annotationTextColor = { + value = "#000000" + } + backgroundColor = { + value = "#B5DFFF" + } + fontFamily = { + value = "sans-serif" + } + fontSize = { + value = 16 + } + width = { + value = 900 + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 218 + y = 278 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateAnnotationProperties" + connector_id = "annotationConnector" + id = "qlu6ditq7w" + label = null + node_type = "ANNOTATION" + properties = jsonencode({ + annotation = { + value = "See https://docs.pingidentity.com/access/sources/dita/topic?resourceid=ciam_passwordless_ciam_pm_device_management for flow reference information." + } + annotationTextColor = { + value = "#ffffffff" + } + backgroundColor = { + value = "#9013feff" + } + fontFamily = { + value = "sans-serif" + } + fontSize = { + value = 16 + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 214 + y = 214 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateAnnotationProperties" + connector_id = "annotationConnector" + id = "rr2fxw7vyx" + label = null + node_type = "ANNOTATION" + properties = jsonencode({ + annotation = { + value = "Return Success" + } + annotationTextColor = { + value = "#000000" + } + backgroundColor = { + value = "#B5DFFF" + } + fontFamily = { + value = "sans-serif" + } + fontSize = { + value = 16 + } + width = { + value = 800 + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 243.84678649902344 + y = 2423.28369140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateAnnotationProperties" + connector_id = "annotationConnector" + id = "tcxtak8u2x" + label = null + node_type = "ANNOTATION" + properties = jsonencode({ + annotation = { + value = "Add Device" + } + annotationTextColor = { + value = "#000000" + } + backgroundColor = { + value = "#B5DFFF" + } + fontFamily = { + value = "sans-serif" + } + fontSize = { + value = 16 + } + width = { + value = 1200 + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 243.84678649902344 + y = 1260.1781005859375 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateAnnotationProperties" + connector_id = "annotationConnector" + id = "vziko5pbm3" + label = null + node_type = "ANNOTATION" + properties = jsonencode({ + annotation = { + value = "Return Error" + } + annotationTextColor = { + value = "#000000" + } + backgroundColor = { + value = "#B5DFFF" + } + fontFamily = { + value = "sans-serif" + } + fontSize = { + value = 16 + } + width = { + value = 800 + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 243.84678649902344 + y = 2630.05810546875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateDeviceNickname" + connector_id = "pingOneMfaConnector" + id = "mr62wpbo3z" + label = "PingOne MFA" + node_type = "CONNECTION" + properties = jsonencode({ + deviceId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"deviceId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.deviceId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.deviceId}}\",\n \"children\": [\n {\n \"text\": \"deviceId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nickname = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"http.svg\",\n \"url\": \"nickname\",\n \"data\": \"{{local.j4l954l5hz.payload.output.nickname}}\",\n \"tooltip\": \"{{local.j4l954l5hz.payload.output.nickname}}\",\n \"children\": [\n {\n \"text\": \"nickname\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "Update Device Name" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1355.2589111328125 + y = 1854.6544189453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateUserMFAEnabled" + connector_id = "pingOneMfaConnector" + id = "up4jkblnks" + label = "PingOne MFA" + node_type = "CONNECTION" + properties = jsonencode({ + nodeTitle = { + value = "Enable MFA for user" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"id\",\n \"data\": \"{{local.7rwri5u6ra.payload.output.matchedUser.id}}\",\n \"tooltip\": \"{{local.7rwri5u6ra.payload.output.matchedUser.id}}\",\n \"children\": [\n {\n \"text\": \"id\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2060.242431640625 + y = 503.5545959472656 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "userLookup" + connector_id = "pingOneSSOConnector" + id = "7rwri5u6ra" + label = "PingOne" + node_type = "CONNECTION" + properties = jsonencode({ + identifier = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"id\",\n \"data\": \"{{local.lngyffn971.payload.output.session.user.id}}\",\n \"tooltip\": \"{{local.lngyffn971.payload.output.session.user.id}}\",\n \"children\": [\n {\n \"text\": \"id\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + matchAttributes = { + value = ["username", "email"] + } + nodeTitle = { + value = "Get User Info" + } + userIdentifierForFindUser = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"functions.svg\",\n \"url\": \"username\",\n \"data\": \"{{local.umf4ie39n.payload.output.username}}\",\n \"tooltip\": \"{{local.umf4ie39n.payload.output.username}}\",\n \"children\": [\n {\n \"text\": \"username\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 630 + y = 390 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "088nn24g3r" + label = "Evaluator" + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2927.535888671875 + y = 1165.593017578125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "0jgff1lx32" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2222.7587890625 + y = 867.4180297851562 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "0mbvscfh8v" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1148.4844970703125 + y = 1854.6544189453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "17n6cajfer" + label = "Evaluator" + node_type = "EVAL" + properties = jsonencode({ + odx7hiwkjx = { + value = "anyTriggersFalse" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1102.4862060546875 + y = 1354.72119140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "1lngxsfyuk" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 800.4024658203125 + y = 1354.72119140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "2tif2w7s85" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 786.6294555664062 + y = 1854.6544189453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "2x2le9q98" + label = "Evaluator" + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1857.816650390625 + y = 503.5545959472656 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "3jsczqq7hm" + label = "Evaluator" + node_type = "EVAL" + properties = jsonencode({ + o925yy0p7r = { + value = "anyTriggersFalse" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1174.6298828125 + y = 377.0385437011719 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "4os42modvj" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1500 + y = 870 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "4wqs0nbs1v" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1870.3701171875 + y = 867.4180297851562 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "5mes9ynjey" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 456.7721252441406 + y = 869.297607421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "6rcgg8opng" + label = "Evaluator" + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 450.6211242675781 + y = 2733.4453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "921411zeq1" + label = null + node_type = "EVAL" + properties = jsonencode({ + "6nafzw7by5" = { + value = "anyTriggersFalse" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1484.4927978515625 + y = 2164.81591796875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "ako0e9ds26" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2602.254150390625 + y = 1165.593017578125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "c6dxhfi5rb" + label = null + node_type = "EVAL" + properties = jsonencode({ + "45rd8ajb4g" = { + value = "anyTriggersFalse" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1484.4927978515625 + y = 2009.735107421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "cb42qgfnjd" + label = null + node_type = "EVAL" + properties = jsonencode({ + "43e7ccsg4e" = { + value = "anyTriggersFalse" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1484.4927978515625 + y = 1854.6544189453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "dpv60nrlu4" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1148.4844970703125 + y = 2164.81591796875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "e9gg1lr1db" + label = "Evaluator" + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1857.816650390625 + y = 604.7674560546875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "efiecys0xw" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 450 + y = 390 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "fvt3dt1sk1" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1148.4844970703125 + y = 2009.735107421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "fwpzd4lh0q" + label = "Evaluator" + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2602.254150390625 + y = 975.8452758789062 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "gmbeads147" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 470.85662841796875 + y = 1354.72119140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "hhnj8v9hed" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 450.6211242675781 + y = 2526.6708984375 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "kh69z64byb" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2602.254150390625 + y = 867.4180297851562 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "lu3t9lz7j" + label = "Evaluator" + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1541.880615234375 + y = 1464.56982421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "miwpvke4ky" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 812.4762573242188 + y = 2733.4453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "o5huuauebn" + label = "Evaluator" + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1148.4844970703125 + y = 2319.896728515625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "q3ibsmt4qr" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2602.254150390625 + y = 1057.165771484375 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "qy6uai4d4r" + label = "Evaluator" + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1528.8748779296875 + y = 503.5545959472656 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "r8nxemp506" + label = "Evaluator" + node_type = "EVAL" + properties = jsonencode({ + ev94io1fpf = { + value = "anyTriggersFalse" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2186.758544921875 + y = 503.5545959472656 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "rxrwt223m5" + label = null + node_type = "EVAL" + properties = jsonencode({ + ls0q7pxpla = { + value = "anyTriggersFalse" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 820.3848876953125 + y = 377.0385437011719 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "sjedcfzfgi" + label = null + node_type = "EVAL" + properties = jsonencode({ + srhu2uexj1 = { + value = "anyTriggersFalse" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 754.494140625 + y = 869.297607421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "to6mgd2tyh" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 424.77435302734375 + y = 1854.6544189453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "vbk955oxjg" + label = null + node_type = "EVAL" + properties = jsonencode({ + "8sttri4np9" = { + value = "allTriggersComplete" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1101.8365478515625 + y = 869.297607421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "wxyu359jnv" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1541.880615234375 + y = 1354.72119140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "xytgoh995y" + label = "Evaluator" + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1541.880615234375 + y = 1546.956298828125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "zmy34kmwpn" + label = "Evaluator" + node_type = "EVAL" + properties = jsonencode({ + "7ujaohyyg9" = { + value = "anyTriggersFalse" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 812.4762573242188 + y = 2526.6708984375 + } + removed = false + selectable = true + selected = false + }, + ] + } + max_zoom = 100000000000000000000000000000000000000000000000000 + min_zoom = 0.00000000000000000000000000000000000000000000000001 + pan = { + x = 0 + y = 0 + } + panning_enabled = true + renderer = jsonencode({ + name = "null" + }) + user_panning_enabled = true + user_zooming_enabled = true + zoom = 1 + zooming_enabled = true + } + input_schema = [ + { + description = null + is_expanded = true + preferred_control_type = "textField" + preferred_data_type = "object" + property_name = "flowParameters" + required = null + }, + ] + name = "%[2]s OOTB - Device Management - Main Flow" + output_schema = null + settings = { + csp = "worker-src 'self' blob:; script-src 'self' https://cdn.jsdelivr.net https://code.jquery.com https://devsdk.singularkey.com http://cdnjs.cloudflare.com 'unsafe-inline' 'unsafe-eval';" + css = null + css_links = ["https://assets.pingone.com/ux/astro-nano/0.1.0-alpha.7/icons.css", "https://assets.pingone.com/ux/end-user-nano/0.1.0-alpha.1/end-user-nano.css"] + custom_error_screen_brand_logo_url = null + custom_error_show_footer = null + custom_favicon_link = null + custom_logo_urlselection = null + custom_title = null + default_error_screen_brand_logo = null + flow_http_timeout_in_seconds = null + flow_timeout_in_seconds = null + intermediate_loading_screen_css = null + intermediate_loading_screen_html = null + js_custom_flow_player = null + js_links = null + log_level = 2 + require_authentication_to_initiate = null + scrub_sensitive_info = null + sensitive_info_fields = null + use_csp = null + use_custom_css = true + use_custom_flow_player = null + use_custom_script = null + use_intermediate_loading_screen = null + validate_on_save = null + } + trigger = null +} diff --git a/internal/acctest/testhcl/pingone_davinci_flow/ootb_device_management_reordered.tf b/internal/acctest/testhcl/pingone_davinci_flow/ootb_device_management_reordered.tf new file mode 100644 index 000000000..e196cf621 --- /dev/null +++ b/internal/acctest/testhcl/pingone_davinci_flow/ootb_device_management_reordered.tf @@ -0,0 +1,4810 @@ + + %[1]s + +resource "pingone_davinci_flow" "%[2]s" { + color = "#CACED3" + description = "Imported on Fri Jan 10 2025 20:29:32 GMT+0000 (Coordinated Universal Time)" + environment_id = data.pingone_environment.general_test.id + graph_data = { + box_selection_enabled = true + elements = { + edges = [ + { + classes = null + data = { + id = "1qrl4o3wrp" + source = "efiecys0xw" + target = "7rwri5u6ra" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "09oyswslga" + source = "ebzcromrpm" + target = "to6mgd2tyh" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "1r7pq42jkr" + source = "fvt3dt1sk1" + target = "v9xx0rido4" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "1sb6nj0e17" + source = "pthery4nru" + target = "1lngxsfyuk" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "1z1rqsjsrz" + source = "17n6cajfer" + target = "odx7hiwkjx" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "2juqzc8h6j" + source = "3jsczqq7hm" + target = "bpuhlgwdhe" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "24sd7t2lsx" + source = "mr62wpbo3z" + target = "cb42qgfnjd" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "2tskkz0r8c" + source = "088nn24g3r" + target = "zekirrx0pv" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "38dq0izpjk" + source = "v9xx0rido4" + target = "c6dxhfi5rb" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "3jrqdc3903" + source = "0jgff1lx32" + target = "gz9gke603k" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "4lx314pj2q" + source = "fwpzd4lh0q" + target = "eevgv227kt" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "32093ynmwn" + source = "rxrwt223m5" + target = "rsj0knmukp" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "7o72b2gojg" + source = "d915blmeth" + target = "17n6cajfer" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "7wcpu7sber" + source = "e9gg1lr1db" + target = "b3jh5zpngp" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "855u11aqp2" + source = "vp8o2mc12q" + target = "dpv60nrlu4" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 132 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "9ek9b40eer" + source = "7rwri5u6ra" + target = "rxrwt223m5" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "9kfx52xciv" + source = "8sttri4np9" + target = "4os42modvj" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "a0x8ewnynu" + source = "pks46w5ks6" + target = "4wqs0nbs1v" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "a11x5pmwza" + source = "4i8hh3qp83" + target = "sjedcfzfgi" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "a9kvy2cmvu" + source = "to6mgd2tyh" + target = "j4l954l5hz" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "accd4yeefv" + source = "lu3t9lz7j" + target = "3qniq7ika1" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "ak2xsw06u8" + source = "61gkn04fvn" + target = "gmbeads147" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "b8n04pie3j" + source = "0mbvscfh8v" + target = "mr62wpbo3z" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "bnhd9l9a03" + source = "gz9gke603k" + target = "fwpzd4lh0q" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 92 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "bnolwt0cu4" + source = "6rcgg8opng" + target = "fzdgjjow89" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "c3ka45y0dh" + source = "4wqs0nbs1v" + target = "kdfb05yf1m" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "d1yhcdzm32" + source = "sjedcfzfgi" + target = "srhu2uexj1" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "e0tlpa5alh" + source = "xz5zj0bo0z" + target = "wxyu359jnv" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 52 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "e3bnpb5ulh" + source = "j6pgj7seov" + target = "2x2le9q98" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 52 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "eo0cz2wpe7" + source = "9pekqghawg" + target = "5mes9ynjey" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "es4tlou0aw" + source = "3jsczqq7hm" + target = "o925yy0p7r" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "ft7jetjjfc" + source = "xz5zj0bo0z" + target = "xytgoh995y" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 132 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "g09fttujco" + source = "qy6uai4d4r" + target = "j6pgj7seov" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "ghwmqlw3wq" + source = "vp8o2mc12q" + target = "o5huuauebn" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 172 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "gj08idiyg" + source = "vbk955oxjg" + target = "8sttri4np9" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "gnixex6cnk" + source = "sjedcfzfgi" + target = "lxdqcv1aa7" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "gt4oogvepx" + source = "lxdqcv1aa7" + target = "vbk955oxjg" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "ihlnks4x0o" + source = "umf4ie39n" + target = "efiecys0xw" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "jviqynfkje" + source = "o5huuauebn" + target = "u04j1zkybt" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "k02nrj9k19" + source = "xz5zj0bo0z" + target = "lu3t9lz7j" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 92 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "kfllp9ilse" + source = "921411zeq1" + target = "6nafzw7by5" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "kl6bq841px" + source = "921411zeq1" + target = "qcqgec2dmb" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "kxia34491z" + source = "c6dxhfi5rb" + target = "45rd8ajb4g" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "l4u3fgrqac" + source = "up4jkblnks" + target = "r8nxemp506" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "la070a955c" + source = "at5tmglpow" + target = "6rcgg8opng" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "ljrakf04za" + source = "xytgoh995y" + target = "erir79d26y" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "lmgbtmj39l" + source = "gz9gke603k" + target = "ako0e9ds26" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 172 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "lw4jd86e7i" + source = "vp8o2mc12q" + target = "fvt3dt1sk1" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 92 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "lxakz97582" + source = "vp8o2mc12q" + target = "0mbvscfh8v" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 52 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "m2o1ulgs9n" + source = "ako0e9ds26" + target = "5b5ckjqcix" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "mb0utgb1nz" + source = "c6dxhfi5rb" + target = "vlfgac0ix0" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "meu1jf6cvl" + source = "rsj0knmukp" + target = "3jsczqq7hm" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "mrw4n9jkit" + source = "5mes9ynjey" + target = "4i8hh3qp83" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "my92qzqw11" + source = "cb42qgfnjd" + target = "43e7ccsg4e" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "n11rh40evf" + source = "rxrwt223m5" + target = "ls0q7pxpla" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "naloj37euk" + source = "fzdgjjow89" + target = "miwpvke4ky" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "npt7qqxi0z" + source = "j6pgj7seov" + target = "e9gg1lr1db" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 92 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "nvvjihobpc" + source = "kh69z64byb" + target = "zvpx8o3npf" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "ny8c9yfuha" + source = "j4l954l5hz" + target = "2tif2w7s85" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "o1eyim62ka" + source = "2tif2w7s85" + target = "vp8o2mc12q" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "ogz64vp18p" + source = "cb42qgfnjd" + target = "wmy2hwaazd" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "oiujwsnzbl" + source = "17n6cajfer" + target = "xz5zj0bo0z" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "q9zo0rw062" + source = "wxyu359jnv" + target = "9jl5ynfchd" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "qilmoc436k" + source = "o925yy0p7r" + target = "qy6uai4d4r" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "rv1hpt8qzi" + source = "2x2le9q98" + target = "up4jkblnks" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "s3vrnhlmlj" + source = "hhnj8v9hed" + target = "m0gjea9ddr" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "sfxw16xw0p" + source = "2dvdm35xe5" + target = "hhnj8v9hed" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "ueu4z7bda9" + source = "gz9gke603k" + target = "q3ibsmt4qr" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 132 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "v20mnlg22t" + source = "m0gjea9ddr" + target = "zmy34kmwpn" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "vciqs9y7up" + source = "4os42modvj" + target = "pks46w5ks6" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "vjrohwhee2" + source = "gz9gke603k" + target = "kh69z64byb" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 64 + y = 52 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "vksnw90hoa" + source = "dpv60nrlu4" + target = "powjrjqmwn" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "vlot9c91qm" + source = "r8nxemp506" + target = "ev94io1fpf" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "w39uo9z927" + source = "1lngxsfyuk" + target = "d915blmeth" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "w8gmwksqtk" + source = "5b5ckjqcix" + target = "088nn24g3r" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "wcyhj4snq3" + source = "powjrjqmwn" + target = "921411zeq1" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "zyhdj85h4r" + source = "gmbeads147" + target = "pthery4nru" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "wj6t462l9t" + source = "zmy34kmwpn" + target = "7ujaohyyg9" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "xjil07au7c" + source = "r8nxemp506" + target = "6p1jps948p" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "xo3ag6n91l" + source = "miwpvke4ky" + target = "yaorwpte52" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "y920f1fj02" + source = "kdfb05yf1m" + target = "0jgff1lx32" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + id = "ygobg33efv" + source = "q3ibsmt4qr" + target = "5p3ahp4peh" + } + grabbable = true + group = "edges" + locked = false + pannable = true + position = { + x = 0 + y = 0 + } + removed = false + selectable = true + selected = false + }, + ] + nodes = [ + { + classes = null + data = { + capability_name = "AEqualsMultipleB" + connector_id = "functionsConnector" + id = "gz9gke603k" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + leftValueA = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"http.svg\",\n \"url\": \"buttonValue\",\n \"data\": \"{{local.kdfb05yf1m.payload.output.buttonValue}}\",\n \"tooltip\": \"{{local.kdfb05yf1m.payload.output.buttonValue}}\",\n \"children\": [\n {\n \"text\": \"buttonValue\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "User Selection" + } + rightValueMultiple = { + value = [{ + id = "dxjv90ff8t" + value = "[\n {\n \"children\": [\n {\n \"text\": \"ADD\"\n }\n ]\n }\n]" + }, { + id = "soa9lp6bnh" + value = "[\n {\n \"children\": [\n {\n \"text\": \"DONE\"\n }\n ]\n }\n]" + }, { + id = "4kqpgp5gmr" + value = "[\n {\n \"children\": [\n {\n \"text\": \"CANCEL\"\n }\n ]\n }\n]" + }] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2439.61328125 + y = 867.4180297851562 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "AEqualsMultipleB" + connector_id = "functionsConnector" + id = "j6pgj7seov" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + leftValueA = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"http.svg\",\n \"url\": \"buttonValue\",\n \"data\": \"{{local.o925yy0p7r.payload.output.buttonValue}}\",\n \"tooltip\": \"{{local.o925yy0p7r.payload.output.buttonValue}}\",\n \"children\": [\n {\n \"text\": \"buttonValue\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "MFA Form Selection" + } + rightValueMultiple = { + value = [{ + id = "p7mds1605b" + value = "[\n {\n \"children\": [\n {\n \"text\": \"NEXT\"\n }\n ]\n }\n]" + }, { + id = "p8uz28a5f7" + value = "[\n {\n \"children\": [\n {\n \"text\": \"CANCEL\"\n }\n ]\n }\n]" + }] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1705.9974365234375 + y = 503.5545959472656 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "AEqualsB" + connector_id = "functionsConnector" + id = "rsj0knmukp" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + leftValueA = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"mfaEnabled\",\n \"data\": \"{{local.7rwri5u6ra.payload.output.matchedUser.mfaEnabled}}\",\n \"tooltip\": \"{{local.7rwri5u6ra.payload.output.matchedUser.mfaEnabled}}\",\n \"children\": [\n {\n \"text\": \"mfaEnabled\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "Check If MFA Is enabled?" + } + rightValueB = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"true\"\n }\n ]\n }\n]" + } + type = { + value = "boolean" + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 997.5073852539062 + y = 377.0385437011719 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "AEqualsMultipleB" + connector_id = "functionsConnector" + id = "vp8o2mc12q" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + leftValueA = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"http.svg\",\n \"url\": \"buttonValue\",\n \"data\": \"{{local.j4l954l5hz.payload.output.buttonValue}}\",\n \"tooltip\": \"{{local.j4l954l5hz.payload.output.buttonValue}}\",\n \"children\": [\n {\n \"text\": \"buttonValue\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "Selected Device Screen Selection" + } + rightValueMultiple = { + value = [{ + id = "u1406iqbss" + value = "[\n {\n \"children\": [\n {\n \"text\": \"save\"\n }\n ]\n }\n]" + }, { + id = "cjzqrymiha" + value = "[\n {\n \"children\": [\n {\n \"text\": \"default\"\n }\n ]\n }\n]" + }, { + id = "ksteonmet4" + value = "[\n {\n \"children\": [\n {\n \"text\": \"remove\"\n }\n ]\n }\n]" + }, { + id = "sa7249yx4z" + value = "[\n {\n \"children\": [\n {\n \"text\": \"cancel\"\n }\n ]\n }\n]" + }] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 967.5570068359375 + y = 1854.6544189453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "AEqualsMultipleB" + connector_id = "functionsConnector" + id = "xz5zj0bo0z" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + leftValueA = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"flow-connector.svg\",\n \"url\": \"ciam_subflowResult\",\n \"data\": \"{{local.d915blmeth.payload.output.ciam_subflowResult}}\",\n \"tooltip\": \"{{local.d915blmeth.payload.output.ciam_subflowResult}}\",\n \"children\": [\n {\n \"text\": \"ciam_subflowResult\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "Device Registration Result" + } + rightValueB = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"PASSWORD\"\n }\n ]\n }\n]" + } + rightValueMultiple = { + value = [{ + id = "nvvspv2htd" + value = "[\n {\n \"children\": [\n {\n \"text\": \"SUCCESS\"\n }\n ]\n }\n]" + }, { + id = "joif3l174h" + value = "[\n {\n \"children\": [\n {\n \"text\": \"PASSWORD\"\n }\n ]\n }\n]" + }, { + id = "dgnzdl3n06" + value = "[\n {\n \"children\": [\n {\n \"text\": \"CANCEL\"\n }\n ]\n }\n]" + }] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1349.6455078125 + y = 1354.72119140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "createSuccessResponse" + connector_id = "httpConnector" + id = "m0gjea9ddr" + label = "Http" + node_type = "CONNECTION" + properties = jsonencode({ + backgroundColor = { + value = "#9dc967ff" + } + nodeTitle = { + value = "Return Success Response" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 631.5487060546875 + y = 2526.6708984375 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "createSuccessResponse" + connector_id = "httpConnector" + id = "yaorwpte52" + label = "Http" + node_type = "CONNECTION" + properties = jsonencode({ + backgroundColor = { + value = "#ffc8c1ff" + } + nodeTitle = { + value = "Send Response" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 960 + y = 2730 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "customFunction" + connector_id = "functionsConnector" + id = "5b5ckjqcix" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + code = { + value = "module.exports = a = async ({ params }) => {\n\tvar devices = JSON.parse(params.devices);\n\n\tvar selectedDevice = devices.filter(device => {\n\t\treturn device.id == params.selectedDeviceId;\n\t});\n\n\tvar isDefault = devices[0].id === params.selectedDeviceId;\n\n\tvar nickname = selectedDevice[0].nickname;\n\n\tvar applicationName = selectedDevice[0].application ? selectedDevice[0].application.nativeName : \"\";\n\n\tvar marketingName = selectedDevice[0].model ? selectedDevice[0].model.marketingName : \"\";\n\n\treturn {\n\t\ttype: selectedDevice[0].type,\n\t\temail: selectedDevice[0].email,\n\t\tphone: selectedDevice[0].phone,\n\t\tdisplayName: selectedDevice[0].displayName,\n\t\tisDefault,\n\t\tnickname,\n\t\tapplicationName,\n\t\tmarketingName\n\t};\n}" + } + nodeTitle = { + value = "Get Device Info" + } + outputSchema = { + value = "{\n\t\"output\": {\n\t\t\"type\": \"object\",\n\t\t\"properties\": {\n\t\t\t\"type\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t},\n\t\t\t\"email\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t},\n\t\t\t\"phone\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t},\n\t\t\t\"displayName\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t},\n\t\t\t\"isDefault\": {\n\t\t\t\t\"type\": \"boolean\"\n\t\t\t},\n\t\t\t\"nickname\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t},\n\t\t\t\"applicationName\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t},\n\t\t\t\"marketingName\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t}\n\t}\n}" + } + variableInputList = { + value = [{ + name = "devices" + preferredDataType = "string" + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"devices\",\n \"data\": \"{{local.4i8hh3qp83.payload.output.rawResponse._embedded.devices}}\",\n \"tooltip\": \"{{local.4i8hh3qp83.payload.output.rawResponse._embedded.devices}}\",\n \"children\": [\n {\n \"text\": \"devices\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + }, { + name = "selectedDeviceId" + preferredDataType = "string" + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"http.svg\",\n \"url\": \"buttonValue\",\n \"data\": \"{{local.kdfb05yf1m.payload.output.buttonValue}}\",\n \"tooltip\": \"{{local.kdfb05yf1m.payload.output.buttonValue}}\",\n \"children\": [\n {\n \"text\": \"buttonValue\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + }] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2764.89501953125 + y = 1165.593017578125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "customFunction" + connector_id = "functionsConnector" + id = "8sttri4np9" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + code = { + value = "// Write your code here\n// Supported language: Javascript \nmodule.exports = a = async ({params}) => {\n\tconst deviceRemovalWarning = params.size < 2\n\treturn {'deviceRemovalWarning': deviceRemovalWarning}\n}" + } + nodeTitle = { + value = "Check If Device Removal Warning Is Needed" + } + outputSchema = { + value = "{\n\t\"output\": {\n\t\t\"type\": \"object\",\n\t\t\"properties\": {\n\t\t\t\"deviceRemovalWarning\": {\n\t\t\t\t\"type\": \"boolean\"\n\t\t\t}\n\t\t}\n\t}\n}" + } + variableInputList = { + value = [{ + name = "size" + preferredDataType = "string" + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"size\",\n \"data\": \"{{local.4i8hh3qp83.payload.output.rawResponse.size}}\",\n \"tooltip\": \"{{local.4i8hh3qp83.payload.output.rawResponse.size}}\",\n \"children\": [\n {\n \"text\": \"size\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + }] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1325.1280517578125 + y = 869.297607421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "customFunction" + connector_id = "functionsConnector" + id = "pks46w5ks6" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + code = { + value = "module.exports = a = async ({ params }) => {\n var usableDevices = JSON.parse(params.devices);\n\n const allowedDeviceTypes = params.allowedDeviceTypes ? params.allowedDeviceTypes.split(\",\") : [];\n\n usableDevices = usableDevices.filter(device => {\n return allowedDeviceTypes.includes(device.type);\n });\n\n usableDevices = JSON.stringify(usableDevices);\n\n return { usableDevices: usableDevices };\n}" + } + nodeTitle = { + value = "Filter Unusable Devices" + } + outputSchema = { + value = "{\n \"output\": {\n \"type\": \"object\",\n \"properties\": {\n \"usableDevices\": {\n \"type\": \"string\"\n }\n }\n }\n}" + } + variableInputList = { + value = [{ + name = "devices" + preferredDataType = "string" + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"devices\",\n \"data\": \"{{local.4i8hh3qp83.payload.output.rawResponse._embedded.devices}}\",\n \"tooltip\": \"{{local.4i8hh3qp83.payload.output.rawResponse._embedded.devices}}\",\n \"children\": [\n {\n \"text\": \"devices\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + }, { + name = "allowedDeviceTypes" + preferredDataType = "string" + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.9pekqghawg.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.9pekqghawg.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + }] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1707.729248046875 + y = 867.4180297851562 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "ALessThanB" + connector_id = "functionsConnector" + id = "lxdqcv1aa7" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + leftValueA = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"size\",\n \"data\": \"{{local.4i8hh3qp83.payload.output.rawResponse.size}}\",\n \"tooltip\": \"{{local.4i8hh3qp83.payload.output.rawResponse.size}}\",\n \"children\": [\n {\n \"text\": \"size\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "Check If User Can Add New Device" + } + rightValueB = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"maxAllowedDevices\",\n \"data\": \"{{local.4i8hh3qp83.payload.output.mfaSettings.pairing.maxAllowedDevices}}\",\n \"tooltip\": \"{{local.4i8hh3qp83.payload.output.mfaSettings.pairing.maxAllowedDevices}}\",\n \"children\": [\n {\n \"text\": \"maxAllowedDevices\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + type = { + value = "number" + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 977.7857055664062 + y = 869.297607421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "customFunction" + connector_id = "functionsConnector" + id = "umf4ie39n" + label = "Functions" + node_type = "CONNECTION" + properties = jsonencode({ + code = { + value = "// Write your code here\n// Supported language: Javascript \nmodule.exports = a = async ({params}) => {\n\tconst results = {};\n\n\tconst selectValue = (parameterValue, companyValue) => {\n\t\tif (params.flowParameters === undefined || parameterValue === undefined) {\n\t\t\treturn companyValue;\n\t\t}\n\n\t\treturn parameterValue === \"true\";\n\t};\n\n\tresults[\"username\"] = params.flowParameters.username;\n\n\t// allowed device types\n\tconst isEmailOTPEnabled = selectValue(params.flowParameters.isEmailOTPEnabled, params.ciam_emailOtpEnabled);\n\tconst isFidoPasskeyEnabled = selectValue(params.flowParameters.isFidoPasskeyEnabled, params.ciam_fidoPasskeyEnabled);\n\tconst isSmsOTPEnabled = selectValue(params.flowParameters.isSmsOTPEnabled, params.ciam_smsOtpEnabled);\t\n\n\tconst devices = [];\n\tif (isEmailOTPEnabled) {\n\t\tdevices.push(\"EMAIL\");\n\t};\n\tif (isFidoPasskeyEnabled) {\n\t\tdevices.push(\"FIDO2\");\n\t};\n\tif (isSmsOTPEnabled) {\n\t\tdevices.push(\"SMS\");\n\t};\n\n\tresults[\"flowAllowedDeviceTypes\"] = devices.join(\",\");\n\n\treturn { ...results };\n}" + } + nodeTitle = { + value = "Set Flow Variables" + } + outputSchema = { + value = "{\n\t\"output\": {\n\t\t\"type\": \"object\",\n\t\t\"properties\": {\n\t\t\t\"username\": {\n\t\t\t\t\"type\": \"boolean\"\n\t\t\t},\n\t\t\t\"flowAllowedDeviceTypes\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t}\n\t}\n}" + } + variableInputList = { + value = [{ + name = "flowParameters" + preferredDataType = "object" + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"auth.svg\",\n \"url\": \"flowParameters\",\n \"data\": \"{{global.parameters.flowParameters}}\",\n \"tooltip\": \"{{global.parameters.flowParameters}}\",\n \"children\": [\n {\n \"text\": \"flowParameters\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + }, { + name = "ciam_smsOtpEnabled" + preferredDataType = "boolean" + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"variable.svg\",\n \"url\": \"ciam_smsOtpEnabled\",\n \"data\": \"{{global.company.variables.ciam_smsOtpEnabled}}\",\n \"tooltip\": \"{{global.company.variables.ciam_smsOtpEnabled}}\",\n \"children\": [\n {\n \"text\": \"ciam_smsOtpEnabled\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + }, { + name = "ciam_fidoPasskeyEnabled" + preferredDataType = "boolean" + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"variable.svg\",\n \"url\": \"ciam_fidoPasskeyEnabled\",\n \"data\": \"{{global.company.variables.ciam_fidoPasskeyEnabled}}\",\n \"tooltip\": \"{{global.company.variables.ciam_fidoPasskeyEnabled}}\",\n \"children\": [\n {\n \"text\": \"ciam_fidoPasskeyEnabled\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + }, { + name = "ciam_emailOtpEnabled" + preferredDataType = "boolean" + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"variable.svg\",\n \"url\": \"ciam_emailOtpEnabled\",\n \"data\": \"{{global.company.variables.ciam_emailOtpEnabled}}\",\n \"tooltip\": \"{{global.company.variables.ciam_emailOtpEnabled}}\",\n \"children\": [\n {\n \"text\": \"ciam_emailOtpEnabled\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + }] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 300 + y = 390 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "customHTMLTemplate" + connector_id = "httpConnector" + id = "fzdgjjow89" + label = "Http" + node_type = "CONNECTION" + properties = jsonencode({ + customHTML = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\\n\\t
\\n\\t\\t
\\n\\t\\t\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t

Error

\\n\\t\\t\\t\\t

\\n\\t\\t\\t\\t\\t\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"errorMessage\",\n \"data\": \"{{local.at5tmglpow.payload.output.errorMessage}}\",\n \"tooltip\": \"{{local.at5tmglpow.payload.output.errorMessage}}\",\n \"children\": [\n {\n \"text\": \"errorMessage\"\n }\n ]\n },\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\\n\\t\\t\\t\\t

\\n\\t\\t\\t\\t\\n\\t\\t\\t
\\n\\t\\t
\\n\\t
\\n\"\n }\n ]\n }\n]" + } + formFieldsList = { + value = [{ + preferredControlType = "textField" + preferredDataType = "string" + propertyName = "buttonValue" + }] + } + nodeTitle = { + value = "Error Screen" + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 631.5487060546875 + y = 2733.4453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "customHTMLTemplate" + connector_id = "httpConnector" + id = "j4l954l5hz" + label = "HTTP" + node_type = "CONNECTION" + properties = jsonencode({ + FIDO2DisplayName = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"variable.svg\",\n \"url\": \"FIDO2DisplayName\",\n \"data\": \"{{global.variables.FIDO2DisplayName}}\",\n \"tooltip\": \"{{global.variables.FIDO2DisplayName}}\",\n \"children\": [\n {\n \"text\": \"FIDO2DisplayName\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + customCSS = { + value = "" + } + customHTML = { + value = "\n
\n
\n
\n
\n
\n
\n

\n Edit method\n

\n
\n

\n {{#with device}}\n
\n {{#ifEquals type \"SMS\"}}\n \n
\n
\n {{#if nickname}}\n {{nickname}}\n {{else}}\n Text message\n {{/if}}\n
\n
\n
\n {{/ifEquals}}\n\n {{#ifEquals type \"EMAIL\"}}\n \n
\n
\n {{#if nickname}}\n {{nickname}}\n {{else}}\n Email\n {{/if}}\n
\n
\n
\n {{/ifEquals}}\n\n {{#ifEquals type \"FIDO2\"}}\n \n \n \n \n \n
\n {{#if nickname}}\n {{nickname}}\n {{else}}\n Biometrics/Security Key\n {{/if}}\n
\n {{/ifEquals}}\n
\n\n
\n \n \n
\n\n
\n \n \n {{#unless isDefault}}\n \n {{/unless}}\n \n \n
\n {{/with}}\n
\n
\n
\n
\n" + } + customScript = { + value = "const renameButton = document.getElementById(\"renameButton\");\n\nconst showRenameField = () => {\n // Remove rename button\n renameButton.classList.add(\"d-sm-none\");\n\n const renameField = document.getElementById(\"renameField\");\n const deviceLabelField = document.querySelector(\".text-primary\");\n const deviceName = deviceLabelField.textContent.trim();\n // Set device name to input value\n renameField.querySelector(\"input\").value = deviceName;\n // Show input instead of label\n deviceLabelField.replaceWith(renameField);\n renameField.classList.remove(\"d-sm-none\");\n\n // Show save buttin\n const saveButton = document.getElementById(\"save\");\n saveButton.classList.remove(\"d-sm-none\");\n};\n\nrenameButton.addEventListener(\"click\", showRenameField);\n" + } + device = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"deviceInfo\",\n \"data\": \"{{local.ebzcromrpm.payload.output.deviceInfo}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.deviceInfo}}\",\n \"children\": [\n {\n \"text\": \"deviceInfo\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + formFieldsList = { + value = [{ + preferredControlType = "textField" + preferredDataType = "string" + propertyName = "buttonValue" + }, { + hashedVisibility = false + preferredControlType = "textField" + preferredDataType = "string" + propertyName = "nickname" + value = "" + }] + } + inputSchema = { + value = "{\n \"type\": \"object\",\n \"properties\": {\n \"device\": {\n \"preferedControlType\": \"textField\",\n \"enableParameters\": true\n }\n }\n}" + } + nodeTitle = { + value = "Selected Device Screen" + } + outputSchema = { + value = {} + } + validationRules = { + value = [] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 631.5487060546875 + y = 1854.6544189453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "customHTMLTemplate" + connector_id = "httpConnector" + id = "kdfb05yf1m" + label = "Http" + node_type = "CONNECTION" + properties = jsonencode({ + customCSS = { + value = "[id^=\"mfa-type-list-button\"] div {\n flex: 1;\n}" + } + canAddNewMethod = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"functions.svg\",\n \"url\": \"success\",\n \"data\": \"{{local.lxdqcv1aa7.payload.success}}\",\n \"tooltip\": \"{{local.lxdqcv1aa7.payload.success}}\",\n \"children\": [\n {\n \"text\": \"success\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + customHTML = { + value = "\n
\n
\n
\n
\n
\n
\n
\n

Your authentication methods

\n {{#if successMessage}}\n

{{successMessage}}

\n {{/if}}\n {{#if deviceRemovalWarning}}\n

\n Removing all authentication methods could prevent you from signing on to your account.\n

\n {{/if}}\n

\n
\n
\n {{#each devices}}\n {{#ifEquals type \"SMS\"}}\n \n {{/ifEquals}}\n {{#ifEquals type \"EMAIL\"}}\n \n {{/ifEquals}}\n {{#ifEquals type \"FIDO2\"}}\n \n {{/ifEquals}}\n {{/each}}\n
\n
\n {{#if canAddNewMethod}}\n \n {{/if}}\n {{#unless successMessage}}\n \n {{else}}\n \n {{/unless}}\n
\n
\n
\n
\n \n" + } + customScript = { + value = "document.onclick = function(e) {\n const divToHide = document.getElementById(\"successMessage\")\n if (divToHide != null) {\n divToHide.style.display = \"none\";\n }\n}\n" + } + deviceRemovalWarning = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"functions.svg\",\n \"url\": \"deviceRemovalWarning\",\n \"data\": \"{{local.8sttri4np9.payload.output.deviceRemovalWarning}}\",\n \"tooltip\": \"{{local.8sttri4np9.payload.output.deviceRemovalWarning}}\",\n \"children\": [\n {\n \"text\": \"deviceRemovalWarning\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + devices = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"functions.svg\",\n \"url\": \"usableDevices\",\n \"data\": \"{{local.pks46w5ks6.payload.output.usableDevices}}\",\n \"tooltip\": \"{{local.pks46w5ks6.payload.output.usableDevices}}\",\n \"children\": [\n {\n \"text\": \"usableDevices\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + formFieldsList = { + value = [{ + hashedVisibility = false + preferredControlType = "textField" + preferredDataType = "string" + propertyName = "buttonValue" + value = "" + }] + } + inputSchema = { + value = "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"devices\":{\n\t\t\t\"type\":\"array\"\n\t\t},\n\t\t\"canAddNewMethod\":{\n\t\t\t\"type\":\"boolean\"\n\t\t},\n\t\t\"successMessage\":{\n\t\t\t\"type\":\"string\"\n\t\t},\n\t\t\"deviceRemovalWarning\":{\n\t\t\t\"type\":\"boolean\"\n\t\t}\n\t}\n}" + } + nodeTitle = { + value = "Display User Devices" + } + outputSchema = { + value = {} + } + successMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"successMessage\",\n \"data\": \"{{local.9pekqghawg.payload.output.successMessage}}\",\n \"tooltip\": \"{{local.9pekqghawg.payload.output.successMessage}}\",\n \"children\": [\n {\n \"text\": \"successMessage\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + undefined = { + value = null + } + validationRules = { + value = [] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2060.117919921875 + y = 867.4180297851562 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "customHTMLTemplate" + connector_id = "httpConnector" + id = "o925yy0p7r" + label = "Http" + node_type = "CONNECTION" + properties = jsonencode({ + customHTML = { + value = "\n
\n
\n
\n
\n
\n
\n

Enable Multi-Factor Authentication

\n

\n

\n Enable multi-factor authentication (MFA) for your account. With MFA enabled, you can sign on using any of the preferred passwordless methods available to you.\n

\n
\n
\n \n Next\n \n \n Cancel\n \n
\n
\n
\n
\n
\n" + } + nodeDescription = { + value = "Ask user to enable MFA" + } + formFieldsList = { + value = [{ + hashedVisibility = false + preferredControlType = "textField" + preferredDataType = "string" + propertyName = "buttonValue" + value = "" + }] + } + nodeTitle = { + value = "MFA Form" + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1351.75244140625 + y = 503.5545959472656 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "customHTMLTemplate" + connector_id = "httpConnector" + id = "pthery4nru" + label = "Http" + node_type = "CONNECTION" + properties = jsonencode({ + customCSS = {} + customHTML = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"
\\n\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"data\": \"[[[skcomponent###c2tjb21wb25lbnQgInNrcG9sbGluZyIgIGNsYXNzPSIiIHBvbGxJbnRlcnZhbD0iMTAiIHBvbGxSZXRyaWVzPSIxIiBwb2xsQ2hhbGxlbmdlU3RhdHVzPSJmYWxzZSI=###eyJuYW1lIjoic2twb2xsaW5nIiwib3B0aW9ucyI6eyJjbGFzcyI6IiIsInBvbGxJbnRlcnZhbCI6IjEwIiwicG9sbFJldHJpZXMiOiIxIiwicG9sbENoYWxsZW5nZVN0YXR1cyI6ImZhbHNlIn0sImNvbXBvbmVudFByb3BzIjp7ImNsYXNzIjp7Im5hbWUiOiJjbGFzcyIsImRpc3BsYXlOYW1lIjoiQ1NTIENsYXNzIn0sInBvbGxJbnRlcnZhbCI6eyJuYW1lIjoicG9sbEludGVydmFsIiwiZGlzcGxheU5hbWUiOiJQb2xsIEludGVydmFsIiwidmFsdWUiOjIwMDB9LCJwb2xsUmV0cmllcyI6eyJuYW1lIjoicG9sbFJldHJpZXMiLCJkaXNwbGF5TmFtZSI6IlBvbGwgUmV0cmllcyIsInZhbHVlIjo2MH0sInBvbGxDaGFsbGVuZ2VTdGF0dXMiOnsibmFtZSI6InBvbGxDaGFsbGVuZ2VTdGF0dXMiLCJkaXNwbGF5TmFtZSI6IlBvbGwgQ2hhbGxlbmdlIFN0YXR1cyIsInR5cGUiOiJzZWxlY3QiLCJ2YWx1ZSI6InRydWUiLCJvcHRpb25zIjpbeyJuYW1lIjoiVHJ1ZSIsInZhbHVlIjoidHJ1ZSJ9LHsibmFtZSI6IkZhbHNlIiwidmFsdWUiOiJmYWxzZSJ9XX19fQ==]]]\",\n \"src\": \"auth.svg\",\n \"url\": \"skpolling\",\n \"children\": [\n {\n \"text\": \"skpolling\"\n }\n ],\n \"component\": \"skpolling\",\n \"options\": {\n \"class\": \"\",\n \"pollInterval\": \"10\",\n \"pollRetries\": \"1\",\n \"pollChallengeStatus\": \"false\"\n },\n \"componentProps\": {\n \"class\": {\n \"name\": \"class\",\n \"displayName\": \"CSS Class\"\n },\n \"pollInterval\": {\n \"name\": \"pollInterval\",\n \"displayName\": \"Poll Interval\",\n \"value\": 2000\n },\n \"pollRetries\": {\n \"name\": \"pollRetries\",\n \"displayName\": \"Poll Retries\",\n \"value\": 60\n },\n \"pollChallengeStatus\": {\n \"name\": \"pollChallengeStatus\",\n \"displayName\": \"Poll Challenge Status\",\n \"type\": \"select\",\n \"value\": \"true\",\n \"options\": [\n {\n \"name\": \"True\",\n \"value\": \"true\"\n },\n {\n \"name\": \"False\",\n \"value\": \"false\"\n }\n ]\n }\n },\n \"tooltip\": \"{{component.skpolling}}\"\n },\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\\n
\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "NOP UI Page" + } + customScript = {} + formFieldsList = { + value = [] + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 635.6295166015625 + y = 1354.72119140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "deleteDevice" + connector_id = "pingOneMfaConnector" + id = "powjrjqmwn" + label = "PingOne MFA" + node_type = "CONNECTION" + properties = jsonencode({ + deviceId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"deviceId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.deviceId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.deviceId}}\",\n \"children\": [\n {\n \"text\": \"deviceId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "Delete Device" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1355.2589111328125 + y = 2164.81591796875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "3qniq7ika1" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + errorMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"Unexpected selection.\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "at5tmglpow" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1734.11572265625 + y = 1464.56982421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "43e7ccsg4e" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + errorCode = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"code\",\n \"data\": \"{{local.mr62wpbo3z.payload.error.code}}\",\n \"tooltip\": \"{{local.mr62wpbo3z.payload.error.code}}\",\n \"children\": [\n {\n \"text\": \"code\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + errorMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"message\",\n \"data\": \"{{local.mr62wpbo3z.payload.error.message}}\",\n \"tooltip\": \"{{local.mr62wpbo3z.payload.error.message}}\",\n \"children\": [\n {\n \"text\": \"message\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "at5tmglpow" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1691.2672119140625 + y = 1932.1947021484375 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "45rd8ajb4g" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + errorCode = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"code\",\n \"data\": \"{{local.v9xx0rido4.payload.error.code}}\",\n \"tooltip\": \"{{local.v9xx0rido4.payload.error.code}}\",\n \"children\": [\n {\n \"text\": \"code\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + errorMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"message\",\n \"data\": \"{{local.v9xx0rido4.payload.error.message}}\",\n \"tooltip\": \"{{local.v9xx0rido4.payload.error.message}}\",\n \"children\": [\n {\n \"text\": \"message\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "at5tmglpow" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1691.2672119140625 + y = 2087.275390625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "5p3ahp4peh" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + nodeInstanceId = { + value = "2dvdm35xe5" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2764.89501953125 + y = 1057.165771484375 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "6nafzw7by5" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + errorCode = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"code\",\n \"data\": \"{{local.powjrjqmwn.payload.error.code}}\",\n \"tooltip\": \"{{local.powjrjqmwn.payload.error.code}}\",\n \"children\": [\n {\n \"text\": \"code\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + errorMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"message\",\n \"data\": \"{{local.powjrjqmwn.payload.error.message}}\",\n \"tooltip\": \"{{local.powjrjqmwn.payload.error.message}}\",\n \"children\": [\n {\n \"text\": \"message\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "at5tmglpow" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1691.2672119140625 + y = 2242.356201171875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "6p1jps948p" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"functions.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.umf4ie39n.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.umf4ie39n.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "9pekqghawg" + } + successMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"MFA enabled.\"\n }\n ]\n }\n]" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"id\",\n \"data\": \"{{local.7rwri5u6ra.payload.output.matchedUser.id}}\",\n \"tooltip\": \"{{local.7rwri5u6ra.payload.output.matchedUser.id}}\",\n \"children\": [\n {\n \"text\": \"id\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2389.18408203125 + y = 503.5545959472656 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "7ujaohyyg9" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + errorMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"Failed to send success response.\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "at5tmglpow" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 967.5570068359375 + y = 2526.6708984375 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "9jl5ynfchd" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.61gkn04fvn.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.61gkn04fvn.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "9pekqghawg" + } + successMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"Registered new method.\"\n }\n ]\n }\n]" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.61gkn04fvn.payload.output.userId}}\",\n \"tooltip\": \"{{local.61gkn04fvn.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1734.11572265625 + y = 1354.72119140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "b3jh5zpngp" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + nodeInstanceId = { + value = "2dvdm35xe5" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2060.242431640625 + y = 604.7674560546875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "bpuhlgwdhe" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"functions.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.umf4ie39n.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.umf4ie39n.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "9pekqghawg" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"id\",\n \"data\": \"{{local.7rwri5u6ra.payload.output.matchedUser.id}}\",\n \"tooltip\": \"{{local.7rwri5u6ra.payload.output.matchedUser.id}}\",\n \"children\": [\n {\n \"text\": \"id\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1351.75244140625 + y = 377.0385437011719 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "eevgv227kt" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + nodeInstanceId = { + value = "2dvdm35xe5" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2764.89501953125 + y = 975.8452758789062 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "erir79d26y" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.61gkn04fvn.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.61gkn04fvn.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "9pekqghawg" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.61gkn04fvn.payload.output.userId}}\",\n \"tooltip\": \"{{local.61gkn04fvn.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1734.11572265625 + y = 1546.956298828125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "ev94io1fpf" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + errorCode = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"code\",\n \"data\": \"{{local.up4jkblnks.payload.error.code}}\",\n \"tooltip\": \"{{local.up4jkblnks.payload.error.code}}\",\n \"children\": [\n {\n \"text\": \"code\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + errorMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"message\",\n \"data\": \"{{local.up4jkblnks.payload.error.message}}\",\n \"tooltip\": \"{{local.up4jkblnks.payload.error.message}}\",\n \"children\": [\n {\n \"text\": \"message\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "at5tmglpow" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2389.18408203125 + y = 604.7674560546875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "ls0q7pxpla" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + errorCode = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"code\",\n \"data\": \"{{local.7rwri5u6ra.payload.error.code}}\",\n \"tooltip\": \"{{local.7rwri5u6ra.payload.error.code}}\",\n \"children\": [\n {\n \"text\": \"code\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + errorMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"message\",\n \"data\": \"{{local.7rwri5u6ra.payload.error.message}}\",\n \"tooltip\": \"{{local.7rwri5u6ra.payload.error.message}}\",\n \"children\": [\n {\n \"text\": \"message\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "at5tmglpow" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 997.5073852539062 + y = 503.5545959472656 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "odx7hiwkjx" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + errorMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"flow-connector.svg\",\n \"url\": \"ciam_errorMessage\",\n \"data\": \"{{local.d915blmeth.payload.output.ciam_errorMessage}}\",\n \"tooltip\": \"{{local.d915blmeth.payload.output.ciam_errorMessage}}\",\n \"children\": [\n {\n \"text\": \"ciam_errorMessage\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "at5tmglpow" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1349.6455078125 + y = 1629.3427734375 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "qcqgec2dmb" + label = "Node" + node_type = "CONNECTION" + properties = jsonencode({ + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.ebzcromrpm.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "9pekqghawg" + } + successMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"Method successfully removed.\"\n }\n ]\n }\n]" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1691.2672119140625 + y = 2164.81591796875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "srhu2uexj1" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + errorCode = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"code\",\n \"data\": \"{{local.4i8hh3qp83.payload.error.code}}\",\n \"tooltip\": \"{{local.4i8hh3qp83.payload.error.code}}\",\n \"children\": [\n {\n \"text\": \"code\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + errorMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"message\",\n \"data\": \"{{local.4i8hh3qp83.payload.error.message}}\",\n \"tooltip\": \"{{local.4i8hh3qp83.payload.error.message}}\",\n \"children\": [\n {\n \"text\": \"message\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "at5tmglpow" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 977.7857055664062 + y = 968.538330078125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "u04j1zkybt" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.ebzcromrpm.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "9pekqghawg" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1355.2589111328125 + y = 2319.896728515625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "vlfgac0ix0" + label = "Node" + node_type = "CONNECTION" + properties = jsonencode({ + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.ebzcromrpm.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "9pekqghawg" + } + successMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"Method set as default.\"\n }\n ]\n }\n]" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1691.2672119140625 + y = 2009.735107421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "wmy2hwaazd" + label = "Node" + node_type = "CONNECTION" + properties = jsonencode({ + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.ebzcromrpm.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "9pekqghawg" + } + successMessage = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"Method nickname saved.\"\n }\n ]\n }\n]" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1691.2672119140625 + y = 1854.6544189453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "zekirrx0pv" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + deviceId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"http.svg\",\n \"url\": \"buttonValue\",\n \"data\": \"{{local.kdfb05yf1m.payload.output.buttonValue}}\",\n \"tooltip\": \"{{local.kdfb05yf1m.payload.output.buttonValue}}\",\n \"children\": [\n {\n \"text\": \"buttonValue\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + deviceInfo = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"functions.svg\",\n \"url\": \"output\",\n \"data\": \"{{local.5b5ckjqcix.payload.output}}\",\n \"tooltip\": \"{{local.5b5ckjqcix.payload.output}}\",\n \"children\": [\n {\n \"text\": \"output\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.9pekqghawg.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.9pekqghawg.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "ebzcromrpm" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.9pekqghawg.payload.output.userId}}\",\n \"tooltip\": \"{{local.9pekqghawg.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 3090.1767578125 + y = 1165.593017578125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "goToNode" + connector_id = "nodeConnector" + id = "zvpx8o3npf" + label = "Node" + node_type = "CONNECTION" + properties = jsonencode({ + flowAllowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.9pekqghawg.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.9pekqghawg.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeInstanceId = { + value = "61gkn04fvn" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.9pekqghawg.payload.output.userId}}\",\n \"tooltip\": \"{{local.9pekqghawg.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2737.7880859375 + y = 867.4180297851562 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "readAllDevices" + connector_id = "pingOneMfaConnector" + id = "4i8hh3qp83" + label = "PingOne MFA" + node_type = "CONNECTION" + properties = jsonencode({ + deviceTypes = { + value = ["EMAIL", "SMS", "FIDO2"] + } + nodeTitle = { + value = "Get User Devices" + } + setFilterFlag = { + value = true + } + statusFilter = { + value = "ACTIVE" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.9pekqghawg.payload.output.userId}}\",\n \"tooltip\": \"{{local.9pekqghawg.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 630.4432983398438 + y = 869.297607421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "setDeviceOrder" + connector_id = "pingOneMfaConnector" + id = "v9xx0rido4" + label = "PingOne MFA" + node_type = "CONNECTION" + properties = jsonencode({ + defaultDeviceId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"deviceId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.deviceId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.deviceId}}\",\n \"children\": [\n {\n \"text\": \"deviceId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "Set Device As Default" + } + setDeviceOrder = { + value = "SET_DEFAULT_DEVICE" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1355.2589111328125 + y = 2009.735107421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "startNode" + connector_id = "nodeConnector" + id = "2dvdm35xe5" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + inputSchema = { + value = "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t}\n}" + } + nodeTitle = { + value = "Success" + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 321.3871765136719 + y = 2526.6708984375 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "startNode" + connector_id = "nodeConnector" + id = "61gkn04fvn" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + inputSchema = { + value = "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"userId\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"displayName\": \"userId\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"userId\"\n\t\t},\n\t\t\"flowAllowedDeviceTypes\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"displayName\": \"flowAllowedDeviceTypes\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"flowAllowedDeviceTypes\"\n\t\t}\n\t}\n}" + } + nodeTitle = { + value = "Register Device" + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 334 + y = 1354 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "startNode" + connector_id = "nodeConnector" + id = "9pekqghawg" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + inputSchema = { + value = "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"userId\": {\n\t\t\t\"type\": \"text\",\n\t\t\t\"displayName\": \"userId\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"userId\"\n\t\t},\n\t\t\"successMessage\": {\n\t\t\t\"type\": \"text\",\n\t\t\t\"displayName\": \"successMessage\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"successMessage\"\n\t\t},\n\t\t\"flowAllowedDeviceTypes\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"displayName\": \"flowAllowedDeviceTypes\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"flowAllowedDeviceTypes\"\n\t\t}\n\t}\n}" + } + nodeTitle = { + value = "Device Selection" + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 307.91107177734375 + y = 869.297607421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "startNode" + connector_id = "nodeConnector" + id = "at5tmglpow" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + inputSchema = { + value = "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"errorCode\": {\n\t\t\t\"type\": \"number\",\n\t\t\t\"displayName\": \"errorCode\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"errorCode\"\n\t\t},\n\t\t\"errorMessage\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"displayName\": \"errorMessage\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"errorMessage\"\n\t\t}\n\t}\n}" + } + nodeTitle = { + value = "Error" + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 321.3871765136719 + y = 2733.4453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "startNode" + connector_id = "nodeConnector" + id = "ebzcromrpm" + label = "Teleport" + node_type = "CONNECTION" + properties = jsonencode({ + inputSchema = { + value = "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"userId\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"displayName\": \"userId\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"userId\"\n\t\t},\n\t\t\"deviceId\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"displayName\": \"deviceId\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"deviceId\"\n\t\t},\n\t\t\"deviceInfo\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"displayName\": \"deviceInfo\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"deviceInfo\"\n\t\t},\n\t\t\"flowAllowedDeviceTypes\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"displayName\": \"flowAllowedDeviceTypes\",\n\t\t\t\"preferredControlType\": \"textField\",\n\t\t\t\"enableParameters\": true,\n\t\t\t\"propertyName\": \"flowAllowedDeviceTypes\"\n\t\t}\n\t}\n}" + } + nodeTitle = { + value = "Selected Device" + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 295.5403747558594 + y = 1854.6544189453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "startUiSubFlow" + connector_id = "flowConnector" + id = "d915blmeth" + label = "Flow Conductor" + node_type = "CONNECTION" + properties = jsonencode({ + allowCancel = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"true\"\n }\n ]\n }\n]" + } + allowedDeviceTypes = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"flowAllowedDeviceTypes\",\n \"data\": \"{{local.61gkn04fvn.payload.output.flowAllowedDeviceTypes}}\",\n \"tooltip\": \"{{local.61gkn04fvn.payload.output.flowAllowedDeviceTypes}}\",\n \"children\": [\n {\n \"text\": \"flowAllowedDeviceTypes\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + ciam_companyLogo = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"
\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "Device Registration" + } + passwordlessRequired = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"true\"\n }\n ]\n }\n]" + } + pingOneUserId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.61gkn04fvn.payload.output.userId}}\",\n \"tooltip\": \"{{local.61gkn04fvn.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + subFlowId = { + value = { + label = "OOTB - Device Registration - Subflow" + value = "a584da2cce2a1b95e5dc9843dea2dd89" + } + } + subFlowVersionId = { + value = -1 + } + }) + status = "configured" + type = "trigger" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 965.1754150390625 + y = 1354.72119140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateAnnotationProperties" + connector_id = "annotationConnector" + id = "bs6yqhx1jp" + label = null + node_type = "ANNOTATION" + properties = jsonencode({ + annotation = { + value = "Update Device" + } + annotationTextColor = { + value = "#000000" + } + backgroundColor = { + value = "#B5DFFF" + } + fontFamily = { + value = "sans-serif" + } + fontSize = { + value = 16 + } + width = { + value = 1600 + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 218 + y = 1751.2672119140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateAnnotationProperties" + connector_id = "annotationConnector" + id = "kwuvuydmom" + label = null + node_type = "ANNOTATION" + properties = jsonencode({ + annotation = { + value = "Display user devices" + } + annotationTextColor = { + value = "#000000" + } + backgroundColor = { + value = "#B5DFFF" + } + fontFamily = { + value = "sans-serif" + } + fontSize = { + value = 16 + } + width = { + value = 3000 + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 243.84678649902344 + y = 743.2422485351562 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateAnnotationProperties" + connector_id = "annotationConnector" + id = "mcskw8iiy8" + label = null + node_type = "ANNOTATION" + properties = jsonencode({ + annotation = { + value = "Enable MFA" + } + annotationTextColor = { + value = "#000000" + } + backgroundColor = { + value = "#B5DFFF" + } + fontFamily = { + value = "sans-serif" + } + fontSize = { + value = 16 + } + width = { + value = 1200 + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1251.8717041015625 + y = 278 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateAnnotationProperties" + connector_id = "annotationConnector" + id = "mxfrvhu3rw" + label = null + node_type = "ANNOTATION" + properties = jsonencode({ + annotation = { + value = "Check Pre-Requisite For Device Management" + } + annotationTextColor = { + value = "#000000" + } + backgroundColor = { + value = "#B5DFFF" + } + fontFamily = { + value = "sans-serif" + } + fontSize = { + value = 16 + } + width = { + value = 900 + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 218 + y = 278 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateAnnotationProperties" + connector_id = "annotationConnector" + id = "qlu6ditq7w" + label = null + node_type = "ANNOTATION" + properties = jsonencode({ + annotation = { + value = "See https://docs.pingidentity.com/access/sources/dita/topic?resourceid=ciam_passwordless_ciam_pm_device_management for flow reference information." + } + annotationTextColor = { + value = "#ffffffff" + } + backgroundColor = { + value = "#9013feff" + } + fontFamily = { + value = "sans-serif" + } + fontSize = { + value = 16 + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 214 + y = 214 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateAnnotationProperties" + connector_id = "annotationConnector" + id = "rr2fxw7vyx" + label = null + node_type = "ANNOTATION" + properties = jsonencode({ + annotation = { + value = "Return Success" + } + annotationTextColor = { + value = "#000000" + } + backgroundColor = { + value = "#B5DFFF" + } + fontFamily = { + value = "sans-serif" + } + fontSize = { + value = 16 + } + width = { + value = 800 + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 243.84678649902344 + y = 2423.28369140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateAnnotationProperties" + connector_id = "annotationConnector" + id = "tcxtak8u2x" + label = null + node_type = "ANNOTATION" + properties = jsonencode({ + annotation = { + value = "Add Device" + } + annotationTextColor = { + value = "#000000" + } + backgroundColor = { + value = "#B5DFFF" + } + fontFamily = { + value = "sans-serif" + } + fontSize = { + value = 16 + } + width = { + value = 1200 + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 243.84678649902344 + y = 1260.1781005859375 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateAnnotationProperties" + connector_id = "annotationConnector" + id = "vziko5pbm3" + label = null + node_type = "ANNOTATION" + properties = jsonencode({ + annotation = { + value = "Return Error" + } + annotationTextColor = { + value = "#000000" + } + backgroundColor = { + value = "#B5DFFF" + } + fontFamily = { + value = "sans-serif" + } + fontSize = { + value = 16 + } + width = { + value = 800 + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 243.84678649902344 + y = 2630.05810546875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateDeviceNickname" + connector_id = "pingOneMfaConnector" + id = "mr62wpbo3z" + label = "PingOne MFA" + node_type = "CONNECTION" + properties = jsonencode({ + deviceId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"deviceId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.deviceId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.deviceId}}\",\n \"children\": [\n {\n \"text\": \"deviceId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nickname = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"http.svg\",\n \"url\": \"nickname\",\n \"data\": \"{{local.j4l954l5hz.payload.output.nickname}}\",\n \"tooltip\": \"{{local.j4l954l5hz.payload.output.nickname}}\",\n \"children\": [\n {\n \"text\": \"nickname\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + nodeTitle = { + value = "Update Device Name" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"teleport.svg\",\n \"url\": \"userId\",\n \"data\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"tooltip\": \"{{local.ebzcromrpm.payload.output.userId}}\",\n \"children\": [\n {\n \"text\": \"userId\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1355.2589111328125 + y = 1854.6544189453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "updateUserMFAEnabled" + connector_id = "pingOneMfaConnector" + id = "up4jkblnks" + label = "PingOne MFA" + node_type = "CONNECTION" + properties = jsonencode({ + nodeTitle = { + value = "Enable MFA for user" + } + userId = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"id\",\n \"data\": \"{{local.7rwri5u6ra.payload.output.matchedUser.id}}\",\n \"tooltip\": \"{{local.7rwri5u6ra.payload.output.matchedUser.id}}\",\n \"children\": [\n {\n \"text\": \"id\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2060.242431640625 + y = 503.5545959472656 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = "userLookup" + connector_id = "pingOneSSOConnector" + id = "7rwri5u6ra" + label = "PingOne" + node_type = "CONNECTION" + properties = jsonencode({ + identifier = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"pingIdentity.svg\",\n \"url\": \"id\",\n \"data\": \"{{local.lngyffn971.payload.output.session.user.id}}\",\n \"tooltip\": \"{{local.lngyffn971.payload.output.session.user.id}}\",\n \"children\": [\n {\n \"text\": \"id\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + matchAttributes = { + value = ["username", "email"] + } + nodeTitle = { + value = "Get User Info" + } + userIdentifierForFindUser = { + value = "[\n {\n \"children\": [\n {\n \"text\": \"\"\n },\n {\n \"text\": \"\"\n },\n {\n \"type\": \"link\",\n \"src\": \"functions.svg\",\n \"url\": \"username\",\n \"data\": \"{{local.umf4ie39n.payload.output.username}}\",\n \"tooltip\": \"{{local.umf4ie39n.payload.output.username}}\",\n \"children\": [\n {\n \"text\": \"username\"\n }\n ]\n },\n {\n \"text\": \"\"\n }\n ]\n }\n]" + } + }) + status = "configured" + type = "action" + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 630 + y = 390 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "088nn24g3r" + label = "Evaluator" + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2927.535888671875 + y = 1165.593017578125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "0jgff1lx32" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2222.7587890625 + y = 867.4180297851562 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "0mbvscfh8v" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1148.4844970703125 + y = 1854.6544189453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "17n6cajfer" + label = "Evaluator" + node_type = "EVAL" + properties = jsonencode({ + odx7hiwkjx = { + value = "anyTriggersFalse" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1102.4862060546875 + y = 1354.72119140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "1lngxsfyuk" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 800.4024658203125 + y = 1354.72119140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "2tif2w7s85" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 786.6294555664062 + y = 1854.6544189453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "2x2le9q98" + label = "Evaluator" + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1857.816650390625 + y = 503.5545959472656 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "3jsczqq7hm" + label = "Evaluator" + node_type = "EVAL" + properties = jsonencode({ + o925yy0p7r = { + value = "anyTriggersFalse" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1174.6298828125 + y = 377.0385437011719 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "4os42modvj" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1500 + y = 870 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "4wqs0nbs1v" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1870.3701171875 + y = 867.4180297851562 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "5mes9ynjey" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 456.7721252441406 + y = 869.297607421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "6rcgg8opng" + label = "Evaluator" + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 450.6211242675781 + y = 2733.4453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "921411zeq1" + label = null + node_type = "EVAL" + properties = jsonencode({ + "6nafzw7by5" = { + value = "anyTriggersFalse" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1484.4927978515625 + y = 2164.81591796875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "ako0e9ds26" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2602.254150390625 + y = 1165.593017578125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "c6dxhfi5rb" + label = null + node_type = "EVAL" + properties = jsonencode({ + "45rd8ajb4g" = { + value = "anyTriggersFalse" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1484.4927978515625 + y = 2009.735107421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "cb42qgfnjd" + label = null + node_type = "EVAL" + properties = jsonencode({ + "43e7ccsg4e" = { + value = "anyTriggersFalse" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1484.4927978515625 + y = 1854.6544189453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "dpv60nrlu4" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1148.4844970703125 + y = 2164.81591796875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "e9gg1lr1db" + label = "Evaluator" + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1857.816650390625 + y = 604.7674560546875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "efiecys0xw" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 450 + y = 390 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "fvt3dt1sk1" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1148.4844970703125 + y = 2009.735107421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "fwpzd4lh0q" + label = "Evaluator" + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2602.254150390625 + y = 975.8452758789062 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "gmbeads147" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 470.85662841796875 + y = 1354.72119140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "hhnj8v9hed" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 450.6211242675781 + y = 2526.6708984375 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "kh69z64byb" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2602.254150390625 + y = 867.4180297851562 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "lu3t9lz7j" + label = "Evaluator" + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1541.880615234375 + y = 1464.56982421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "miwpvke4ky" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 812.4762573242188 + y = 2733.4453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "o5huuauebn" + label = "Evaluator" + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1148.4844970703125 + y = 2319.896728515625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "q3ibsmt4qr" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2602.254150390625 + y = 1057.165771484375 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "qy6uai4d4r" + label = "Evaluator" + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1528.8748779296875 + y = 503.5545959472656 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "r8nxemp506" + label = "Evaluator" + node_type = "EVAL" + properties = jsonencode({ + ev94io1fpf = { + value = "anyTriggersFalse" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 2186.758544921875 + y = 503.5545959472656 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "rxrwt223m5" + label = null + node_type = "EVAL" + properties = jsonencode({ + ls0q7pxpla = { + value = "anyTriggersFalse" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 820.3848876953125 + y = 377.0385437011719 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "sjedcfzfgi" + label = null + node_type = "EVAL" + properties = jsonencode({ + srhu2uexj1 = { + value = "anyTriggersFalse" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 754.494140625 + y = 869.297607421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "to6mgd2tyh" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 424.77435302734375 + y = 1854.6544189453125 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "zmy34kmwpn" + label = "Evaluator" + node_type = "EVAL" + properties = jsonencode({ + "7ujaohyyg9" = { + value = "anyTriggersFalse" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 812.4762573242188 + y = 2526.6708984375 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "vbk955oxjg" + label = null + node_type = "EVAL" + properties = jsonencode({ + "8sttri4np9" = { + value = "allTriggersComplete" + } + }) + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1101.8365478515625 + y = 869.297607421875 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "wxyu359jnv" + label = null + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1541.880615234375 + y = 1354.72119140625 + } + removed = false + selectable = true + selected = false + }, + { + classes = null + data = { + capability_name = null + connector_id = null + id = "xytgoh995y" + label = "Evaluator" + node_type = "EVAL" + + status = null + type = null + } + grabbable = true + group = "nodes" + locked = false + pannable = false + position = { + x = 1541.880615234375 + y = 1546.956298828125 + } + removed = false + selectable = true + selected = false + }, + ] + } + max_zoom = 100000000000000000000000000000000000000000000000000 + min_zoom = 0.00000000000000000000000000000000000000000000000001 + pan = { + x = 0 + y = 0 + } + panning_enabled = true + renderer = jsonencode({ + name = "null" + }) + user_panning_enabled = true + user_zooming_enabled = true + zoom = 1 + zooming_enabled = true + } + input_schema = [ + { + description = null + is_expanded = true + preferred_control_type = "textField" + preferred_data_type = "object" + property_name = "flowParameters" + required = null + }, + ] + name = "%[2]s OOTB - Device Management - Main Flow" + output_schema = null + settings = { + csp = "worker-src 'self' blob:; script-src 'self' https://cdn.jsdelivr.net https://code.jquery.com https://devsdk.singularkey.com http://cdnjs.cloudflare.com 'unsafe-inline' 'unsafe-eval';" + css = null + css_links = ["https://assets.pingone.com/ux/end-user-nano/0.1.0-alpha.1/end-user-nano.css", "https://assets.pingone.com/ux/astro-nano/0.1.0-alpha.7/icons.css"] + custom_error_screen_brand_logo_url = null + custom_error_show_footer = null + custom_favicon_link = null + custom_logo_urlselection = null + custom_title = null + default_error_screen_brand_logo = null + flow_http_timeout_in_seconds = null + flow_timeout_in_seconds = null + intermediate_loading_screen_css = null + intermediate_loading_screen_html = null + js_custom_flow_player = null + js_links = null + log_level = 2 + require_authentication_to_initiate = null + scrub_sensitive_info = null + sensitive_info_fields = null + use_csp = null + use_custom_css = true + use_custom_flow_player = null + use_custom_script = null + use_intermediate_loading_screen = null + validate_on_save = null + } + trigger = null +} diff --git a/internal/acctest/testhcl/testdata.go b/internal/acctest/testhcl/testdata.go new file mode 100644 index 000000000..3d800b94a --- /dev/null +++ b/internal/acctest/testhcl/testdata.go @@ -0,0 +1,24 @@ +// Copyright © 2025 Ping Identity Corporation + +package testhcl + +import ( + "fmt" + "os" + "path/filepath" + "runtime" +) + +// reads HCL file contents used in tests +func ReadTestHcl(path string) (string, error) { + _, currentPath, _, ok := runtime.Caller(0) + if !ok { + return "", fmt.Errorf("failed to get current path when reading test HCL") + } + fileContents, err := os.ReadFile(filepath.Join(filepath.Dir(currentPath), filepath.Clean(path))) + if err != nil { + return "", err + } + + return string(fileContents), nil +} diff --git a/internal/framework/retry.go b/internal/framework/retry.go index c23bdc9a1..0a7e7fac2 100644 --- a/internal/framework/retry.go +++ b/internal/framework/retry.go @@ -8,6 +8,7 @@ import ( "fmt" "net/http" "net/url" + "regexp" "time" "github.com/hashicorp/terraform-plugin-log/tflog" @@ -19,6 +20,22 @@ type Retryable func(context.Context, *http.Response, *pingone.GeneralError) bool var ( DefaultRetryable = func(ctx context.Context, r *http.Response, p1error *pingone.GeneralError) bool { return false } + + InsufficientPrivilegeRetryable = func(ctx context.Context, r *http.Response, p1error *pingone.GeneralError) bool { + if p1error != nil { + // Permissions may not have propagated by this point + m, err := regexp.MatchString("^The request could not be completed. You do not have access to this resource.", p1error.GetMessage()) + if err == nil && m { + tflog.Warn(ctx, "Insufficient PingOne privileges detected") + return true + } + if err != nil { + return false + } + } + + return false + } ) func RetryWrapper(ctx context.Context, timeout time.Duration, f SDKInterfaceFunc, requestID string, isRetryable Retryable) (interface{}, *http.Response, error) { diff --git a/internal/framework/stringvalidator/not_null.go b/internal/framework/stringvalidator/not_null.go new file mode 100644 index 000000000..8348816c9 --- /dev/null +++ b/internal/framework/stringvalidator/not_null.go @@ -0,0 +1,46 @@ +// Copyright © 2025 Ping Identity Corporation + +package stringvalidator + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/schema/validator" +) + +var _ validator.String = StringNotNullValidator{} + +// StringNotNullValidator validates that an attribute is not null. Most +// attributes should set Required: true instead, however in certain scenarios, +// such as a computed nested attribute, all underlying attributes must also be +// computed for planning to not show unexpected differences. +type StringNotNullValidator struct{} + +func (v StringNotNullValidator) Description(_ context.Context) string { + return "Value must be configured" +} + +func (v StringNotNullValidator) MarkdownDescription(ctx context.Context) string { + return v.Description(ctx) +} + +func (v StringNotNullValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse) { + if !req.ConfigValue.IsNull() { + return + } + + resp.Diagnostics.AddAttributeError( + req.Path, + "Missing Attribute Value", + req.Path.String()+": "+v.Description(ctx), + ) +} + +// NotNull returns an validator which ensures that the string attribute is +// configured. Most attributes should set Required: true instead, however in +// certain scenarios, such as a computed nested attribute, all underlying +// attributes must also be computed for planning to not show unexpected +// differences. +func NotNull() validator.String { + return StringNotNullValidator{} +} diff --git a/internal/service/davinci/data_source_davinci_application_gen.go b/internal/service/davinci/data_source_davinci_application_gen.go index b80dd34ae..9dfe38777 100644 --- a/internal/service/davinci/data_source_davinci_application_gen.go +++ b/internal/service/davinci/data_source_davinci_application_gen.go @@ -235,7 +235,7 @@ func (r *davinciApplicationDataSource) Read(ctx context.Context, req datasource. }, "GetDavinciApplicationById", framework.DefaultCustomError, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) diff --git a/internal/service/davinci/data_source_davinci_applications_gen.go b/internal/service/davinci/data_source_davinci_applications_gen.go index 1436ce8f4..e7926943f 100644 --- a/internal/service/davinci/data_source_davinci_applications_gen.go +++ b/internal/service/davinci/data_source_davinci_applications_gen.go @@ -257,7 +257,7 @@ func (r *davinciApplicationsDataSource) Read(ctx context.Context, req datasource }, "GetDavinciApplications", framework.DefaultCustomError, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) diff --git a/internal/service/davinci/data_source_davinci_connector_gen.go b/internal/service/davinci/data_source_davinci_connector_gen.go index fab5e81dd..5c55780e3 100644 --- a/internal/service/davinci/data_source_davinci_connector_gen.go +++ b/internal/service/davinci/data_source_davinci_connector_gen.go @@ -257,7 +257,7 @@ func (r *davinciConnectorDataSource) Read(ctx context.Context, req datasource.Re }, "GetConnectorById", framework.DefaultCustomError, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) diff --git a/internal/service/davinci/data_source_davinci_connector_instance_gen.go b/internal/service/davinci/data_source_davinci_connector_instance_gen.go index f34e534ff..fc9779f46 100644 --- a/internal/service/davinci/data_source_davinci_connector_instance_gen.go +++ b/internal/service/davinci/data_source_davinci_connector_instance_gen.go @@ -182,7 +182,7 @@ func (r *davinciConnectorInstanceDataSource) Read(ctx context.Context, req datas }, "GetConnectorInstanceById", framework.DefaultCustomError, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) diff --git a/internal/service/davinci/data_source_davinci_connector_instances_gen.go b/internal/service/davinci/data_source_davinci_connector_instances_gen.go index 9dfb1bfcf..1ff400f5c 100644 --- a/internal/service/davinci/data_source_davinci_connector_instances_gen.go +++ b/internal/service/davinci/data_source_davinci_connector_instances_gen.go @@ -204,7 +204,7 @@ func (r *davinciConnectorInstancesDataSource) Read(ctx context.Context, req data }, "GetConnectorInstances", framework.DefaultCustomError, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) diff --git a/internal/service/davinci/data_source_davinci_connectors_gen.go b/internal/service/davinci/data_source_davinci_connectors_gen.go index 1cd17080d..c4b4e2fe1 100644 --- a/internal/service/davinci/data_source_davinci_connectors_gen.go +++ b/internal/service/davinci/data_source_davinci_connectors_gen.go @@ -278,7 +278,7 @@ func (r *davinciConnectorsDataSource) Read(ctx context.Context, req datasource.R }, "GetConnectors", framework.DefaultCustomError, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) diff --git a/internal/service/davinci/resource_davinci_application.go b/internal/service/davinci/resource_davinci_application.go index 54fec1f3d..4b106dcd2 100644 --- a/internal/service/davinci/resource_davinci_application.go +++ b/internal/service/davinci/resource_davinci_application.go @@ -193,7 +193,7 @@ func (r *davinciApplicationResource) Create(ctx context.Context, req resource.Cr }, "CreateDavinciApplication", framework.DefaultCustomError, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &createResponseData, )...) @@ -219,7 +219,7 @@ func (r *davinciApplicationResource) Create(ctx context.Context, req resource.Cr }, "ReplaceDavinciApplicationById-Create", framework.DefaultCustomError, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) diff --git a/internal/service/davinci/resource_davinci_application_flow_policy_gen.go b/internal/service/davinci/resource_davinci_application_flow_policy_gen.go index 6bf5a0995..05592da13 100644 --- a/internal/service/davinci/resource_davinci_application_flow_policy_gen.go +++ b/internal/service/davinci/resource_davinci_application_flow_policy_gen.go @@ -19,6 +19,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectdefault" "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" @@ -81,6 +82,24 @@ type davinciApplicationFlowPolicyResourceModel struct { } func (r *davinciApplicationFlowPolicyResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { + triggerConfigurationMfaAttrTypes := map[string]attr.Type{ + "enabled": types.BoolType, + "time": types.Float32Type, + "time_format": types.StringType, + } + triggerConfigurationPwdAttrTypes := map[string]attr.Type{ + "enabled": types.BoolType, + "time": types.Float32Type, + "time_format": types.StringType, + } + triggerConfigurationAttrTypes := map[string]attr.Type{ + "mfa": types.ObjectType{AttrTypes: triggerConfigurationMfaAttrTypes}, + "pwd": types.ObjectType{AttrTypes: triggerConfigurationPwdAttrTypes}, + } + triggerAttrTypes := map[string]attr.Type{ + "configuration": types.ObjectType{AttrTypes: triggerConfigurationAttrTypes}, + "type": types.StringType, + } resp.Schema = schema.Schema{ Description: "Resource to create and manage a DaVinci application flow policy.", Attributes: map[string]schema.Attribute{ @@ -222,6 +241,22 @@ func (r *davinciApplicationFlowPolicyResource) Schema(ctx context.Context, req r }, }, Optional: true, + Computed: true, + Default: objectdefault.StaticValue(types.ObjectValueMust(triggerAttrTypes, map[string]attr.Value{ + "configuration": types.ObjectValueMust(triggerConfigurationAttrTypes, map[string]attr.Value{ + "mfa": types.ObjectValueMust(triggerConfigurationMfaAttrTypes, map[string]attr.Value{ + "enabled": types.BoolValue(false), + "time": types.Float32Value(0), + "time_format": types.StringValue("min"), + }), + "pwd": types.ObjectValueMust(triggerConfigurationPwdAttrTypes, map[string]attr.Value{ + "enabled": types.BoolValue(false), + "time": types.Float32Value(0), + "time_format": types.StringValue("min"), + }), + }), + "type": types.StringValue("AUTHENTICATION"), + })), }, }, } @@ -568,7 +603,7 @@ func (r *davinciApplicationFlowPolicyResource) Create(ctx context.Context, req r }, "CreateFlowPolicyByDavinciApplicationId", framework.DefaultCustomError, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) @@ -624,7 +659,7 @@ func (r *davinciApplicationFlowPolicyResource) Read(ctx context.Context, req res }, "GetFlowPolicyByIdUsingDavinciApplicationId", framework.CustomErrorResourceNotFoundWarning, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) @@ -692,7 +727,7 @@ func (r *davinciApplicationFlowPolicyResource) Update(ctx context.Context, req r }, "ReplaceFlowPolicyByIdUsingDavinciApplicationId", framework.DefaultCustomError, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) @@ -747,7 +782,7 @@ func (r *davinciApplicationFlowPolicyResource) Delete(ctx context.Context, req r }, "DeleteFlowPolicyByIdUsingDavinciApplicationId", framework.CustomErrorResourceNotFoundWarning, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, nil, )...) } diff --git a/internal/service/davinci/resource_davinci_application_flow_policy_gen_test.go b/internal/service/davinci/resource_davinci_application_flow_policy_gen_test.go index c17fa3ee5..69aac0203 100644 --- a/internal/service/davinci/resource_davinci_application_flow_policy_gen_test.go +++ b/internal/service/davinci/resource_davinci_application_flow_policy_gen_test.go @@ -18,6 +18,8 @@ import ( "github.com/pingidentity/pingone-go-client/pingone" "github.com/pingidentity/terraform-provider-pingone/internal/acctest" acctestlegacysdk "github.com/pingidentity/terraform-provider-pingone/internal/acctest/legacysdk" + "github.com/pingidentity/terraform-provider-pingone/internal/acctest/service/base" + "github.com/pingidentity/terraform-provider-pingone/internal/verify" ) func TestAccDavinciApplicationFlowPolicy_RemovalDrift(t *testing.T) { @@ -26,9 +28,9 @@ func TestAccDavinciApplicationFlowPolicy_RemovalDrift(t *testing.T) { resourceName := acctest.ResourceNameGen() resourceFullName := fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName) - //environmentName := acctest.ResourceNameGenEnvironment() + environmentName := acctest.ResourceNameGenEnvironment() - //licenseID := os.Getenv("PINGONE_LICENSE_ID") + licenseID := os.Getenv("PINGONE_LICENSE_ID") var environmentId string var daVinciApplicationId string var id string @@ -61,18 +63,17 @@ func TestAccDavinciApplicationFlowPolicy_RemovalDrift(t *testing.T) { ExpectNonEmptyPlan: true, }, // Test removal of the environment - //TODO re-enable this test when the pingone_davinci_flow resource is available - // { - // Config: davinciApplicationFlowPolicy_NewEnvHCL(environmentName, licenseID, resourceName), - // Check: davinciApplicationFlowPolicy_GetIDs(resourceFullName, &environmentId, &daVinciApplicationId, &id), - // }, - // { - // PreConfig: func() { - // base.Environment_RemovalDrift_PreConfig(ctx, p1Client, t, environmentId) - // }, - // RefreshState: true, - // ExpectNonEmptyPlan: true, - // }, + { + Config: davinciApplicationFlowPolicy_NewEnvHCL(environmentName, licenseID, resourceName), + Check: davinciApplicationFlowPolicy_GetIDs(resourceFullName, &environmentId, &daVinciApplicationId, &id), + }, + { + PreConfig: func() { + base.Environment_RemovalDrift_PreConfig(ctx, p1Client, t, environmentId) + }, + RefreshState: true, + ExpectNonEmptyPlan: true, + }, }, }) } @@ -113,7 +114,7 @@ func testAccDavinciApplicationFlowPolicy_MinimalMaximal(t *testing.T, withBootst { // Re-create with a complete model Config: davinciApplicationFlowPolicy_CompleteHCL(resourceName, withBootstrapConfig), - // Check: davinciApplicationFlowPolicy_CheckComputedValuesComplete(resourceName), + Check: davinciApplicationFlowPolicy_CheckComputedValuesComplete(resourceName), }, { // Back to minimal model @@ -123,14 +124,13 @@ func testAccDavinciApplicationFlowPolicy_MinimalMaximal(t *testing.T, withBootst { // Back to complete model Config: davinciApplicationFlowPolicy_CompleteHCL(resourceName, withBootstrapConfig), - // Check: davinciApplicationFlowPolicy_CheckComputedValuesComplete(resourceName), + Check: davinciApplicationFlowPolicy_CheckComputedValuesComplete(resourceName), + }, + { + // Complete model with reordering of lists and sets + Config: davinciApplicationFlowPolicy_CompleteReorderedHCL(resourceName), + Check: davinciApplicationFlowPolicy_CheckComputedValuesComplete(resourceName), }, - // { - // // Complete model with reordering of lists and sets - // Config: davinciApplicationFlowPolicy_CompleteReorderedHCL(resourceName), - // //TODO update checks if different results are expected after reordering - // Check: davinciApplicationFlowPolicy_CheckComputedValuesComplete(resourceName), - // }, { // Test importing the resource Config: davinciApplicationFlowPolicy_CompleteHCL(resourceName, withBootstrapConfig), @@ -154,7 +154,6 @@ func testAccDavinciApplicationFlowPolicy_MinimalMaximal(t *testing.T, withBootst } func TestAccDavinciApplicationFlowPolicy_NewEnv(t *testing.T) { - t.Skip("Skipping test as the pingone_davinci_flow resource will be needed for this") t.Parallel() resourceName := acctest.ResourceNameGen() @@ -227,6 +226,96 @@ func davinciApplicationFlowPolicy_MinimalHCL(resourceName string, withBootstrapC return fmt.Sprintf(` %[1]s +resource "pingone_davinci_flow" "%[2]s" { + environment_id = data.pingone_environment.general_test.id + name = "%[2]s" + description = "This is a demo flow" + color = "#00FF00" + + graph_data = { + elements = { + edges = [] + nodes = [{ + data = { + id = "8bnj41592a" + node_type = "CONNECTION" + connector_id = "pingOneSSOConnector" + label = "PingOne" + status = "configured" + capability_name = "userLookup" + type = "action" + properties = jsonencode({ + "additionalUserProperties" : { + "value" : [] + }, + "username" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + }, + "population" : { + "value" : "c9f3fb3f-11e9-4eb0-b4ba-9fb7789a8418" + }, + "userIdentifierForFindUser" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 420 + y = 360 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }] + } + + data = "{}" + + box_selection_enabled = true + user_zooming_enabled = true + zooming_enabled = true + zoom = 1 + min_zoom = 0.01 + max_zoom = 10000 + pannable = true + panning_enabled = true + user_panning_enabled = true + + pan = { + x = 0 + y = 0 + } + + renderer = jsonencode({ + "name" : "null" + }) + } + + settings = { + csp = "worker-src 'self' blob:; script-src 'self' https://cdn.jsdelivr.net https://code.jquery.com https://devsdk.singularkey.com http://cdnjs.cloudflare.com 'unsafe-inline' 'unsafe-eval';" + intermediate_loading_screen_css = "" + intermediate_loading_screen_html = "" + log_level = 2 + } + + output_schema = { + output = { + type = "object", + properties = jsonencode({}), + additionalProperties = true + } + } + + trigger = { + type = "AUTHENTICATION" + } +} + resource "pingone_davinci_application" "%[2]s" { environment_id = data.pingone_environment.general_test.id name = "%[2]s" @@ -237,11 +326,14 @@ resource "pingone_davinci_application_flow_policy" "%[2]s" { da_vinci_application_id = pingone_davinci_application.%[2]s.id flow_distributions = [ { - #TODO use flow resource to create this, rather than using a hardcoded id - id = "ea3bf86e79daf74f0262a317190e02dd" + id = pingone_davinci_flow.%[2]s.id version = 0 } ] + # Ensures this resource will be updated before deleting the flow + lifecycle { + create_before_destroy = true + } } `, acctest.DaVinciSandboxEnvironment(withBootstrapConfig), resourceName) } @@ -256,89 +348,570 @@ resource "pingone_davinci_application" "%[2]s" { name = "%[2]s" } +resource "pingone_davinci_flow" "%[2]s-first" { + environment_id = data.pingone_environment.general_test.id + name = "%[2]s" + description = "This is a first demo flow" + color = "#00FF00" + + graph_data = { + elements = { + edges = [] + nodes = [{ + data = { + id = "nodefirstflow" + node_type = "CONNECTION" + connector_id = "pingOneSSOConnector" + label = "PingOne" + status = "configured" + capability_name = "userLookup" + type = "action" + properties = jsonencode({ + "additionalUserProperties" : { + "value" : [] + }, + "username" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + }, + "population" : { + "value" : "c9f3fb3f-11e9-4eb0-b4ba-9fb7789a8418" + }, + "userIdentifierForFindUser" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 420 + y = 360 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }] + } + + data = "{}" + + box_selection_enabled = true + user_zooming_enabled = true + zooming_enabled = true + zoom = 1 + min_zoom = 0.01 + max_zoom = 10000 + pannable = true + panning_enabled = true + user_panning_enabled = true + + pan = { + x = 0 + y = 0 + } + + renderer = jsonencode({ + "name" : "null" + }) + } + + settings = { + csp = "worker-src 'self' blob:; script-src 'self' https://cdn.jsdelivr.net https://code.jquery.com https://devsdk.singularkey.com http://cdnjs.cloudflare.com 'unsafe-inline' 'unsafe-eval';" + intermediate_loading_screen_css = "" + intermediate_loading_screen_html = "" + log_level = 2 + } + + output_schema = { + output = { + type = "object", + properties = jsonencode({}), + additionalProperties = true + } + } + + trigger = { + type = "AUTHENTICATION" + } +} + +resource "pingone_davinci_flow" "%[2]s-second" { + environment_id = data.pingone_environment.general_test.id + name = "%[2]s" + description = "This is a second demo flow" + color = "#00FF00" + + graph_data = { + elements = { + edges = [] + nodes = [{ + data = { + id = "nodesecondflow1" + node_type = "CONNECTION" + connector_id = "pingOneSSOConnector" + label = "PingOne" + status = "configured" + capability_name = "userLookup" + type = "action" + properties = jsonencode({ + "additionalUserProperties" : { + "value" : [] + }, + "username" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + }, + "population" : { + "value" : "c9f3fb3f-11e9-4eb0-b4ba-9fb7789a8418" + }, + "userIdentifierForFindUser" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 420 + y = 360 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "nodesecondflow2" + node_type = "CONNECTION" + connector_id = "pingOneSSOConnector" + label = "PingOne" + status = "configured" + capability_name = "userLookup" + type = "action" + properties = jsonencode({ + "additionalUserProperties" : { + "value" : [] + }, + "username" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + }, + "population" : { + "value" : "c9f3fb3f-11e9-4eb0-b4ba-9fb7789a8418" + }, + "userIdentifierForFindUser" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 420 + y = 360 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }] + } + + data = "{}" + + box_selection_enabled = true + user_zooming_enabled = true + zooming_enabled = true + zoom = 1 + min_zoom = 0.01 + max_zoom = 10000 + pannable = true + panning_enabled = true + user_panning_enabled = true + + pan = { + x = 0 + y = 0 + } + + renderer = jsonencode({ + "name" : "null" + }) + } + + settings = { + csp = "worker-src 'self' blob:; script-src 'self' https://cdn.jsdelivr.net https://code.jquery.com https://devsdk.singularkey.com http://cdnjs.cloudflare.com 'unsafe-inline' 'unsafe-eval';" + intermediate_loading_screen_css = "" + intermediate_loading_screen_html = "" + log_level = 2 + } + + output_schema = { + output = { + type = "object", + properties = jsonencode({}), + additionalProperties = true + } + } + + trigger = { + type = "AUTHENTICATION" + } +} + resource "pingone_davinci_application_flow_policy" "%[2]s" { environment_id = data.pingone_environment.general_test.id da_vinci_application_id = pingone_davinci_application.%[2]s.id flow_distributions = [ { - id = "ea3bf86e79daf74f0262a317190e02dd" + id = pingone_davinci_flow.%[2]s-first.id ip = [ "0.0.0.0/0", "1.1.1.1/1", ] success_nodes = [ { - id = "1234" + id = "nodefirstflow" } ] - version = 1 - weight = 100 + version = 0 + weight = 45 + }, + { + id = pingone_davinci_flow.%[2]s-second.id + ip = [ + "0.0.0.0/0", + "1.1.1.1/1", + "2.2.2.2/2", + ] + success_nodes = [ + { + id = "nodesecondflow1" + }, + { + id = "nodesecondflow2" + } + ] + version = 0 + weight = 55 } - #TODO add a second flow ] name = "Updated policy" status = "disabled" - #TODO test trigger with a pingone flow - // trigger = { - // configuration = { - // mfa = { - // enabled = //TODO - // time = //TODO - // time_format = //TODO - // } - // pwd = { - // enabled = //TODO - // time = //TODO - // time_format = //TODO - // } - // } - // type = //TODO - // } + trigger = { + configuration = { + mfa = { + enabled = true + time = 5 + time_format = "hour" + } + pwd = { + enabled = false + time = 3 + time_format = "day" + } + } + type = "AUTHENTICATION" + } + # Ensures this resource will be updated before deleting the flow + lifecycle { + create_before_destroy = true + } } `, acctest.DaVinciSandboxEnvironment(withBootstrapConfig), resourceName) } // 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 func davinciApplicationFlowPolicy_CompleteReorderedHCL(resourceName string) string { return fmt.Sprintf(` %[1]s -resource "pingone_davinci_application_flow_policy" "%[2]s" { +resource "pingone_davinci_application" "%[2]s" { + environment_id = data.pingone_environment.general_test.id + name = "%[2]s" +} + +resource "pingone_davinci_flow" "%[2]s-first" { environment_id = data.pingone_environment.general_test.id - // da_vinci_application_id = //TODO - // id = //TODO - // // TODO set values for complete fields, with ordering changes - // flow_distributions = [ - // { - // id = //TODO - // ip = //TODO - // success_nodes = [ - // { - // id = //TODO - // } - // ] - // version = //TODO - // weight = //TODO - // } - // ] - // name = //TODO - // status = //TODO - // trigger = { - // configuration = { - // mfa = { - // enabled = //TODO - // time = //TODO - // time_format = //TODO - // } - // pwd = { - // enabled = //TODO - // time = //TODO - // time_format = //TODO - // } - // } - // type = //TODO - // } + name = "%[2]s" + description = "This is a first demo flow" + color = "#00FF00" + + graph_data = { + elements = { + edges = [] + nodes = [{ + data = { + id = "nodefirstflow" + node_type = "CONNECTION" + connector_id = "pingOneSSOConnector" + label = "PingOne" + status = "configured" + capability_name = "userLookup" + type = "action" + properties = jsonencode({ + "additionalUserProperties" : { + "value" : [] + }, + "username" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + }, + "population" : { + "value" : "c9f3fb3f-11e9-4eb0-b4ba-9fb7789a8418" + }, + "userIdentifierForFindUser" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 420 + y = 360 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }] + } + + data = "{}" + + box_selection_enabled = true + user_zooming_enabled = true + zooming_enabled = true + zoom = 1 + min_zoom = 0.01 + max_zoom = 10000 + pannable = true + panning_enabled = true + user_panning_enabled = true + + pan = { + x = 0 + y = 0 + } + + renderer = jsonencode({ + "name" : "null" + }) + } + + settings = { + csp = "worker-src 'self' blob:; script-src 'self' https://cdn.jsdelivr.net https://code.jquery.com https://devsdk.singularkey.com http://cdnjs.cloudflare.com 'unsafe-inline' 'unsafe-eval';" + intermediate_loading_screen_css = "" + intermediate_loading_screen_html = "" + log_level = 2 + } + + output_schema = { + output = { + type = "object", + properties = jsonencode({}), + additionalProperties = true + } + } + + trigger = { + type = "AUTHENTICATION" + } +} + +resource "pingone_davinci_flow" "%[2]s-second" { + environment_id = data.pingone_environment.general_test.id + name = "%[2]s" + description = "This is a second demo flow" + color = "#00FF00" + + graph_data = { + elements = { + edges = [] + nodes = [{ + data = { + id = "nodesecondflow1" + node_type = "CONNECTION" + connector_id = "pingOneSSOConnector" + label = "PingOne" + status = "configured" + capability_name = "userLookup" + type = "action" + properties = jsonencode({ + "additionalUserProperties" : { + "value" : [] + }, + "username" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + }, + "population" : { + "value" : "c9f3fb3f-11e9-4eb0-b4ba-9fb7789a8418" + }, + "userIdentifierForFindUser" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 420 + y = 360 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }, + { + data = { + id = "nodesecondflow2" + node_type = "CONNECTION" + connector_id = "pingOneSSOConnector" + label = "PingOne" + status = "configured" + capability_name = "userLookup" + type = "action" + properties = jsonencode({ + "additionalUserProperties" : { + "value" : [] + }, + "username" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + }, + "population" : { + "value" : "c9f3fb3f-11e9-4eb0-b4ba-9fb7789a8418" + }, + "userIdentifierForFindUser" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 420 + y = 360 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }] + } + + data = "{}" + + box_selection_enabled = true + user_zooming_enabled = true + zooming_enabled = true + zoom = 1 + min_zoom = 0.01 + max_zoom = 10000 + pannable = true + panning_enabled = true + user_panning_enabled = true + + pan = { + x = 0 + y = 0 + } + + renderer = jsonencode({ + "name" : "null" + }) + } + + settings = { + csp = "worker-src 'self' blob:; script-src 'self' https://cdn.jsdelivr.net https://code.jquery.com https://devsdk.singularkey.com http://cdnjs.cloudflare.com 'unsafe-inline' 'unsafe-eval';" + intermediate_loading_screen_css = "" + intermediate_loading_screen_html = "" + log_level = 2 + } + + output_schema = { + output = { + type = "object", + properties = jsonencode({}), + additionalProperties = true + } + } + + trigger = { + type = "AUTHENTICATION" + } +} + +resource "pingone_davinci_application_flow_policy" "%[2]s" { + environment_id = data.pingone_environment.general_test.id + da_vinci_application_id = pingone_davinci_application.%[2]s.id + flow_distributions = [ + { + id = pingone_davinci_flow.%[2]s-second.id + ip = [ + "2.2.2.2/2", + "0.0.0.0/0", + "1.1.1.1/1", + ] + success_nodes = [ + { + id = "nodesecondflow2" + }, + { + id = "nodesecondflow1" + }, + ] + version = 0 + weight = 55 + }, + { + id = pingone_davinci_flow.%[2]s-first.id + ip = [ + "1.1.1.1/1", + "0.0.0.0/0", + ] + success_nodes = [ + { + id = "nodefirstflow" + } + ] + version = 0 + weight = 45 + } + ] + name = "Updated policy" + status = "disabled" + trigger = { + configuration = { + mfa = { + enabled = true + time = 5 + time_format = "hour" + } + pwd = { + enabled = false + time = 3 + time_format = "day" + } + } + type = "AUTHENTICATION" + } + # Ensures this resource will be updated before deleting the flow + lifecycle { + create_before_destroy = true + } } `, acctest.GenericSandboxEnvironment(), resourceName) } @@ -352,13 +925,102 @@ resource "pingone_davinci_application" "%[3]s" { name = "%[3]s" } +resource "pingone_davinci_flow" "%[2]s" { + environment_id = pingone_environment.%[2]s.id + name = "%[2]s" + description = "This is a demo flow" + color = "#00FF00" + + graph_data = { + elements = { + edges = [] + nodes = [{ + data = { + id = "8bnj41592a" + node_type = "CONNECTION" + connector_id = "pingOneSSOConnector" + label = "PingOne" + status = "configured" + capability_name = "userLookup" + type = "action" + properties = jsonencode({ + "additionalUserProperties" : { + "value" : [] + }, + "username" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + }, + "population" : { + "value" : "c9f3fb3f-11e9-4eb0-b4ba-9fb7789a8418" + }, + "userIdentifierForFindUser" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 420 + y = 360 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }] + } + + data = "{}" + + box_selection_enabled = true + user_zooming_enabled = true + zooming_enabled = true + zoom = 1 + min_zoom = 0.01 + max_zoom = 10000 + pannable = true + panning_enabled = true + user_panning_enabled = true + + pan = { + x = 0 + y = 0 + } + + renderer = jsonencode({ + "name" : "null" + }) + } + + settings = { + csp = "worker-src 'self' blob:; script-src 'self' https://cdn.jsdelivr.net https://code.jquery.com https://devsdk.singularkey.com http://cdnjs.cloudflare.com 'unsafe-inline' 'unsafe-eval';" + intermediate_loading_screen_css = "" + intermediate_loading_screen_html = "" + log_level = 2 + } + + output_schema = { + output = { + type = "object", + properties = jsonencode({}), + additionalProperties = true + } + } + + trigger = { + type = "AUTHENTICATION" + } +} + resource "pingone_davinci_application_flow_policy" "%[3]s" { environment_id = pingone_environment.%[2]s.id 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 - id = "ea3bf86e79daf74f0262a317190e02dd" + id = pingone_davinci_flow.%[2]s.id version = 0 } ] @@ -369,32 +1031,28 @@ resource "pingone_davinci_application_flow_policy" "%[3]s" { // Validate any computed values when applying minimal HCL func davinciApplicationFlowPolicy_CheckComputedValuesMinimal(resourceName string) resource.TestCheckFunc { return resource.ComposeTestCheckFunc( + resource.TestMatchResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "id", verify.P1DVResourceIDRegexp), resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "name", "New Policy"), resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "status", "enabled"), - resource.TestCheckNoResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "trigger"), resource.TestCheckNoResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "flow_distributions.0.ip"), resource.TestCheckNoResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "flow_distributions.0.success_nodes"), resource.TestCheckNoResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "flow_distributions.0.weight"), + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "trigger.type", "AUTHENTICATION"), + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "trigger.configuration.mfa.enabled", "false"), + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "trigger.configuration.mfa.time", "0"), + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "trigger.configuration.mfa.time_format", "min"), + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "trigger.configuration.pwd.enabled", "false"), + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "trigger.configuration.pwd.time", "0"), + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "trigger.configuration.pwd.time_format", "min"), ) } // 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 -// TODO remove any values that are not computed from this check -// TODO set expected values -// func davinciApplicationFlowPolicy_CheckComputedValuesComplete(resourceName string) resource.TestCheckFunc { -// return resource.ComposeTestCheckFunc( -// resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "name", "expected_value"), -// resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "status", "expected_value"), -// resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "trigger.configuration.mfa.enabled", "expected_value"), -// resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "trigger.configuration.mfa.time", "expected_value"), -// resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "trigger.configuration.mfa.time_format", "expected_value"), -// resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "trigger.configuration.pwd.enabled", "expected_value"), -// resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "trigger.configuration.pwd.time", "expected_value"), -// resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "trigger.configuration.pwd.time_format", "expected_value"), -// resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "trigger.type", "expected_value"), -// ) -// } +func davinciApplicationFlowPolicy_CheckComputedValuesComplete(resourceName string) resource.TestCheckFunc { + return resource.ComposeTestCheckFunc( + resource.TestMatchResourceAttr(fmt.Sprintf("pingone_davinci_application_flow_policy.%s", resourceName), "id", verify.P1DVResourceIDRegexp), + ) +} func davinciApplicationFlowPolicy_GetIDs(resourceName string, environmentId, daVinciApplicationId, id *string) resource.TestCheckFunc { return func(s *terraform.State) error { diff --git a/internal/service/davinci/resource_davinci_application_gen.go b/internal/service/davinci/resource_davinci_application_gen.go index da96310c8..013873acc 100644 --- a/internal/service/davinci/resource_davinci_application_gen.go +++ b/internal/service/davinci/resource_davinci_application_gen.go @@ -398,7 +398,7 @@ func (r *davinciApplicationResource) Read(ctx context.Context, req resource.Read }, "GetDavinciApplicationById", framework.CustomErrorResourceNotFoundWarning, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) @@ -466,7 +466,7 @@ func (r *davinciApplicationResource) Update(ctx context.Context, req resource.Up }, "ReplaceDavinciApplicationById", framework.DefaultCustomError, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) @@ -521,7 +521,7 @@ func (r *davinciApplicationResource) Delete(ctx context.Context, req resource.De }, "DeleteDavinciApplicationById", framework.CustomErrorResourceNotFoundWarning, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, nil, )...) } diff --git a/internal/service/davinci/resource_davinci_application_key.go b/internal/service/davinci/resource_davinci_application_key.go index a1d10af66..ab5b329cf 100644 --- a/internal/service/davinci/resource_davinci_application_key.go +++ b/internal/service/davinci/resource_davinci_application_key.go @@ -229,7 +229,7 @@ func (r *davinciApplicationKeyResource) Create(ctx context.Context, req resource }, "RotateDavinciApplicationApiKey", framework.DefaultCustomError, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) @@ -285,7 +285,7 @@ func (r *davinciApplicationKeyResource) Read(ctx context.Context, req resource.R }, "GetDavinciApplicationById", framework.CustomErrorResourceNotFoundWarning, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) diff --git a/internal/service/davinci/resource_davinci_application_secret.go b/internal/service/davinci/resource_davinci_application_secret.go index 6a6a37184..b571612ae 100644 --- a/internal/service/davinci/resource_davinci_application_secret.go +++ b/internal/service/davinci/resource_davinci_application_secret.go @@ -220,7 +220,7 @@ func (r *davinciApplicationSecretResource) Create(ctx context.Context, req resou }, "RotateDavinciApplicationSecret", framework.DefaultCustomError, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) @@ -276,7 +276,7 @@ func (r *davinciApplicationSecretResource) Read(ctx context.Context, req resourc }, "GetDavinciApplicationById", framework.CustomErrorResourceNotFoundWarning, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) diff --git a/internal/service/davinci/resource_davinci_connector_instance_gen.go b/internal/service/davinci/resource_davinci_connector_instance_gen.go index 0879664b3..06f23e0c0 100644 --- a/internal/service/davinci/resource_davinci_connector_instance_gen.go +++ b/internal/service/davinci/resource_davinci_connector_instance_gen.go @@ -254,7 +254,7 @@ func (r *davinciConnectorInstanceResource) Create(ctx context.Context, req resou }, "CreateConnectorInstance", framework.DefaultCustomError, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) @@ -310,7 +310,7 @@ func (r *davinciConnectorInstanceResource) Read(ctx context.Context, req resourc }, "GetConnectorInstanceById", framework.CustomErrorResourceNotFoundWarning, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) @@ -378,7 +378,7 @@ func (r *davinciConnectorInstanceResource) Update(ctx context.Context, req resou }, "ReplaceConnectorInstanceById", framework.DefaultCustomError, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) @@ -433,7 +433,7 @@ func (r *davinciConnectorInstanceResource) Delete(ctx context.Context, req resou }, "DeleteConnectorInstanceById", framework.CustomErrorResourceNotFoundWarning, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, nil, )...) } diff --git a/internal/service/davinci/resource_davinci_flow.go b/internal/service/davinci/resource_davinci_flow.go new file mode 100644 index 000000000..b0a8e7da3 --- /dev/null +++ b/internal/service/davinci/resource_davinci_flow.go @@ -0,0 +1,260 @@ +// Copyright © 2025 Ping Identity Corporation +// Code generated by ping-terraform-plugin-framework-generator + +//go:build beta + +package davinci + +import ( + "context" + "fmt" + "net/http" + + "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/pingidentity/pingone-go-client/pingone" + "github.com/pingidentity/terraform-provider-pingone/internal/framework" +) + +var ( + _ resource.ResourceWithValidateConfig = &davinciFlowResource{} + _ resource.ResourceWithModifyPlan = &davinciFlowResource{} + + inputSchemaElemAttrTypes = map[string]attr.Type{ + "description": types.StringType, + "is_expanded": types.BoolType, + "preferred_control_type": types.StringType, + "preferred_data_type": types.StringType, + "property_name": types.StringType, + "required": types.BoolType, + } + + inputSchemaDefault = types.ListValueMust( + types.ObjectType{AttrTypes: inputSchemaElemAttrTypes}, + []attr.Value{ + types.ObjectValueMust(inputSchemaElemAttrTypes, map[string]attr.Value{ + "description": types.StringValue("A string that specifies an identifier to pre-fill the username field of a sign-on screen."), + "is_expanded": types.BoolValue(true), + "preferred_control_type": types.StringValue("textField"), + "preferred_data_type": types.StringValue("string"), + "property_name": types.StringValue("loginHint"), + "required": types.BoolValue(false), + }), + types.ObjectValueMust(inputSchemaElemAttrTypes, map[string]attr.Value{ + "description": types.StringValue("An integer that specifies the maximum amount of time allowed (in seconds) since the user last authenticated. If the user's last sign on in the session is greater than the integer value specified in this property, then existing session information cannot be used to skip authentication or influence any authentication logic. This value is set automatically to 0 if prompt=login is set for an OIDC application or if ForceAuthn=true is set for a SAML application. Otherwise, this value is set to the max_age property value for OIDC applications, if present, or omitted otherwise."), + "is_expanded": types.BoolValue(true), + "preferred_control_type": types.StringValue("textField"), + "preferred_data_type": types.StringValue("number"), + "property_name": types.StringValue("maxSecondsSinceLastSignOn"), + "required": types.BoolValue(false), + }), + types.ObjectValueMust(inputSchemaElemAttrTypes, map[string]attr.Value{ + "description": types.StringValue("An object that specifies all the parameters from the OIDC authorization request."), + "is_expanded": types.BoolValue(true), + "preferred_control_type": types.StringValue("textField"), + "preferred_data_type": types.StringValue("object"), + "property_name": types.StringValue("authorizationRequest"), + "required": types.BoolValue(false), + }), + types.ObjectValueMust(inputSchemaElemAttrTypes, map[string]attr.Value{ + "description": types.StringValue("An object that specifies all the parameters from the SAML request."), + "is_expanded": types.BoolValue(true), + "preferred_control_type": types.StringValue("textField"), + "preferred_data_type": types.StringValue("object"), + "property_name": types.StringValue("samlRequest"), + "required": types.BoolValue(false), + }), + types.ObjectValueMust(inputSchemaElemAttrTypes, map[string]attr.Value{ + "description": types.StringValue("An object that specifies all the parameters from the WS-FED request."), + "is_expanded": types.BoolValue(true), + "preferred_control_type": types.StringValue("textField"), + "preferred_data_type": types.StringValue("object"), + "property_name": types.StringValue("wsFedRequest"), + "required": types.BoolValue(false), + }), + types.ObjectValueMust(inputSchemaElemAttrTypes, map[string]attr.Value{ + "description": types.StringValue("An object that specifies the configuration information about the PingOne application that initiated the authentication request."), + "is_expanded": types.BoolValue(true), + "preferred_control_type": types.StringValue("textField"), + "preferred_data_type": types.StringValue("object"), + "property_name": types.StringValue("application"), + "required": types.BoolValue(true), + }), + types.ObjectValueMust(inputSchemaElemAttrTypes, map[string]attr.Value{ + "description": types.StringValue("Internal information that is only useful to P1. This is meant to be opaque and may be changed or removed in the future."), + "is_expanded": types.BoolValue(true), + "preferred_control_type": types.StringValue("textField"), + "preferred_data_type": types.StringValue("object"), + "property_name": types.StringValue("relayState"), + "required": types.BoolValue(true), + }), + }, + ) +) + +func (r *davinciFlowResource) ValidateConfig(ctx context.Context, req resource.ValidateConfigRequest, resp *resource.ValidateConfigResponse) { + var data *davinciFlowResourceModel + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() || data == nil { + return + } + + // Ensure that if trigger.type is set to AUTHENTICATION, input_schema is not set. + if !data.Trigger.IsNull() && !data.Trigger.IsUnknown() { + triggerType := data.Trigger.Attributes()["type"].(types.String).ValueString() + if triggerType == "AUTHENTICATION" && !data.InputSchema.IsNull() && !data.InputSchema.IsUnknown() { + resp.Diagnostics.AddAttributeError( + path.Root("input_schema"), + "Attribute value conflict", + "input_schema must not be configured when trigger.type is set to AUTHENTICATION", + ) + } + } +} + +func (r *davinciFlowResource) ModifyPlan(ctx context.Context, req resource.ModifyPlanRequest, resp *resource.ModifyPlanResponse) { + var config, plan *davinciFlowResourceModel + resp.Diagnostics.Append(req.Config.Get(ctx, &config)...) + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + if resp.Diagnostics.HasError() || plan == nil || config == nil { + return + } + + // If trigger.type is set to AUTHENTICATION and input_schema is Unknown, set the default value + triggerTypeAuthentication := false + if !plan.Trigger.IsNull() && !plan.Trigger.IsUnknown() { + triggerTypeAuthentication = plan.Trigger.Attributes()["type"].(types.String).ValueString() == "AUTHENTICATION" + } + + if plan.InputSchema.IsUnknown() { + if triggerTypeAuthentication { + plan.InputSchema = inputSchemaDefault + } else if config.InputSchema.IsNull() { + // Set to null if not configured + plan.InputSchema = types.ListNull(types.ObjectType{AttrTypes: inputSchemaElemAttrTypes}) + } + resp.Diagnostics.Append(resp.Plan.Set(ctx, plan)...) + } +} + +func (m *davinciFlowResourceModel) getGraphDataElementsNodes() *types.Set { + if !m.GraphData.IsNull() && !m.GraphData.IsUnknown() { + graphDataAttrs := m.GraphData.Attributes() + if !graphDataAttrs["elements"].IsNull() && !graphDataAttrs["elements"].IsUnknown() { + graphDataElementsAttrs := graphDataAttrs["elements"].(types.Object).Attributes() + nodesSet, ok := graphDataElementsAttrs["nodes"].(types.Set) + if ok { + return &nodesSet + } + } + } + return nil +} + +func (r *davinciFlowResource) isUpdateRequiredAfterCreate(plan, createResponse davinciFlowResourceModel) bool { + planNodes := plan.getGraphDataElementsNodes() + createResponseNodes := createResponse.getGraphDataElementsNodes() + + // Check that the create returned all the nodes, but the content did not match the plan + return len(planNodes.Elements()) == len(createResponseNodes.Elements()) && !planNodes.Equal(createResponseNodes) +} + +func (r *davinciFlowResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + var data, createResponseModel davinciFlowResourceModel + + if r.Client == nil { + resp.Diagnostics.AddError( + "Client not initialized", + "Expected the PingOne client, got nil. Please report this issue to the provider maintainers.") + return + } + + // Read Terraform plan data into the model + resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + // Create API call logic + clientData, diags := data.buildClientStructPost() + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + environmentIdUuid, err := uuid.Parse(data.EnvironmentId.ValueString()) + if err != nil { + resp.Diagnostics.AddAttributeError( + path.Root("environment_id"), + "Attribute Validation Error", + fmt.Sprintf("The value '%s' for attribute '%s' is not a valid UUID: %s", data.EnvironmentId.ValueString(), "EnvironmentId", err.Error()), + ) + return + } + var createResponseData *pingone.DaVinciFlowResponse + resp.Diagnostics.Append(framework.ParseResponse( + ctx, + + func() (any, *http.Response, error) { + fO, fR, fErr := r.Client.DaVinciFlowsApi.CreateFlow(ctx, environmentIdUuid).DaVinciFlowCreateRequest(*clientData).Execute() + return framework.CheckEnvironmentExistsOnPermissionsError(ctx, r.Client, data.EnvironmentId.ValueString(), fO, fR, fErr) + }, + "CreateFlow", + framework.DefaultCustomError, + framework.InsufficientPrivilegeRetryable, + &createResponseData, + )...) + + if resp.Diagnostics.HasError() { + return + } + + // Read create response into new model + resp.Diagnostics.Append(createResponseModel.readClientResponse(createResponseData)...) + + // Currently certain fields require an update call after initial create to set (TRIAGE-29360) + // If the node count is correct but the contents are not equal, an update is necessary + if r.isUpdateRequiredAfterCreate(data, createResponseModel) { + // Update API call logic + putClientData, diags := data.buildClientStructPut() + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + var updateResponseData *pingone.DaVinciFlowResponse + resp.Diagnostics.Append(framework.ParseResponse( + ctx, + + func() (any, *http.Response, error) { + fO, fR, fErr := r.Client.DaVinciFlowsApi.ReplaceFlowById(ctx, environmentIdUuid, createResponseData.Id).DaVinciFlowReplaceRequest(*putClientData).Execute() + return framework.CheckEnvironmentExistsOnPermissionsError(ctx, r.Client, data.EnvironmentId.ValueString(), fO, fR, fErr) + }, + "ReplaceFlowById-Create", + framework.DefaultCustomError, + framework.InsufficientPrivilegeRetryable, + &updateResponseData, + )...) + + if resp.Diagnostics.HasError() { + return + } + + // Read response into the model + resp.Diagnostics.Append(data.readClientResponse(updateResponseData)...) + } else { + // Just use the create response directly + resp.Diagnostics.Append(data.readClientResponse(createResponseData)...) + } + + if resp.Diagnostics.HasError() { + return + } + + // Save data into Terraform state + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} diff --git a/internal/service/davinci/resource_davinci_flow_gen.go b/internal/service/davinci/resource_davinci_flow_gen.go new file mode 100644 index 000000000..02cbad2cc --- /dev/null +++ b/internal/service/davinci/resource_davinci_flow_gen.go @@ -0,0 +1,2117 @@ +// Copyright © 2025 Ping Identity Corporation +// Code generated by ping-terraform-plugin-framework-generator + +//go:build beta + +package davinci + +import ( + "context" + "encoding/json" + "fmt" + "net/http" + "regexp" + + "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" + "github.com/hashicorp/terraform-plugin-framework-validators/int32validator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "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" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int32default" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectdefault" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setdefault" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/pingidentity/pingone-go-client/pingone" + pingonetypes "github.com/pingidentity/pingone-go-client/types" + "github.com/pingidentity/terraform-provider-pingone/internal/framework" + internalstringvalidator "github.com/pingidentity/terraform-provider-pingone/internal/framework/stringvalidator" + "github.com/pingidentity/terraform-provider-pingone/internal/verify" +) + +var ( + _ resource.Resource = &davinciFlowResource{} + _ resource.ResourceWithConfigure = &davinciFlowResource{} + _ resource.ResourceWithImportState = &davinciFlowResource{} +) + +func NewDavinciFlowResource() resource.Resource { + return &davinciFlowResource{} +} + +type davinciFlowResource serviceClientType + +func (r *davinciFlowResource) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { + resp.TypeName = req.ProviderTypeName + "_davinci_flow" +} + +func (r *davinciFlowResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { + if req.ProviderData == nil { + return + } + + resourceConfig, ok := req.ProviderData.(framework.ResourceType) + if !ok { + resp.Diagnostics.AddError( + "Unexpected Resource Configure Type", + fmt.Sprintf("Expected the provider client, got: %T. Please report this issue to the provider maintainers.", req.ProviderData), + ) + + return + } + + r.Client = resourceConfig.Client + if r.Client == nil { + resp.Diagnostics.AddError( + "Client not initialised", + "Expected the PingOne client, got nil. Please report this issue to the provider maintainers.", + ) + return + } +} + +type davinciFlowResourceModel struct { + Color types.String `tfsdk:"color"` + Connectors types.Set `tfsdk:"connectors"` + CurrentVersion types.Float32 `tfsdk:"current_version"` + Description types.String `tfsdk:"description"` + Enabled types.Bool `tfsdk:"enabled"` + EnvironmentId types.String `tfsdk:"environment_id"` + GraphData types.Object `tfsdk:"graph_data"` + Id types.String `tfsdk:"id"` + InputSchema types.List `tfsdk:"input_schema"` + Name types.String `tfsdk:"name"` + OutputSchema types.Object `tfsdk:"output_schema"` + PublishedVersion types.Float32 `tfsdk:"published_version"` + Settings types.Object `tfsdk:"settings"` + Trigger types.Object `tfsdk:"trigger"` +} + +func (r *davinciFlowResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { + graphDataElementsEdgesDataAttrTypes := map[string]attr.Type{ + "id": types.StringType, + "source": types.StringType, + "target": types.StringType, + } + graphDataElementsEdgesPositionAttrTypes := map[string]attr.Type{ + "x": types.Float32Type, + "y": types.Float32Type, + } + graphDataElementsEdgesAttrTypes := map[string]attr.Type{ + "classes": types.StringType, + "data": types.ObjectType{AttrTypes: graphDataElementsEdgesDataAttrTypes}, + "grabbable": types.BoolType, + "group": types.StringType, + "locked": types.BoolType, + "pannable": types.BoolType, + "position": types.ObjectType{AttrTypes: graphDataElementsEdgesPositionAttrTypes}, + "removed": types.BoolType, + "selectable": types.BoolType, + "selected": types.BoolType, + } + graphDataElementsEdgesElementType := types.ObjectType{AttrTypes: graphDataElementsEdgesAttrTypes} + settingsJsLinksAttrTypes := map[string]attr.Type{ + "crossorigin": types.StringType, + "defer": types.BoolType, + "integrity": types.StringType, + "label": types.StringType, + "referrerpolicy": types.StringType, + "type": types.StringType, + "value": types.StringType, + } + settingsJsLinksElementType := types.ObjectType{AttrTypes: settingsJsLinksAttrTypes} + settingsAttrTypes := map[string]attr.Type{ + "csp": types.StringType, + "css": types.StringType, + "css_links": types.SetType{ElemType: types.StringType}, + "custom_error_screen_brand_logo_url": types.StringType, + "custom_error_show_footer": types.BoolType, + "custom_favicon_link": types.StringType, + "custom_logo_urlselection": types.Int32Type, + "custom_title": types.StringType, + "default_error_screen_brand_logo": types.BoolType, + "flow_http_timeout_in_seconds": types.Int32Type, + "flow_timeout_in_seconds": types.Int32Type, + "intermediate_loading_screen_css": types.StringType, + "intermediate_loading_screen_html": types.StringType, + "js_custom_flow_player": types.StringType, + "js_links": types.SetType{ElemType: settingsJsLinksElementType}, + "log_level": types.Int32Type, + "require_authentication_to_initiate": types.BoolType, + "scrub_sensitive_info": types.BoolType, + "sensitive_info_fields": types.SetType{ElemType: types.StringType}, + "use_csp": types.BoolType, + "use_custom_css": types.BoolType, + "use_custom_flow_player": types.BoolType, + "use_custom_script": types.BoolType, + "use_intermediate_loading_screen": types.BoolType, + "validate_on_save": types.BoolType, + } + resp.Schema = schema.Schema{ + Description: "Resource to create and manage a davinci flow.", + Attributes: map[string]schema.Attribute{ + "color": schema.StringAttribute{ + Optional: true, + }, + "connectors": schema.SetNestedAttribute{ + NestedObject: schema.NestedAttributeObject{ + Attributes: map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Computed: true, + }, + }, + }, + Computed: true, + }, + "current_version": schema.Float32Attribute{ + Computed: true, + }, + "description": schema.StringAttribute{ + Optional: true, + Validators: []validator.String{ + stringvalidator.LengthAtMost(1024), + stringvalidator.LengthAtLeast(1), + }, + }, + "enabled": schema.BoolAttribute{ + Computed: true, + }, + "environment_id": schema.StringAttribute{ + Required: true, + Description: "The ID of the environment to create and manage the flow in. Must be a valid PingOne resource ID. This field is immutable and will trigger a replace plan if changed.", + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + Validators: []validator.String{ + 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"), + }, + }, + "graph_data": schema.SingleNestedAttribute{ + Attributes: map[string]schema.Attribute{ + "box_selection_enabled": schema.BoolAttribute{ + Optional: true, + }, + "data": schema.StringAttribute{ + CustomType: jsontypes.NormalizedType{}, + Optional: true, + }, + "elements": schema.SingleNestedAttribute{ + Attributes: map[string]schema.Attribute{ + "edges": schema.SetNestedAttribute{ + NestedObject: schema.NestedAttributeObject{ + Attributes: map[string]schema.Attribute{ + "classes": schema.StringAttribute{ + Optional: true, + }, + "data": schema.SingleNestedAttribute{ + Attributes: map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Required: true, + Validators: []validator.String{ + stringvalidator.LengthAtLeast(1), + }, + }, + "source": schema.StringAttribute{ + Required: true, + Validators: []validator.String{ + stringvalidator.LengthAtLeast(1), + }, + }, + "target": schema.StringAttribute{ + Required: true, + Validators: []validator.String{ + stringvalidator.LengthAtLeast(1), + }, + }, + }, + Required: true, + }, + "grabbable": schema.BoolAttribute{ + Optional: true, + }, + "group": schema.StringAttribute{ + Optional: true, + }, + "locked": schema.BoolAttribute{ + Optional: true, + }, + "pannable": schema.BoolAttribute{ + Optional: true, + }, + "position": schema.SingleNestedAttribute{ + Attributes: map[string]schema.Attribute{ + "x": schema.Float32Attribute{ + Required: true, + }, + "y": schema.Float32Attribute{ + Required: true, + }, + }, + Optional: true, + }, + "removed": schema.BoolAttribute{ + Optional: true, + }, + "selectable": schema.BoolAttribute{ + Optional: true, + }, + "selected": schema.BoolAttribute{ + Optional: true, + }, + }, + }, + Optional: true, + Computed: true, + Default: setdefault.StaticValue(types.SetValueMust(graphDataElementsEdgesElementType, nil)), + }, + "nodes": schema.SetNestedAttribute{ + NestedObject: schema.NestedAttributeObject{ + Attributes: map[string]schema.Attribute{ + "classes": schema.StringAttribute{ + Optional: true, + }, + "data": schema.SingleNestedAttribute{ + Attributes: map[string]schema.Attribute{ + "capability_name": schema.StringAttribute{ + Optional: true, + }, + "connection_id": schema.StringAttribute{ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "connector_id": schema.StringAttribute{ + Optional: true, + }, + "id": schema.StringAttribute{ + Required: true, + Validators: []validator.String{ + stringvalidator.LengthAtLeast(1), + }, + }, + "id_unique": schema.StringAttribute{ + Computed: true, + }, + "label": schema.StringAttribute{ + Optional: true, + }, + "name": schema.StringAttribute{ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "node_type": schema.StringAttribute{ + Required: true, + Validators: []validator.String{ + stringvalidator.LengthAtLeast(1), + }, + }, + "properties": schema.StringAttribute{ + CustomType: jsontypes.NormalizedType{}, + Optional: true, + Sensitive: true, + }, + "status": schema.StringAttribute{ + Optional: true, + }, + "type": schema.StringAttribute{ + Optional: true, + }, + }, + Required: true, + }, + "grabbable": schema.BoolAttribute{ + Optional: true, + }, + "group": schema.StringAttribute{ + Optional: true, + }, + "locked": schema.BoolAttribute{ + Optional: true, + }, + "pannable": schema.BoolAttribute{ + Optional: true, + }, + "position": schema.SingleNestedAttribute{ + Attributes: map[string]schema.Attribute{ + "x": schema.Float32Attribute{ + Required: true, + }, + "y": schema.Float32Attribute{ + Required: true, + }, + }, + Optional: true, + }, + "removed": schema.BoolAttribute{ + Optional: true, + }, + "selectable": schema.BoolAttribute{ + Optional: true, + }, + "selected": schema.BoolAttribute{ + Optional: true, + }, + }, + }, + Optional: true, + }, + }, + Optional: true, + }, + "max_zoom": schema.NumberAttribute{ + Optional: true, + }, + "min_zoom": schema.NumberAttribute{ + Optional: true, + }, + "pan": schema.SingleNestedAttribute{ + Attributes: map[string]schema.Attribute{ + "x": schema.Float32Attribute{ + Required: true, + }, + "y": schema.Float32Attribute{ + Required: true, + }, + }, + Optional: true, + }, + "panning_enabled": schema.BoolAttribute{ + Optional: true, + }, + "renderer": schema.StringAttribute{ + CustomType: jsontypes.NormalizedType{}, + Optional: true, + }, + "user_panning_enabled": schema.BoolAttribute{ + Optional: true, + }, + "user_zooming_enabled": schema.BoolAttribute{ + Optional: true, + }, + "zoom": schema.Int32Attribute{ + Optional: true, + }, + "zooming_enabled": schema.BoolAttribute{ + Optional: true, + }, + }, + Optional: true, + }, + "id": schema.StringAttribute{ + Computed: true, + Description: "The ID of this resource.", + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "input_schema": schema.ListNestedAttribute{ + NestedObject: schema.NestedAttributeObject{ + Attributes: map[string]schema.Attribute{ + "description": schema.StringAttribute{ + Optional: true, + Computed: true, + }, + "is_expanded": schema.BoolAttribute{ + Optional: true, + Computed: true, + }, + "preferred_control_type": schema.StringAttribute{ + Optional: true, + Computed: true, + Description: "Options are \"button\", \"colorPicker\", \"contentEditableTextArea\", \"cssArea\", \"dropDown\", \"dropDownMultiSelect\", \"dropDownMultiSelect2\", \"dropDownWithCreate\", \"functionArgumentList\", \"keyValueList\", \"label\", \"radioSelect\", \"textArea\", \"textField\", \"textFieldArrayView\", \"toggleSwitch\".", + MarkdownDescription: "Options are `button`, `colorPicker`, `contentEditableTextArea`, `cssArea`, `dropDown`, `dropDownMultiSelect`, `dropDownMultiSelect2`, `dropDownWithCreate`, `functionArgumentList`, `keyValueList`, `label`, `radioSelect`, `textArea`, `textField`, `textFieldArrayView`, `toggleSwitch`.", + Validators: []validator.String{ + stringvalidator.OneOf( + "button", + "colorPicker", + "contentEditableTextArea", + "cssArea", + "dropDown", + "dropDownMultiSelect", + "dropDownMultiSelect2", + "dropDownWithCreate", + "functionArgumentList", + "keyValueList", + "label", + "radioSelect", + "textArea", + "textField", + "textFieldArrayView", + "toggleSwitch", + ), + }, + }, + "preferred_data_type": schema.StringAttribute{ + Optional: true, + Computed: true, + Description: "Options are \"array\", \"boolean\", \"number\", \"object\", \"string\".", + MarkdownDescription: "Options are `array`, `boolean`, `number`, `object`, `string`.", + Validators: []validator.String{ + stringvalidator.OneOf( + "array", + "boolean", + "number", + "object", + "string", + ), + stringvalidator.LengthAtLeast(1), + // This attribute is required by the API, but can't be marked as such or it will cause unnecessary plans + // See https://github.com/hashicorp/terraform-plugin-framework/issues/898 + internalstringvalidator.NotNull(), + }, + }, + "property_name": schema.StringAttribute{ + Optional: true, + Computed: true, + Validators: []validator.String{ + stringvalidator.LengthAtLeast(1), + // This attribute is required by the API, but can't be marked as such or it will cause unnecessary plans + // See https://github.com/hashicorp/terraform-plugin-framework/issues/898 + internalstringvalidator.NotNull(), + }, + }, + "required": schema.BoolAttribute{ + Optional: true, + Computed: true, + }, + }, + }, + Optional: true, + Computed: true, + }, + "name": schema.StringAttribute{ + Required: true, + Validators: []validator.String{ + stringvalidator.LengthBetween(1, 256), + }, + }, + "output_schema": schema.SingleNestedAttribute{ + Attributes: map[string]schema.Attribute{ + "output": schema.SingleNestedAttribute{ + Required: true, + Attributes: map[string]schema.Attribute{ + "type": schema.StringAttribute{ + Required: true, + }, + "properties": schema.StringAttribute{ + CustomType: jsontypes.NormalizedType{}, + Optional: true, + }, + "additional_properties": schema.BoolAttribute{ + Optional: true, + }, + }, + }, + }, + Optional: true, + }, + "published_version": schema.Float32Attribute{ + Computed: true, + }, + "settings": schema.SingleNestedAttribute{ + Attributes: map[string]schema.Attribute{ + "csp": schema.StringAttribute{ + Optional: true, + }, + "css": schema.StringAttribute{ + Optional: true, + }, + "css_links": schema.SetAttribute{ + ElementType: types.StringType, + Optional: true, + }, + "custom_error_screen_brand_logo_url": schema.StringAttribute{ + Optional: true, + }, + "custom_error_show_footer": schema.BoolAttribute{ + Optional: true, + }, + "custom_favicon_link": schema.StringAttribute{ + Optional: true, + }, + "custom_logo_urlselection": schema.Int32Attribute{ + Optional: true, + }, + "custom_title": schema.StringAttribute{ + Optional: true, + }, + "default_error_screen_brand_logo": schema.BoolAttribute{ + Optional: true, + }, + "flow_http_timeout_in_seconds": schema.Int32Attribute{ + Optional: true, + }, + "flow_timeout_in_seconds": schema.Int32Attribute{ + Optional: true, + }, + "intermediate_loading_screen_css": schema.StringAttribute{ + Optional: true, + }, + "intermediate_loading_screen_html": schema.StringAttribute{ + Optional: true, + }, + "js_custom_flow_player": schema.StringAttribute{ + Optional: true, + }, + "js_links": schema.SetNestedAttribute{ + NestedObject: schema.NestedAttributeObject{ + Attributes: map[string]schema.Attribute{ + "crossorigin": schema.StringAttribute{ + Required: true, + Validators: []validator.String{ + stringvalidator.LengthAtLeast(1), + }, + }, + "defer": schema.BoolAttribute{ + Required: true, + }, + "integrity": schema.StringAttribute{ + Required: true, + Validators: []validator.String{ + stringvalidator.LengthAtLeast(1), + }, + }, + "label": schema.StringAttribute{ + Required: true, + Validators: []validator.String{ + stringvalidator.LengthAtLeast(1), + }, + }, + "referrerpolicy": schema.StringAttribute{ + Required: true, + Validators: []validator.String{ + stringvalidator.LengthAtLeast(1), + }, + }, + "type": schema.StringAttribute{ + Required: true, + Validators: []validator.String{ + stringvalidator.LengthAtLeast(1), + }, + }, + "value": schema.StringAttribute{ + Required: true, + Validators: []validator.String{ + stringvalidator.LengthAtLeast(1), + }, + }, + }, + }, + Optional: true, + }, + "log_level": schema.Int32Attribute{ + Optional: true, + Computed: true, + Default: int32default.StaticInt32(4), + Validators: []validator.Int32{ + int32validator.Between(1, 4), + }, + }, + "require_authentication_to_initiate": schema.BoolAttribute{ + Optional: true, + }, + "scrub_sensitive_info": schema.BoolAttribute{ + Optional: true, + }, + "sensitive_info_fields": schema.SetAttribute{ + ElementType: types.StringType, + Optional: true, + }, + "use_csp": schema.BoolAttribute{ + Optional: true, + }, + "use_custom_css": schema.BoolAttribute{ + Optional: true, + }, + "use_custom_flow_player": schema.BoolAttribute{ + Optional: true, + }, + "use_custom_script": schema.BoolAttribute{ + Optional: true, + }, + "use_intermediate_loading_screen": schema.BoolAttribute{ + Optional: true, + }, + "validate_on_save": schema.BoolAttribute{ + Optional: true, + }, + }, + Optional: true, + Computed: true, + Default: objectdefault.StaticValue(types.ObjectValueMust(settingsAttrTypes, map[string]attr.Value{ + "csp": types.StringNull(), + "css": types.StringNull(), + "css_links": types.SetNull(types.StringType), + "custom_error_screen_brand_logo_url": types.StringNull(), + "custom_error_show_footer": types.BoolNull(), + "custom_favicon_link": types.StringNull(), + "custom_logo_urlselection": types.Int32Null(), + "custom_title": types.StringNull(), + "default_error_screen_brand_logo": types.BoolNull(), + "flow_http_timeout_in_seconds": types.Int32Null(), + "flow_timeout_in_seconds": types.Int32Null(), + "intermediate_loading_screen_css": types.StringNull(), + "intermediate_loading_screen_html": types.StringNull(), + "js_custom_flow_player": types.StringNull(), + "js_links": types.SetNull(settingsJsLinksElementType), + "log_level": types.Int32Value(4), + "require_authentication_to_initiate": types.BoolNull(), + "scrub_sensitive_info": types.BoolNull(), + "sensitive_info_fields": types.SetNull(types.StringType), + "use_csp": types.BoolNull(), + "use_custom_css": types.BoolNull(), + "use_custom_flow_player": types.BoolNull(), + "use_custom_script": types.BoolNull(), + "use_intermediate_loading_screen": types.BoolNull(), + "validate_on_save": types.BoolNull(), + })), + }, + "trigger": schema.SingleNestedAttribute{ + Attributes: map[string]schema.Attribute{ + "configuration": schema.SingleNestedAttribute{ + Attributes: map[string]schema.Attribute{ + "mfa": schema.SingleNestedAttribute{ + Attributes: map[string]schema.Attribute{ + "enabled": schema.BoolAttribute{ + Required: true, + }, + "time": schema.Float32Attribute{ + Required: true, + }, + "time_format": schema.StringAttribute{ + Required: true, + Validators: []validator.String{ + stringvalidator.LengthBetween(0, 50), + }, + }, + }, + Required: true, + }, + "pwd": schema.SingleNestedAttribute{ + Attributes: map[string]schema.Attribute{ + "enabled": schema.BoolAttribute{ + Required: true, + }, + "time": schema.Float32Attribute{ + Required: true, + }, + "time_format": schema.StringAttribute{ + Required: true, + Validators: []validator.String{ + stringvalidator.LengthBetween(0, 50), + }, + }, + }, + Required: true, + }, + }, + Optional: true, + }, + "type": schema.StringAttribute{ + Required: true, + Validators: []validator.String{ + stringvalidator.OneOf( + "AUTHENTICATION", + "SCHEDULE", + ), + stringvalidator.LengthAtLeast(1), + }, + }, + }, + Optional: true, + }, + }, + } +} + +func (model *davinciFlowResourceModel) buildClientStructPost() (*pingone.DaVinciFlowCreateRequest, diag.Diagnostics) { + result := &pingone.DaVinciFlowCreateRequest{} + var respDiags diag.Diagnostics + // color + if !model.Color.IsNull() && !model.Color.IsUnknown() { + result.Color = model.Color.ValueStringPointer() + } + // description + if !model.Description.IsNull() && !model.Description.IsUnknown() { + result.Description = model.Description.ValueStringPointer() + } + // graph_data + if !model.GraphData.IsNull() && !model.GraphData.IsUnknown() { + graphDataValue := &pingone.DaVinciFlowGraphDataRequest{} + graphDataAttrs := model.GraphData.Attributes() + graphDataValue.BoxSelectionEnabled = graphDataAttrs["box_selection_enabled"].(types.Bool).ValueBoolPointer() + if !graphDataAttrs["data"].IsNull() && !graphDataAttrs["data"].IsUnknown() { + var unmarshaled map[string]interface{} + err := json.Unmarshal([]byte(graphDataAttrs["data"].(jsontypes.Normalized).ValueString()), &unmarshaled) + if err != nil { + respDiags.AddError( + "Error Parsing JSON val", + fmt.Sprintf("The value provided for data could not be parsed as json: %s", err.Error()), + ) + } + graphDataValue.Data = unmarshaled + } + if !graphDataAttrs["elements"].IsNull() && !graphDataAttrs["elements"].IsUnknown() { + graphDataElementsValue := &pingone.DaVinciFlowGraphDataRequestElements{} + graphDataElementsAttrs := graphDataAttrs["elements"].(types.Object).Attributes() + if !graphDataElementsAttrs["edges"].IsNull() && !graphDataElementsAttrs["edges"].IsUnknown() { + graphDataElementsValue.Edges = []pingone.DaVinciFlowGraphDataRequestElementsEdge{} + for _, edgesElement := range graphDataElementsAttrs["edges"].(types.Set).Elements() { + edgesValue := pingone.DaVinciFlowGraphDataRequestElementsEdge{} + edgesAttrs := edgesElement.(types.Object).Attributes() + edgesValue.Classes = edgesAttrs["classes"].(types.String).ValueStringPointer() + edgesDataValue := pingone.DaVinciFlowGraphDataRequestElementsEdgeData{} + edgesDataAttrs := edgesAttrs["data"].(types.Object).Attributes() + edgesDataValue.Id = edgesDataAttrs["id"].(types.String).ValueString() + edgesDataValue.Source = edgesDataAttrs["source"].(types.String).ValueString() + edgesDataValue.Target = edgesDataAttrs["target"].(types.String).ValueString() + edgesValue.Data = edgesDataValue + edgesValue.Grabbable = edgesAttrs["grabbable"].(types.Bool).ValueBoolPointer() + edgesValue.Group = edgesAttrs["group"].(types.String).ValueStringPointer() + edgesValue.Locked = edgesAttrs["locked"].(types.Bool).ValueBoolPointer() + edgesValue.Pannable = edgesAttrs["pannable"].(types.Bool).ValueBoolPointer() + if !edgesAttrs["position"].IsNull() && !edgesAttrs["position"].IsUnknown() { + edgesPositionValue := &pingone.DaVinciFlowGraphDataRequestElementsEdgePosition{} + edgesPositionAttrs := edgesAttrs["position"].(types.Object).Attributes() + edgesPositionValue.X = edgesPositionAttrs["x"].(types.Float32).ValueFloat32() + edgesPositionValue.Y = edgesPositionAttrs["y"].(types.Float32).ValueFloat32() + edgesValue.Position = edgesPositionValue + } + edgesValue.Removed = edgesAttrs["removed"].(types.Bool).ValueBoolPointer() + edgesValue.Selectable = edgesAttrs["selectable"].(types.Bool).ValueBoolPointer() + edgesValue.Selected = edgesAttrs["selected"].(types.Bool).ValueBoolPointer() + graphDataElementsValue.Edges = append(graphDataElementsValue.Edges, edgesValue) + } + } + if !graphDataElementsAttrs["nodes"].IsNull() && !graphDataElementsAttrs["nodes"].IsUnknown() { + graphDataElementsValue.Nodes = []pingone.DaVinciFlowGraphDataRequestElementsNode{} + for _, nodesElement := range graphDataElementsAttrs["nodes"].(types.Set).Elements() { + nodesValue := pingone.DaVinciFlowGraphDataRequestElementsNode{} + nodesAttrs := nodesElement.(types.Object).Attributes() + nodesValue.Classes = nodesAttrs["classes"].(types.String).ValueStringPointer() + nodesDataValue := pingone.DaVinciFlowGraphDataRequestElementsNodeData{} + nodesDataAttrs := nodesAttrs["data"].(types.Object).Attributes() + nodesDataValue.CapabilityName = nodesDataAttrs["capability_name"].(types.String).ValueStringPointer() + nodesDataValue.ConnectionId = nodesDataAttrs["connection_id"].(types.String).ValueStringPointer() + nodesDataValue.ConnectorId = nodesDataAttrs["connector_id"].(types.String).ValueStringPointer() + nodesDataValue.Id = nodesDataAttrs["id"].(types.String).ValueString() + nodesDataValue.Label = nodesDataAttrs["label"].(types.String).ValueStringPointer() + nodesDataValue.Name = nodesDataAttrs["name"].(types.String).ValueStringPointer() + nodesDataValue.NodeType = nodesDataAttrs["node_type"].(types.String).ValueString() + if !nodesDataAttrs["properties"].IsNull() && !nodesDataAttrs["properties"].IsUnknown() { + var unmarshaled map[string]interface{} + err := json.Unmarshal([]byte(nodesDataAttrs["properties"].(jsontypes.Normalized).ValueString()), &unmarshaled) + if err != nil { + respDiags.AddError( + "Error Parsing JSON val", + fmt.Sprintf("The value provided for properties could not be parsed as json: %s", err.Error()), + ) + } + nodesDataValue.Properties = unmarshaled + } + nodesDataValue.Status = nodesDataAttrs["status"].(types.String).ValueStringPointer() + nodesDataValue.Type = nodesDataAttrs["type"].(types.String).ValueStringPointer() + nodesValue.Data = nodesDataValue + nodesValue.Grabbable = nodesAttrs["grabbable"].(types.Bool).ValueBoolPointer() + nodesValue.Group = nodesAttrs["group"].(types.String).ValueStringPointer() + nodesValue.Locked = nodesAttrs["locked"].(types.Bool).ValueBoolPointer() + nodesValue.Pannable = nodesAttrs["pannable"].(types.Bool).ValueBoolPointer() + if !nodesAttrs["position"].IsNull() && !nodesAttrs["position"].IsUnknown() { + nodesPositionValue := &pingone.DaVinciFlowGraphDataRequestElementsNodePosition{} + nodesPositionAttrs := nodesAttrs["position"].(types.Object).Attributes() + nodesPositionValue.X = nodesPositionAttrs["x"].(types.Float32).ValueFloat32() + nodesPositionValue.Y = nodesPositionAttrs["y"].(types.Float32).ValueFloat32() + nodesValue.Position = nodesPositionValue + } + nodesValue.Removed = nodesAttrs["removed"].(types.Bool).ValueBoolPointer() + nodesValue.Selectable = nodesAttrs["selectable"].(types.Bool).ValueBoolPointer() + nodesValue.Selected = nodesAttrs["selected"].(types.Bool).ValueBoolPointer() + graphDataElementsValue.Nodes = append(graphDataElementsValue.Nodes, nodesValue) + } + } + graphDataValue.Elements = graphDataElementsValue + } + if !graphDataAttrs["max_zoom"].IsNull() && !graphDataAttrs["max_zoom"].IsUnknown() { + graphDataValue.MaxZoom = &pingonetypes.BigFloatUnquoted{ + Float: graphDataAttrs["max_zoom"].(types.Number).ValueBigFloat(), + } + } + if !graphDataAttrs["min_zoom"].IsNull() && !graphDataAttrs["min_zoom"].IsUnknown() { + graphDataValue.MinZoom = &pingonetypes.BigFloatUnquoted{ + Float: graphDataAttrs["min_zoom"].(types.Number).ValueBigFloat(), + } + } + if !graphDataAttrs["pan"].IsNull() && !graphDataAttrs["pan"].IsUnknown() { + graphDataPanValue := &pingone.DaVinciFlowGraphDataRequestPan{} + graphDataPanAttrs := graphDataAttrs["pan"].(types.Object).Attributes() + graphDataPanValue.X = graphDataPanAttrs["x"].(types.Float32).ValueFloat32() + graphDataPanValue.Y = graphDataPanAttrs["y"].(types.Float32).ValueFloat32() + graphDataValue.Pan = graphDataPanValue + } + graphDataValue.PanningEnabled = graphDataAttrs["panning_enabled"].(types.Bool).ValueBoolPointer() + if !graphDataAttrs["renderer"].IsNull() && !graphDataAttrs["renderer"].IsUnknown() { + var newUnmarshaled map[string]interface{} + err := json.Unmarshal([]byte(graphDataAttrs["renderer"].(jsontypes.Normalized).ValueString()), &newUnmarshaled) + if err != nil { + respDiags.AddError( + "Error Parsing JSON val", + fmt.Sprintf("The value provided for renderer could not be parsed as json: %s", err.Error()), + ) + } + graphDataValue.Renderer = newUnmarshaled + } + graphDataValue.UserPanningEnabled = graphDataAttrs["user_panning_enabled"].(types.Bool).ValueBoolPointer() + graphDataValue.UserZoomingEnabled = graphDataAttrs["user_zooming_enabled"].(types.Bool).ValueBoolPointer() + graphDataValue.Zoom = graphDataAttrs["zoom"].(types.Int32).ValueInt32Pointer() + graphDataValue.ZoomingEnabled = graphDataAttrs["zooming_enabled"].(types.Bool).ValueBoolPointer() + result.GraphData = graphDataValue + } + + // input_schema + if !model.InputSchema.IsNull() && !model.InputSchema.IsUnknown() { + result.InputSchema = []pingone.DaVinciFlowInputSchemaRequestItem{} + for _, inputSchemaElement := range model.InputSchema.Elements() { + inputSchemaValue := pingone.DaVinciFlowInputSchemaRequestItem{} + inputSchemaAttrs := inputSchemaElement.(types.Object).Attributes() + inputSchemaValue.Description = inputSchemaAttrs["description"].(types.String).ValueStringPointer() + inputSchemaValue.IsExpanded = inputSchemaAttrs["is_expanded"].(types.Bool).ValueBoolPointer() + if !inputSchemaAttrs["preferred_control_type"].IsNull() && !inputSchemaAttrs["preferred_control_type"].IsUnknown() { + inputSchemaPreferredControlTypeValue, err := pingone.NewDaVinciFlowInputSchemaRequestItemPreferredControlTypeFromValue(inputSchemaAttrs["preferred_control_type"].(types.String).ValueString()) + if err != nil { + respDiags.AddAttributeError( + path.Root("preferred_control_type"), + "Provided value is not valid", + fmt.Sprintf("The value provided for preferred_control_type is not valid: %s", err.Error()), + ) + } else { + inputSchemaValue.PreferredControlType = inputSchemaPreferredControlTypeValue + } + } + inputSchemaPreferredDataTypeValue, err := pingone.NewDaVinciFlowInputSchemaRequestItemPreferredDataTypeFromValue(inputSchemaAttrs["preferred_data_type"].(types.String).ValueString()) + if err != nil { + respDiags.AddAttributeError( + path.Root("preferred_data_type"), + "Provided value is not valid", + fmt.Sprintf("The value provided for preferred_data_type is not valid: %s", err.Error()), + ) + } else { + inputSchemaValue.PreferredDataType = *inputSchemaPreferredDataTypeValue + } + inputSchemaValue.PropertyName = inputSchemaAttrs["property_name"].(types.String).ValueString() + inputSchemaValue.Required = inputSchemaAttrs["required"].(types.Bool).ValueBoolPointer() + result.InputSchema = append(result.InputSchema, inputSchemaValue) + } + } + + // name + result.Name = model.Name.ValueString() + // output_schema + if !model.OutputSchema.IsNull() && !model.OutputSchema.IsUnknown() { + outputSchemaValue := &pingone.DaVinciFlowOutputSchemaRequest{} + outputSchemaAttrs := model.OutputSchema.Attributes() + if !outputSchemaAttrs["output"].IsNull() && !outputSchemaAttrs["output"].IsUnknown() { + outputSchemaOutputValue := pingone.DaVinciFlowOutputSchemaRequestOutput{} + outputSchemaOutputAttrs := outputSchemaAttrs["output"].(types.Object).Attributes() + outputSchemaOutputValue.AdditionalPropertiesField = outputSchemaOutputAttrs["additional_properties"].(types.Bool).ValueBoolPointer() + if !outputSchemaOutputAttrs["properties"].IsNull() && !outputSchemaOutputAttrs["properties"].IsUnknown() { + var unmarshaled map[string]interface{} + err := json.Unmarshal([]byte(outputSchemaOutputAttrs["properties"].(jsontypes.Normalized).ValueString()), &unmarshaled) + if err != nil { + respDiags.AddError( + "Error Parsing JSON val", + fmt.Sprintf("The value provided for output.output_schema.properties could not be parsed as json: %s", err.Error()), + ) + } + outputSchemaOutputValue.Properties = unmarshaled + } + outputSchemaOutputTypeValue, err := pingone.NewDaVinciFlowOutputSchemaRequestOutputTypeFromValue(outputSchemaOutputAttrs["type"].(types.String).ValueString()) + if err != nil { + respDiags.AddAttributeError( + path.Root("output_schema.output.type"), + "Provided value is not valid", + fmt.Sprintf("The value provided for output_schema.output.type is not valid: %s", err.Error()), + ) + } else { + outputSchemaOutputValue.Type = *outputSchemaOutputTypeValue + } + outputSchemaValue.Output = outputSchemaOutputValue + } + result.OutputSchema = outputSchemaValue + } + + // settings + if !model.Settings.IsNull() && !model.Settings.IsUnknown() { + settingsValue := &pingone.DaVinciFlowSettingsRequest{} + settingsAttrs := model.Settings.Attributes() + settingsValue.Csp = settingsAttrs["csp"].(types.String).ValueStringPointer() + settingsValue.Css = settingsAttrs["css"].(types.String).ValueStringPointer() + if !settingsAttrs["css_links"].IsNull() && !settingsAttrs["css_links"].IsUnknown() { + settingsValue.CssLinks = []string{} + for _, cssLinksElement := range settingsAttrs["css_links"].(types.Set).Elements() { + settingsValue.CssLinks = append(settingsValue.CssLinks, cssLinksElement.(types.String).ValueString()) + } + } + settingsValue.CustomErrorScreenBrandLogoUrl = settingsAttrs["custom_error_screen_brand_logo_url"].(types.String).ValueStringPointer() + settingsValue.CustomErrorShowFooter = settingsAttrs["custom_error_show_footer"].(types.Bool).ValueBoolPointer() + settingsValue.CustomFaviconLink = settingsAttrs["custom_favicon_link"].(types.String).ValueStringPointer() + settingsValue.CustomLogoURLSelection = settingsAttrs["custom_logo_urlselection"].(types.Int32).ValueInt32Pointer() + settingsValue.CustomTitle = settingsAttrs["custom_title"].(types.String).ValueStringPointer() + settingsValue.DefaultErrorScreenBrandLogo = settingsAttrs["default_error_screen_brand_logo"].(types.Bool).ValueBoolPointer() + settingsValue.FlowHttpTimeoutInSeconds = settingsAttrs["flow_http_timeout_in_seconds"].(types.Int32).ValueInt32Pointer() + settingsValue.FlowTimeoutInSeconds = settingsAttrs["flow_timeout_in_seconds"].(types.Int32).ValueInt32Pointer() + if !settingsAttrs["intermediate_loading_screen_css"].IsNull() && !settingsAttrs["intermediate_loading_screen_css"].IsUnknown() { + settingsIntermediateLoadingScreenCSSValue := &pingone.DaVinciFlowSettingsRequestIntermediateLoadingScreenCSS{} + settingsIntermediateLoadingScreenCSSValue.String = settingsAttrs["intermediate_loading_screen_css"].(types.String).ValueStringPointer() + settingsValue.IntermediateLoadingScreenCSS = settingsIntermediateLoadingScreenCSSValue + } + if !settingsAttrs["intermediate_loading_screen_html"].IsNull() && !settingsAttrs["intermediate_loading_screen_html"].IsUnknown() { + settingsIntermediateLoadingScreenHTMLValue := &pingone.DaVinciFlowSettingsRequestIntermediateLoadingScreenHTML{} + settingsIntermediateLoadingScreenHTMLValue.String = settingsAttrs["intermediate_loading_screen_html"].(types.String).ValueStringPointer() + settingsValue.IntermediateLoadingScreenHTML = settingsIntermediateLoadingScreenHTMLValue + } + settingsValue.JsCustomFlowPlayer = settingsAttrs["js_custom_flow_player"].(types.String).ValueStringPointer() + if !settingsAttrs["js_links"].IsNull() && !settingsAttrs["js_links"].IsUnknown() { + settingsValue.JsLinks = []pingone.DaVinciFlowSettingsRequestJsLink{} + for _, jsLinksElement := range settingsAttrs["js_links"].(types.Set).Elements() { + jsLinksValue := pingone.DaVinciFlowSettingsRequestJsLink{} + jsLinksAttrs := jsLinksElement.(types.Object).Attributes() + jsLinksValue.Crossorigin = jsLinksAttrs["crossorigin"].(types.String).ValueString() + jsLinksValue.Defer = jsLinksAttrs["defer"].(types.Bool).ValueBool() + jsLinksValue.Integrity = jsLinksAttrs["integrity"].(types.String).ValueString() + jsLinksValue.Label = jsLinksAttrs["label"].(types.String).ValueString() + jsLinksValue.Referrerpolicy = jsLinksAttrs["referrerpolicy"].(types.String).ValueString() + jsLinksValue.Type = jsLinksAttrs["type"].(types.String).ValueString() + jsLinksValue.Value = jsLinksAttrs["value"].(types.String).ValueString() + settingsValue.JsLinks = append(settingsValue.JsLinks, jsLinksValue) + } + } + settingsValue.LogLevel = settingsAttrs["log_level"].(types.Int32).ValueInt32Pointer() + settingsValue.RequireAuthenticationToInitiate = settingsAttrs["require_authentication_to_initiate"].(types.Bool).ValueBoolPointer() + settingsValue.ScrubSensitiveInfo = settingsAttrs["scrub_sensitive_info"].(types.Bool).ValueBoolPointer() + if !settingsAttrs["sensitive_info_fields"].IsNull() && !settingsAttrs["sensitive_info_fields"].IsUnknown() { + settingsValue.SensitiveInfoFields = []string{} + for _, sensitiveInfoFieldsElement := range settingsAttrs["sensitive_info_fields"].(types.Set).Elements() { + settingsValue.SensitiveInfoFields = append(settingsValue.SensitiveInfoFields, sensitiveInfoFieldsElement.(types.String).ValueString()) + } + } + settingsValue.UseCSP = settingsAttrs["use_csp"].(types.Bool).ValueBoolPointer() + settingsValue.UseCustomCSS = settingsAttrs["use_custom_css"].(types.Bool).ValueBoolPointer() + settingsValue.UseCustomFlowPlayer = settingsAttrs["use_custom_flow_player"].(types.Bool).ValueBoolPointer() + settingsValue.UseCustomScript = settingsAttrs["use_custom_script"].(types.Bool).ValueBoolPointer() + settingsValue.UseIntermediateLoadingScreen = settingsAttrs["use_intermediate_loading_screen"].(types.Bool).ValueBoolPointer() + settingsValue.ValidateOnSave = settingsAttrs["validate_on_save"].(types.Bool).ValueBoolPointer() + result.Settings = settingsValue + } + + // trigger + if !model.Trigger.IsNull() && !model.Trigger.IsUnknown() { + triggerValue := &pingone.DaVinciFlowTriggerRequest{} + triggerAttrs := model.Trigger.Attributes() + if !triggerAttrs["configuration"].IsNull() && !triggerAttrs["configuration"].IsUnknown() { + triggerConfigurationValue := &pingone.DaVinciFlowTriggerRequestConfiguration{} + triggerConfigurationAttrs := triggerAttrs["configuration"].(types.Object).Attributes() + if !triggerConfigurationAttrs["mfa"].IsNull() && !triggerConfigurationAttrs["mfa"].IsUnknown() { + triggerConfigurationMfaValue := pingone.DaVinciFlowTriggerRequestConfigurationMFA{} + triggerConfigurationMfaAttrs := triggerConfigurationAttrs["mfa"].(types.Object).Attributes() + triggerConfigurationMfaValue.Enabled = triggerConfigurationMfaAttrs["enabled"].(types.Bool).ValueBool() + triggerConfigurationMfaValue.Time = triggerConfigurationMfaAttrs["time"].(types.Float32).ValueFloat32() + triggerConfigurationMfaValue.TimeFormat = triggerConfigurationMfaAttrs["time_format"].(types.String).ValueString() + triggerConfigurationValue.Mfa = triggerConfigurationMfaValue + } + if !triggerConfigurationAttrs["pwd"].IsNull() && !triggerConfigurationAttrs["pwd"].IsUnknown() { + triggerConfigurationPwdValue := pingone.DaVinciFlowTriggerRequestConfigurationPassword{} + triggerConfigurationPwdAttrs := triggerConfigurationAttrs["pwd"].(types.Object).Attributes() + triggerConfigurationPwdValue.Enabled = triggerConfigurationPwdAttrs["enabled"].(types.Bool).ValueBool() + triggerConfigurationPwdValue.Time = triggerConfigurationPwdAttrs["time"].(types.Float32).ValueFloat32() + triggerConfigurationPwdValue.TimeFormat = triggerConfigurationPwdAttrs["time_format"].(types.String).ValueString() + triggerConfigurationValue.Pwd = triggerConfigurationPwdValue + } + triggerValue.Configuration = triggerConfigurationValue + } + triggerTypeValue, err := pingone.NewDaVinciFlowTriggerRequestTypeFromValue(triggerAttrs["type"].(types.String).ValueString()) + if err != nil { + respDiags.AddAttributeError( + path.Root("type"), + "Provided value is not valid", + fmt.Sprintf("The value provided for type is not valid: %s", err.Error()), + ) + } else { + triggerValue.Type = *triggerTypeValue + } + result.Trigger = triggerValue + } + + return result, respDiags +} + +func (model *davinciFlowResourceModel) buildClientStructPut() (*pingone.DaVinciFlowReplaceRequest, diag.Diagnostics) { + result := &pingone.DaVinciFlowReplaceRequest{} + var respDiags diag.Diagnostics + // color + if !model.Color.IsNull() && !model.Color.IsUnknown() { + result.Color = model.Color.ValueStringPointer() + } + // description + if !model.Description.IsNull() && !model.Description.IsUnknown() { + result.Description = model.Description.ValueStringPointer() + } + // graph_data + if !model.GraphData.IsNull() && !model.GraphData.IsUnknown() { + graphDataValue := &pingone.DaVinciFlowGraphDataRequest{} + graphDataAttrs := model.GraphData.Attributes() + graphDataValue.BoxSelectionEnabled = graphDataAttrs["box_selection_enabled"].(types.Bool).ValueBoolPointer() + if !graphDataAttrs["data"].IsNull() && !graphDataAttrs["data"].IsUnknown() { + var unmarshaled map[string]interface{} + err := json.Unmarshal([]byte(graphDataAttrs["data"].(jsontypes.Normalized).ValueString()), &unmarshaled) + if err != nil { + respDiags.AddError( + "Error Parsing JSON val", + fmt.Sprintf("The value provided for data could not be parsed as json: %s", err.Error()), + ) + } + graphDataValue.Data = unmarshaled + } + if !graphDataAttrs["elements"].IsNull() && !graphDataAttrs["elements"].IsUnknown() { + graphDataElementsValue := &pingone.DaVinciFlowGraphDataRequestElements{} + graphDataElementsAttrs := graphDataAttrs["elements"].(types.Object).Attributes() + if !graphDataElementsAttrs["edges"].IsNull() && !graphDataElementsAttrs["edges"].IsUnknown() { + graphDataElementsValue.Edges = []pingone.DaVinciFlowGraphDataRequestElementsEdge{} + for _, edgesElement := range graphDataElementsAttrs["edges"].(types.Set).Elements() { + edgesValue := pingone.DaVinciFlowGraphDataRequestElementsEdge{} + edgesAttrs := edgesElement.(types.Object).Attributes() + edgesValue.Classes = edgesAttrs["classes"].(types.String).ValueStringPointer() + edgesDataValue := pingone.DaVinciFlowGraphDataRequestElementsEdgeData{} + edgesDataAttrs := edgesAttrs["data"].(types.Object).Attributes() + edgesDataValue.Id = edgesDataAttrs["id"].(types.String).ValueString() + edgesDataValue.Source = edgesDataAttrs["source"].(types.String).ValueString() + edgesDataValue.Target = edgesDataAttrs["target"].(types.String).ValueString() + edgesValue.Data = edgesDataValue + edgesValue.Grabbable = edgesAttrs["grabbable"].(types.Bool).ValueBoolPointer() + edgesValue.Group = edgesAttrs["group"].(types.String).ValueStringPointer() + edgesValue.Locked = edgesAttrs["locked"].(types.Bool).ValueBoolPointer() + edgesValue.Pannable = edgesAttrs["pannable"].(types.Bool).ValueBoolPointer() + if !edgesAttrs["position"].IsNull() && !edgesAttrs["position"].IsUnknown() { + edgesPositionValue := &pingone.DaVinciFlowGraphDataRequestElementsEdgePosition{} + edgesPositionAttrs := edgesAttrs["position"].(types.Object).Attributes() + edgesPositionValue.X = edgesPositionAttrs["x"].(types.Float32).ValueFloat32() + edgesPositionValue.Y = edgesPositionAttrs["y"].(types.Float32).ValueFloat32() + edgesValue.Position = edgesPositionValue + } + edgesValue.Removed = edgesAttrs["removed"].(types.Bool).ValueBoolPointer() + edgesValue.Selectable = edgesAttrs["selectable"].(types.Bool).ValueBoolPointer() + edgesValue.Selected = edgesAttrs["selected"].(types.Bool).ValueBoolPointer() + graphDataElementsValue.Edges = append(graphDataElementsValue.Edges, edgesValue) + } + } + if !graphDataElementsAttrs["nodes"].IsNull() && !graphDataElementsAttrs["nodes"].IsUnknown() { + graphDataElementsValue.Nodes = []pingone.DaVinciFlowGraphDataRequestElementsNode{} + for _, nodesElement := range graphDataElementsAttrs["nodes"].(types.Set).Elements() { + nodesValue := pingone.DaVinciFlowGraphDataRequestElementsNode{} + nodesAttrs := nodesElement.(types.Object).Attributes() + nodesValue.Classes = nodesAttrs["classes"].(types.String).ValueStringPointer() + nodesDataValue := pingone.DaVinciFlowGraphDataRequestElementsNodeData{} + nodesDataAttrs := nodesAttrs["data"].(types.Object).Attributes() + nodesDataValue.CapabilityName = nodesDataAttrs["capability_name"].(types.String).ValueStringPointer() + nodesDataValue.ConnectionId = nodesDataAttrs["connection_id"].(types.String).ValueStringPointer() + nodesDataValue.ConnectorId = nodesDataAttrs["connector_id"].(types.String).ValueStringPointer() + nodesDataValue.Id = nodesDataAttrs["id"].(types.String).ValueString() + nodesDataValue.Label = nodesDataAttrs["label"].(types.String).ValueStringPointer() + nodesDataValue.Name = nodesDataAttrs["name"].(types.String).ValueStringPointer() + nodesDataValue.NodeType = nodesDataAttrs["node_type"].(types.String).ValueString() + if !nodesDataAttrs["properties"].IsNull() && !nodesDataAttrs["properties"].IsUnknown() { + var unmarshaled map[string]interface{} + err := json.Unmarshal([]byte(nodesDataAttrs["properties"].(jsontypes.Normalized).ValueString()), &unmarshaled) + if err != nil { + respDiags.AddError( + "Error Parsing JSON val", + fmt.Sprintf("The value provided for properties could not be parsed as json: %s", err.Error()), + ) + } + nodesDataValue.Properties = unmarshaled + } + nodesDataValue.Status = nodesDataAttrs["status"].(types.String).ValueStringPointer() + nodesDataValue.Type = nodesDataAttrs["type"].(types.String).ValueStringPointer() + nodesValue.Data = nodesDataValue + nodesValue.Grabbable = nodesAttrs["grabbable"].(types.Bool).ValueBoolPointer() + nodesValue.Group = nodesAttrs["group"].(types.String).ValueStringPointer() + nodesValue.Locked = nodesAttrs["locked"].(types.Bool).ValueBoolPointer() + nodesValue.Pannable = nodesAttrs["pannable"].(types.Bool).ValueBoolPointer() + if !nodesAttrs["position"].IsNull() && !nodesAttrs["position"].IsUnknown() { + nodesPositionValue := &pingone.DaVinciFlowGraphDataRequestElementsNodePosition{} + nodesPositionAttrs := nodesAttrs["position"].(types.Object).Attributes() + nodesPositionValue.X = nodesPositionAttrs["x"].(types.Float32).ValueFloat32() + nodesPositionValue.Y = nodesPositionAttrs["y"].(types.Float32).ValueFloat32() + nodesValue.Position = nodesPositionValue + } + nodesValue.Removed = nodesAttrs["removed"].(types.Bool).ValueBoolPointer() + nodesValue.Selectable = nodesAttrs["selectable"].(types.Bool).ValueBoolPointer() + nodesValue.Selected = nodesAttrs["selected"].(types.Bool).ValueBoolPointer() + graphDataElementsValue.Nodes = append(graphDataElementsValue.Nodes, nodesValue) + } + } + graphDataValue.Elements = graphDataElementsValue + } + if !graphDataAttrs["max_zoom"].IsNull() && !graphDataAttrs["max_zoom"].IsUnknown() { + graphDataValue.MaxZoom = &pingonetypes.BigFloatUnquoted{ + Float: graphDataAttrs["max_zoom"].(types.Number).ValueBigFloat(), + } + } + if !graphDataAttrs["min_zoom"].IsNull() && !graphDataAttrs["min_zoom"].IsUnknown() { + graphDataValue.MinZoom = &pingonetypes.BigFloatUnquoted{ + Float: graphDataAttrs["min_zoom"].(types.Number).ValueBigFloat(), + } + } + if !graphDataAttrs["pan"].IsNull() && !graphDataAttrs["pan"].IsUnknown() { + graphDataPanValue := &pingone.DaVinciFlowGraphDataRequestPan{} + graphDataPanAttrs := graphDataAttrs["pan"].(types.Object).Attributes() + graphDataPanValue.X = graphDataPanAttrs["x"].(types.Float32).ValueFloat32() + graphDataPanValue.Y = graphDataPanAttrs["y"].(types.Float32).ValueFloat32() + graphDataValue.Pan = graphDataPanValue + } + graphDataValue.PanningEnabled = graphDataAttrs["panning_enabled"].(types.Bool).ValueBoolPointer() + if !graphDataAttrs["renderer"].IsNull() && !graphDataAttrs["renderer"].IsUnknown() { + var newUnmarshaled map[string]interface{} + err := json.Unmarshal([]byte(graphDataAttrs["renderer"].(jsontypes.Normalized).ValueString()), &newUnmarshaled) + if err != nil { + respDiags.AddError( + "Error Parsing JSON val", + fmt.Sprintf("The value provided for renderer could not be parsed as json: %s", err.Error()), + ) + } + graphDataValue.Renderer = newUnmarshaled + } + graphDataValue.UserPanningEnabled = graphDataAttrs["user_panning_enabled"].(types.Bool).ValueBoolPointer() + graphDataValue.UserZoomingEnabled = graphDataAttrs["user_zooming_enabled"].(types.Bool).ValueBoolPointer() + graphDataValue.Zoom = graphDataAttrs["zoom"].(types.Int32).ValueInt32Pointer() + graphDataValue.ZoomingEnabled = graphDataAttrs["zooming_enabled"].(types.Bool).ValueBoolPointer() + result.GraphData = graphDataValue + } + + // input_schema + if !model.InputSchema.IsNull() && !model.InputSchema.IsUnknown() { + result.InputSchema = []pingone.DaVinciFlowInputSchemaRequestItem{} + for _, inputSchemaElement := range model.InputSchema.Elements() { + inputSchemaValue := pingone.DaVinciFlowInputSchemaRequestItem{} + inputSchemaAttrs := inputSchemaElement.(types.Object).Attributes() + inputSchemaValue.Description = inputSchemaAttrs["description"].(types.String).ValueStringPointer() + inputSchemaValue.IsExpanded = inputSchemaAttrs["is_expanded"].(types.Bool).ValueBoolPointer() + if !inputSchemaAttrs["preferred_control_type"].IsNull() && !inputSchemaAttrs["preferred_control_type"].IsUnknown() { + inputSchemaPreferredControlTypeValue, err := pingone.NewDaVinciFlowInputSchemaRequestItemPreferredControlTypeFromValue(inputSchemaAttrs["preferred_control_type"].(types.String).ValueString()) + if err != nil { + respDiags.AddAttributeError( + path.Root("preferred_control_type"), + "Provided value is not valid", + fmt.Sprintf("The value provided for preferred_control_type is not valid: %s", err.Error()), + ) + } else { + inputSchemaValue.PreferredControlType = inputSchemaPreferredControlTypeValue + } + } + inputSchemaPreferredDataTypeValue, err := pingone.NewDaVinciFlowInputSchemaRequestItemPreferredDataTypeFromValue(inputSchemaAttrs["preferred_data_type"].(types.String).ValueString()) + if err != nil { + respDiags.AddAttributeError( + path.Root("preferred_data_type"), + "Provided value is not valid", + fmt.Sprintf("The value provided for preferred_data_type is not valid: %s", err.Error()), + ) + } else { + inputSchemaValue.PreferredDataType = *inputSchemaPreferredDataTypeValue + } + inputSchemaValue.PropertyName = inputSchemaAttrs["property_name"].(types.String).ValueString() + inputSchemaValue.Required = inputSchemaAttrs["required"].(types.Bool).ValueBoolPointer() + result.InputSchema = append(result.InputSchema, inputSchemaValue) + } + } + + // name + result.Name = model.Name.ValueString() + // output_schema + if !model.OutputSchema.IsNull() && !model.OutputSchema.IsUnknown() { + outputSchemaValue := &pingone.DaVinciFlowOutputSchemaRequest{} + outputSchemaAttrs := model.OutputSchema.Attributes() + if !outputSchemaAttrs["output"].IsNull() && !outputSchemaAttrs["output"].IsUnknown() { + outputSchemaOutputValue := pingone.DaVinciFlowOutputSchemaRequestOutput{} + outputSchemaOutputAttrs := outputSchemaAttrs["output"].(types.Object).Attributes() + outputSchemaOutputValue.AdditionalPropertiesField = outputSchemaOutputAttrs["additional_properties"].(types.Bool).ValueBoolPointer() + if !outputSchemaOutputAttrs["properties"].IsNull() && !outputSchemaOutputAttrs["properties"].IsUnknown() { + var unmarshaled map[string]interface{} + err := json.Unmarshal([]byte(outputSchemaOutputAttrs["properties"].(jsontypes.Normalized).ValueString()), &unmarshaled) + if err != nil { + respDiags.AddError( + "Error Parsing JSON val", + fmt.Sprintf("The value provided for output.output_schema.properties could not be parsed as json: %s", err.Error()), + ) + } + outputSchemaOutputValue.Properties = unmarshaled + } + outputSchemaOutputTypeValue, err := pingone.NewDaVinciFlowOutputSchemaRequestOutputTypeFromValue(outputSchemaOutputAttrs["type"].(types.String).ValueString()) + if err != nil { + respDiags.AddAttributeError( + path.Root("output_schema.output.type"), + "Provided value is not valid", + fmt.Sprintf("The value provided for output_schema.output.type is not valid: %s", err.Error()), + ) + } else { + outputSchemaOutputValue.Type = *outputSchemaOutputTypeValue + } + outputSchemaValue.Output = outputSchemaOutputValue + } + result.OutputSchema = outputSchemaValue + } + + // settings + if !model.Settings.IsNull() && !model.Settings.IsUnknown() { + settingsValue := &pingone.DaVinciFlowSettingsRequest{} + settingsAttrs := model.Settings.Attributes() + settingsValue.Csp = settingsAttrs["csp"].(types.String).ValueStringPointer() + settingsValue.Css = settingsAttrs["css"].(types.String).ValueStringPointer() + if !settingsAttrs["css_links"].IsNull() && !settingsAttrs["css_links"].IsUnknown() { + settingsValue.CssLinks = []string{} + for _, cssLinksElement := range settingsAttrs["css_links"].(types.Set).Elements() { + settingsValue.CssLinks = append(settingsValue.CssLinks, cssLinksElement.(types.String).ValueString()) + } + } + settingsValue.CustomErrorScreenBrandLogoUrl = settingsAttrs["custom_error_screen_brand_logo_url"].(types.String).ValueStringPointer() + settingsValue.CustomErrorShowFooter = settingsAttrs["custom_error_show_footer"].(types.Bool).ValueBoolPointer() + settingsValue.CustomFaviconLink = settingsAttrs["custom_favicon_link"].(types.String).ValueStringPointer() + settingsValue.CustomLogoURLSelection = settingsAttrs["custom_logo_urlselection"].(types.Int32).ValueInt32Pointer() + settingsValue.CustomTitle = settingsAttrs["custom_title"].(types.String).ValueStringPointer() + settingsValue.DefaultErrorScreenBrandLogo = settingsAttrs["default_error_screen_brand_logo"].(types.Bool).ValueBoolPointer() + settingsValue.FlowHttpTimeoutInSeconds = settingsAttrs["flow_http_timeout_in_seconds"].(types.Int32).ValueInt32Pointer() + settingsValue.FlowTimeoutInSeconds = settingsAttrs["flow_timeout_in_seconds"].(types.Int32).ValueInt32Pointer() + if !settingsAttrs["intermediate_loading_screen_css"].IsNull() && !settingsAttrs["intermediate_loading_screen_css"].IsUnknown() { + settingsIntermediateLoadingScreenCSSValue := &pingone.DaVinciFlowSettingsRequestIntermediateLoadingScreenCSS{} + settingsIntermediateLoadingScreenCSSValue.String = settingsAttrs["intermediate_loading_screen_css"].(types.String).ValueStringPointer() + settingsValue.IntermediateLoadingScreenCSS = settingsIntermediateLoadingScreenCSSValue + } + if !settingsAttrs["intermediate_loading_screen_html"].IsNull() && !settingsAttrs["intermediate_loading_screen_html"].IsUnknown() { + settingsIntermediateLoadingScreenHTMLValue := &pingone.DaVinciFlowSettingsRequestIntermediateLoadingScreenHTML{} + settingsIntermediateLoadingScreenHTMLValue.String = settingsAttrs["intermediate_loading_screen_html"].(types.String).ValueStringPointer() + settingsValue.IntermediateLoadingScreenHTML = settingsIntermediateLoadingScreenHTMLValue + } + settingsValue.JsCustomFlowPlayer = settingsAttrs["js_custom_flow_player"].(types.String).ValueStringPointer() + if !settingsAttrs["js_links"].IsNull() && !settingsAttrs["js_links"].IsUnknown() { + settingsValue.JsLinks = []pingone.DaVinciFlowSettingsRequestJsLink{} + for _, jsLinksElement := range settingsAttrs["js_links"].(types.Set).Elements() { + jsLinksValue := pingone.DaVinciFlowSettingsRequestJsLink{} + jsLinksAttrs := jsLinksElement.(types.Object).Attributes() + jsLinksValue.Crossorigin = jsLinksAttrs["crossorigin"].(types.String).ValueString() + jsLinksValue.Defer = jsLinksAttrs["defer"].(types.Bool).ValueBool() + jsLinksValue.Integrity = jsLinksAttrs["integrity"].(types.String).ValueString() + jsLinksValue.Label = jsLinksAttrs["label"].(types.String).ValueString() + jsLinksValue.Referrerpolicy = jsLinksAttrs["referrerpolicy"].(types.String).ValueString() + jsLinksValue.Type = jsLinksAttrs["type"].(types.String).ValueString() + jsLinksValue.Value = jsLinksAttrs["value"].(types.String).ValueString() + settingsValue.JsLinks = append(settingsValue.JsLinks, jsLinksValue) + } + } + settingsValue.LogLevel = settingsAttrs["log_level"].(types.Int32).ValueInt32Pointer() + settingsValue.RequireAuthenticationToInitiate = settingsAttrs["require_authentication_to_initiate"].(types.Bool).ValueBoolPointer() + settingsValue.ScrubSensitiveInfo = settingsAttrs["scrub_sensitive_info"].(types.Bool).ValueBoolPointer() + if !settingsAttrs["sensitive_info_fields"].IsNull() && !settingsAttrs["sensitive_info_fields"].IsUnknown() { + settingsValue.SensitiveInfoFields = []string{} + for _, sensitiveInfoFieldsElement := range settingsAttrs["sensitive_info_fields"].(types.Set).Elements() { + settingsValue.SensitiveInfoFields = append(settingsValue.SensitiveInfoFields, sensitiveInfoFieldsElement.(types.String).ValueString()) + } + } + settingsValue.UseCSP = settingsAttrs["use_csp"].(types.Bool).ValueBoolPointer() + settingsValue.UseCustomCSS = settingsAttrs["use_custom_css"].(types.Bool).ValueBoolPointer() + settingsValue.UseCustomFlowPlayer = settingsAttrs["use_custom_flow_player"].(types.Bool).ValueBoolPointer() + settingsValue.UseCustomScript = settingsAttrs["use_custom_script"].(types.Bool).ValueBoolPointer() + settingsValue.UseIntermediateLoadingScreen = settingsAttrs["use_intermediate_loading_screen"].(types.Bool).ValueBoolPointer() + settingsValue.ValidateOnSave = settingsAttrs["validate_on_save"].(types.Bool).ValueBoolPointer() + result.Settings = settingsValue + } + + // trigger + if !model.Trigger.IsNull() && !model.Trigger.IsUnknown() { + triggerValue := &pingone.DaVinciFlowTriggerRequest{} + triggerAttrs := model.Trigger.Attributes() + if !triggerAttrs["configuration"].IsNull() && !triggerAttrs["configuration"].IsUnknown() { + triggerConfigurationValue := &pingone.DaVinciFlowTriggerRequestConfiguration{} + triggerConfigurationAttrs := triggerAttrs["configuration"].(types.Object).Attributes() + if !triggerConfigurationAttrs["mfa"].IsNull() && !triggerConfigurationAttrs["mfa"].IsUnknown() { + triggerConfigurationMfaValue := pingone.DaVinciFlowTriggerRequestConfigurationMFA{} + triggerConfigurationMfaAttrs := triggerConfigurationAttrs["mfa"].(types.Object).Attributes() + triggerConfigurationMfaValue.Enabled = triggerConfigurationMfaAttrs["enabled"].(types.Bool).ValueBool() + triggerConfigurationMfaValue.Time = triggerConfigurationMfaAttrs["time"].(types.Float32).ValueFloat32() + triggerConfigurationMfaValue.TimeFormat = triggerConfigurationMfaAttrs["time_format"].(types.String).ValueString() + triggerConfigurationValue.Mfa = triggerConfigurationMfaValue + } + if !triggerConfigurationAttrs["pwd"].IsNull() && !triggerConfigurationAttrs["pwd"].IsUnknown() { + triggerConfigurationPwdValue := pingone.DaVinciFlowTriggerRequestConfigurationPassword{} + triggerConfigurationPwdAttrs := triggerConfigurationAttrs["pwd"].(types.Object).Attributes() + triggerConfigurationPwdValue.Enabled = triggerConfigurationPwdAttrs["enabled"].(types.Bool).ValueBool() + triggerConfigurationPwdValue.Time = triggerConfigurationPwdAttrs["time"].(types.Float32).ValueFloat32() + triggerConfigurationPwdValue.TimeFormat = triggerConfigurationPwdAttrs["time_format"].(types.String).ValueString() + triggerConfigurationValue.Pwd = triggerConfigurationPwdValue + } + triggerValue.Configuration = triggerConfigurationValue + } + triggerTypeValue, err := pingone.NewDaVinciFlowTriggerRequestTypeFromValue(triggerAttrs["type"].(types.String).ValueString()) + if err != nil { + respDiags.AddAttributeError( + path.Root("type"), + "Provided value is not valid", + fmt.Sprintf("The value provided for type is not valid: %s", err.Error()), + ) + } else { + triggerValue.Type = *triggerTypeValue + } + result.Trigger = triggerValue + } + + return result, respDiags +} + +func (state *davinciFlowResourceModel) readClientResponse(response *pingone.DaVinciFlowResponse) diag.Diagnostics { + var respDiags, diags diag.Diagnostics + // color + state.Color = types.StringPointerValue(response.Color) + // connectors + connectorsAttrTypes := map[string]attr.Type{ + "id": types.StringType, + } + connectorsElementType := types.ObjectType{AttrTypes: connectorsAttrTypes} + var connectorsValue types.Set + if response.Connectors == nil { + connectorsValue = types.SetNull(connectorsElementType) + } else { + var connectorsValues []attr.Value + for _, connectorsResponseValue := range response.Connectors { + connectorsValue, diags := types.ObjectValue(connectorsAttrTypes, map[string]attr.Value{ + "id": types.StringValue(connectorsResponseValue.Id), + }) + respDiags.Append(diags...) + connectorsValues = append(connectorsValues, connectorsValue) + } + connectorsValue, diags = types.SetValue(connectorsElementType, connectorsValues) + respDiags.Append(diags...) + } + state.Connectors = connectorsValue + // current_version + state.CurrentVersion = types.Float32PointerValue(response.CurrentVersion) + // description + state.Description = types.StringPointerValue(response.Description) + // enabled + state.Enabled = types.BoolPointerValue(response.Enabled) + // graph_data + graphDataElementsEdgesDataAttrTypes := map[string]attr.Type{ + "id": types.StringType, + "source": types.StringType, + "target": types.StringType, + } + graphDataElementsEdgesPositionAttrTypes := map[string]attr.Type{ + "x": types.Float32Type, + "y": types.Float32Type, + } + graphDataElementsEdgesAttrTypes := map[string]attr.Type{ + "classes": types.StringType, + "data": types.ObjectType{AttrTypes: graphDataElementsEdgesDataAttrTypes}, + "grabbable": types.BoolType, + "group": types.StringType, + "locked": types.BoolType, + "pannable": types.BoolType, + "position": types.ObjectType{AttrTypes: graphDataElementsEdgesPositionAttrTypes}, + "removed": types.BoolType, + "selectable": types.BoolType, + "selected": types.BoolType, + } + graphDataElementsEdgesElementType := types.ObjectType{AttrTypes: graphDataElementsEdgesAttrTypes} + graphDataElementsNodesDataAttrTypes := map[string]attr.Type{ + "capability_name": types.StringType, + "connection_id": types.StringType, + "connector_id": types.StringType, + "id": types.StringType, + "id_unique": types.StringType, + "label": types.StringType, + "name": types.StringType, + "node_type": types.StringType, + "properties": jsontypes.NormalizedType{}, + "status": types.StringType, + "type": types.StringType, + } + graphDataElementsNodesPositionAttrTypes := map[string]attr.Type{ + "x": types.Float32Type, + "y": types.Float32Type, + } + graphDataElementsNodesAttrTypes := map[string]attr.Type{ + "classes": types.StringType, + "data": types.ObjectType{AttrTypes: graphDataElementsNodesDataAttrTypes}, + "grabbable": types.BoolType, + "group": types.StringType, + "locked": types.BoolType, + "pannable": types.BoolType, + "position": types.ObjectType{AttrTypes: graphDataElementsNodesPositionAttrTypes}, + "removed": types.BoolType, + "selectable": types.BoolType, + "selected": types.BoolType, + } + graphDataElementsNodesElementType := types.ObjectType{AttrTypes: graphDataElementsNodesAttrTypes} + graphDataElementsAttrTypes := map[string]attr.Type{ + "edges": types.SetType{ElemType: graphDataElementsEdgesElementType}, + "nodes": types.SetType{ElemType: graphDataElementsNodesElementType}, + } + graphDataPanAttrTypes := map[string]attr.Type{ + "x": types.Float32Type, + "y": types.Float32Type, + } + graphDataAttrTypes := map[string]attr.Type{ + "box_selection_enabled": types.BoolType, + "data": jsontypes.NormalizedType{}, + "elements": types.ObjectType{AttrTypes: graphDataElementsAttrTypes}, + "max_zoom": types.NumberType, + "min_zoom": types.NumberType, + "pan": types.ObjectType{AttrTypes: graphDataPanAttrTypes}, + "panning_enabled": types.BoolType, + "renderer": jsontypes.NormalizedType{}, + "user_panning_enabled": types.BoolType, + "user_zooming_enabled": types.BoolType, + "zoom": types.Int32Type, + "zooming_enabled": types.BoolType, + } + var graphDataValue types.Object + if response.GraphData == nil { + graphDataValue = types.ObjectNull(graphDataAttrTypes) + } else { + var graphDataDataValue jsontypes.Normalized + if response.GraphData.Data == nil { + graphDataDataValue = jsontypes.NewNormalizedNull() + } else { + graphDataDataBytes, err := json.Marshal(response.GraphData.Data) + if err != nil { + respDiags.AddError( + "Error Marshaling graphData.data", + fmt.Sprintf("An error occurred while marshaling: %s", err.Error()), + ) + } else { + graphDataDataValue = jsontypes.NewNormalizedValue(string(graphDataDataBytes)) + } + } + var graphDataElementsEdgesValues []attr.Value + for _, graphDataElementsEdgesResponseValue := range response.GraphData.Elements.Edges { + graphDataElementsEdgesDataValue, diags := types.ObjectValue(graphDataElementsEdgesDataAttrTypes, map[string]attr.Value{ + "id": types.StringValue(graphDataElementsEdgesResponseValue.Data.Id), + "source": types.StringValue(graphDataElementsEdgesResponseValue.Data.Source), + "target": types.StringValue(graphDataElementsEdgesResponseValue.Data.Target), + }) + respDiags.Append(diags...) + graphDataElementsEdgesPositionValue, diags := types.ObjectValue(graphDataElementsEdgesPositionAttrTypes, map[string]attr.Value{ + "x": types.Float32Value(graphDataElementsEdgesResponseValue.Position.X), + "y": types.Float32Value(graphDataElementsEdgesResponseValue.Position.Y), + }) + respDiags.Append(diags...) + graphDataElementsEdgesValue, diags := types.ObjectValue(graphDataElementsEdgesAttrTypes, map[string]attr.Value{ + "classes": types.StringPointerValue(graphDataElementsEdgesResponseValue.Classes), + "data": graphDataElementsEdgesDataValue, + "grabbable": types.BoolValue(graphDataElementsEdgesResponseValue.Grabbable), + "group": types.StringValue(graphDataElementsEdgesResponseValue.Group), + "locked": types.BoolValue(graphDataElementsEdgesResponseValue.Locked), + "pannable": types.BoolValue(graphDataElementsEdgesResponseValue.Pannable), + "position": graphDataElementsEdgesPositionValue, + "removed": types.BoolValue(graphDataElementsEdgesResponseValue.Removed), + "selectable": types.BoolValue(graphDataElementsEdgesResponseValue.Selectable), + "selected": types.BoolValue(graphDataElementsEdgesResponseValue.Selected), + }) + respDiags.Append(diags...) + graphDataElementsEdgesValues = append(graphDataElementsEdgesValues, graphDataElementsEdgesValue) + } + graphDataElementsEdgesValue, diags := types.SetValue(graphDataElementsEdgesElementType, graphDataElementsEdgesValues) + respDiags.Append(diags...) + var graphDataElementsNodesValues []attr.Value + for _, graphDataElementsNodesResponseValue := range response.GraphData.Elements.Nodes { + var graphDataElementsNodesDataPropertiesValue jsontypes.Normalized + if graphDataElementsNodesResponseValue.Data.Properties == nil { + graphDataElementsNodesDataPropertiesValue = jsontypes.NewNormalizedNull() + } else { + graphDataElementsNodesDataPropertiesBytes, err := json.Marshal(graphDataElementsNodesResponseValue.Data.Properties) + if err != nil { + respDiags.AddError( + "Error Marshaling graphData.elements.nodes.data.properties", + fmt.Sprintf("An error occurred while marshaling: %s", err.Error()), + ) + } else { + graphDataElementsNodesDataPropertiesValue = jsontypes.NewNormalizedValue(string(graphDataElementsNodesDataPropertiesBytes)) + } + } + graphDataElementsNodesDataValue, diags := types.ObjectValue(graphDataElementsNodesDataAttrTypes, map[string]attr.Value{ + "capability_name": types.StringPointerValue(graphDataElementsNodesResponseValue.Data.CapabilityName), + "connection_id": types.StringPointerValue(graphDataElementsNodesResponseValue.Data.ConnectionId), + "connector_id": types.StringPointerValue(graphDataElementsNodesResponseValue.Data.ConnectorId), + "id": types.StringValue(graphDataElementsNodesResponseValue.Data.Id), + "id_unique": types.StringPointerValue(graphDataElementsNodesResponseValue.Data.IdUnique), + "label": types.StringPointerValue(graphDataElementsNodesResponseValue.Data.Label), + "name": types.StringPointerValue(graphDataElementsNodesResponseValue.Data.Name), + "node_type": types.StringValue(graphDataElementsNodesResponseValue.Data.NodeType), + "properties": graphDataElementsNodesDataPropertiesValue, + "status": types.StringPointerValue(graphDataElementsNodesResponseValue.Data.Status), + "type": types.StringPointerValue(graphDataElementsNodesResponseValue.Data.Type), + }) + respDiags.Append(diags...) + graphDataElementsNodesPositionValue, diags := types.ObjectValue(graphDataElementsNodesPositionAttrTypes, map[string]attr.Value{ + "x": types.Float32Value(graphDataElementsNodesResponseValue.Position.X), + "y": types.Float32Value(graphDataElementsNodesResponseValue.Position.Y), + }) + respDiags.Append(diags...) + graphDataElementsNodesValue, diags := types.ObjectValue(graphDataElementsNodesAttrTypes, map[string]attr.Value{ + "classes": types.StringPointerValue(graphDataElementsNodesResponseValue.Classes), + "data": graphDataElementsNodesDataValue, + "grabbable": types.BoolValue(graphDataElementsNodesResponseValue.Grabbable), + "group": types.StringValue(graphDataElementsNodesResponseValue.Group), + "locked": types.BoolValue(graphDataElementsNodesResponseValue.Locked), + "pannable": types.BoolValue(graphDataElementsNodesResponseValue.Pannable), + "position": graphDataElementsNodesPositionValue, + "removed": types.BoolValue(graphDataElementsNodesResponseValue.Removed), + "selectable": types.BoolValue(graphDataElementsNodesResponseValue.Selectable), + "selected": types.BoolValue(graphDataElementsNodesResponseValue.Selected), + }) + respDiags.Append(diags...) + graphDataElementsNodesValues = append(graphDataElementsNodesValues, graphDataElementsNodesValue) + } + graphDataElementsNodesValue, diags := types.SetValue(graphDataElementsNodesElementType, graphDataElementsNodesValues) + respDiags.Append(diags...) + graphDataElementsValue, diags := types.ObjectValue(graphDataElementsAttrTypes, map[string]attr.Value{ + "edges": graphDataElementsEdgesValue, + "nodes": graphDataElementsNodesValue, + }) + respDiags.Append(diags...) + var maxZoomValue types.Number + if response.GraphData.MaxZoom == nil || response.GraphData.MaxZoom.Float == nil { + maxZoomValue = types.NumberNull() + } else { + maxZoomValue = types.NumberValue(response.GraphData.MaxZoom.Float) + } + var minZoomValue types.Number + if response.GraphData.MinZoom == nil || response.GraphData.MinZoom.Float == nil { + minZoomValue = types.NumberNull() + } else { + minZoomValue = types.NumberValue(response.GraphData.MinZoom.Float) + } + graphDataPanValue, diags := types.ObjectValue(graphDataPanAttrTypes, map[string]attr.Value{ + "x": types.Float32Value(response.GraphData.Pan.X), + "y": types.Float32Value(response.GraphData.Pan.Y), + }) + respDiags.Append(diags...) + graphDataRendererValue := jsontypes.NewNormalizedNull() + graphDataRendererBytes, err := json.Marshal(response.GraphData.Renderer) + if err != nil { + respDiags.AddError( + "Error Marshaling graphData.renderer", + fmt.Sprintf("An error occurred while marshaling: %s", err.Error()), + ) + } else { + graphDataRendererValue = jsontypes.NewNormalizedValue(string(graphDataRendererBytes)) + } + graphDataValue, diags = types.ObjectValue(graphDataAttrTypes, map[string]attr.Value{ + "box_selection_enabled": types.BoolValue(response.GraphData.BoxSelectionEnabled), + "data": graphDataDataValue, + "elements": graphDataElementsValue, + "max_zoom": maxZoomValue, + "min_zoom": minZoomValue, + "pan": graphDataPanValue, + "panning_enabled": types.BoolValue(response.GraphData.PanningEnabled), + "renderer": graphDataRendererValue, + "user_panning_enabled": types.BoolValue(response.GraphData.UserPanningEnabled), + "user_zooming_enabled": types.BoolValue(response.GraphData.UserZoomingEnabled), + // floor the zoom to an integer to match the schema + "zoom": types.Int32Value(int32(response.GraphData.Zoom)), + "zooming_enabled": types.BoolPointerValue(response.GraphData.ZoomingEnabled), + }) + respDiags.Append(diags...) + } + state.GraphData = graphDataValue + // id + state.Id = types.StringValue(response.Id) + // input_schema + inputSchemaAttrTypes := map[string]attr.Type{ + "description": types.StringType, + "is_expanded": types.BoolType, + "preferred_control_type": types.StringType, + "preferred_data_type": types.StringType, + "property_name": types.StringType, + "required": types.BoolType, + } + inputSchemaElementType := types.ObjectType{AttrTypes: inputSchemaAttrTypes} + var inputSchemaValue types.List + if response.InputSchema == nil { + inputSchemaValue = types.ListNull(inputSchemaElementType) + } else { + var inputSchemaValues []attr.Value + for _, inputSchemaResponseValue := range response.InputSchema { + inputSchemaPreferredControlTypeValue := types.StringValue(string(inputSchemaResponseValue.PreferredControlType)) + inputSchemaPreferredDataTypeValue := types.StringValue(string(inputSchemaResponseValue.PreferredDataType)) + inputSchemaValue, diags := types.ObjectValue(inputSchemaAttrTypes, map[string]attr.Value{ + "description": types.StringPointerValue(inputSchemaResponseValue.Description), + "is_expanded": types.BoolPointerValue(inputSchemaResponseValue.IsExpanded), + "preferred_control_type": inputSchemaPreferredControlTypeValue, + "preferred_data_type": inputSchemaPreferredDataTypeValue, + "property_name": types.StringValue(inputSchemaResponseValue.PropertyName), + "required": types.BoolPointerValue(inputSchemaResponseValue.Required), + }) + respDiags.Append(diags...) + inputSchemaValues = append(inputSchemaValues, inputSchemaValue) + } + inputSchemaValue, diags = types.ListValue(inputSchemaElementType, inputSchemaValues) + respDiags.Append(diags...) + } + state.InputSchema = inputSchemaValue + // name + state.Name = types.StringValue(response.Name) + // output_schema + outputSchemaOutputAttrTypes := map[string]attr.Type{ + "additional_properties": types.BoolType, + "properties": jsontypes.NormalizedType{}, + "type": types.StringType, + } + outputSchemaAttrTypes := map[string]attr.Type{ + "output": types.ObjectType{AttrTypes: outputSchemaOutputAttrTypes}, + } + var outputSchemaValue types.Object + if response.OutputSchema == nil { + outputSchemaValue = types.ObjectNull(outputSchemaAttrTypes) + } else { + var outputSchemaOutputPropertiesValue jsontypes.Normalized + if response.OutputSchema.Output.Properties == nil { + outputSchemaOutputPropertiesValue = jsontypes.NewNormalizedNull() + } else { + outputSchemaOutputPropertiesBytes, err := json.Marshal(response.OutputSchema.Output.Properties) + if err != nil { + respDiags.AddError( + "Error Marshaling outputSchema.output.properties", + fmt.Sprintf("An error occurred while marshaling: %s", err.Error()), + ) + } else { + outputSchemaOutputPropertiesValue = jsontypes.NewNormalizedValue(string(outputSchemaOutputPropertiesBytes)) + } + } + outputSchemaOutputValue, diags := types.ObjectValue(outputSchemaOutputAttrTypes, map[string]attr.Value{ + "additional_properties": types.BoolPointerValue(response.OutputSchema.Output.AdditionalPropertiesField), + "properties": outputSchemaOutputPropertiesValue, + "type": types.StringValue(string(response.OutputSchema.Output.Type)), + }) + respDiags.Append(diags...) + outputSchemaValue, diags = types.ObjectValue(outputSchemaAttrTypes, map[string]attr.Value{ + "output": outputSchemaOutputValue, + }) + respDiags.Append(diags...) + } + state.OutputSchema = outputSchemaValue + // published_version + state.PublishedVersion = types.Float32PointerValue(response.PublishedVersion) + // settings + settingsJsLinksAttrTypes := map[string]attr.Type{ + "crossorigin": types.StringType, + "defer": types.BoolType, + "integrity": types.StringType, + "label": types.StringType, + "referrerpolicy": types.StringType, + "type": types.StringType, + "value": types.StringType, + } + settingsJsLinksElementType := types.ObjectType{AttrTypes: settingsJsLinksAttrTypes} + settingsAttrTypes := map[string]attr.Type{ + "csp": types.StringType, + "css": types.StringType, + "css_links": types.SetType{ElemType: types.StringType}, + "custom_error_screen_brand_logo_url": types.StringType, + "custom_error_show_footer": types.BoolType, + "custom_favicon_link": types.StringType, + "custom_logo_urlselection": types.Int32Type, + "custom_title": types.StringType, + "default_error_screen_brand_logo": types.BoolType, + "flow_http_timeout_in_seconds": types.Int32Type, + "flow_timeout_in_seconds": types.Int32Type, + "intermediate_loading_screen_css": types.StringType, + "intermediate_loading_screen_html": types.StringType, + "js_custom_flow_player": types.StringType, + "js_links": types.SetType{ElemType: settingsJsLinksElementType}, + "log_level": types.Int32Type, + "require_authentication_to_initiate": types.BoolType, + "scrub_sensitive_info": types.BoolType, + "sensitive_info_fields": types.SetType{ElemType: types.StringType}, + "use_csp": types.BoolType, + "use_custom_css": types.BoolType, + "use_custom_flow_player": types.BoolType, + "use_custom_script": types.BoolType, + "use_intermediate_loading_screen": types.BoolType, + "validate_on_save": types.BoolType, + } + var settingsValue types.Object + if response.Settings == nil { + settingsValue = types.ObjectNull(settingsAttrTypes) + } else { + var settingsCssLinksValue types.Set + if response.Settings.CssLinks == nil { + settingsCssLinksValue = types.SetNull(types.StringType) + } else { + settingsCssLinksValue, diags = types.SetValueFrom(context.Background(), types.StringType, response.Settings.CssLinks) + respDiags.Append(diags...) + } + var flowTimeoutInSecondsValue types.Int32 + if response.Settings.FlowTimeoutInSeconds == nil { + flowTimeoutInSecondsValue = types.Int32Null() + } else { + // Truncate timeout to int32 to match the schema + flowTimeoutInSecondsValue = types.Int32Value(int32(*response.Settings.FlowTimeoutInSeconds)) + } + var intermediateLoadingScreenCSSValue types.String + if response.Settings.IntermediateLoadingScreenCSS == nil { + intermediateLoadingScreenCSSValue = types.StringNull() + } else { + // If string is set or if neither object nor string is set, just use the .String value + if response.Settings.IntermediateLoadingScreenCSS.String != nil || response.Settings.IntermediateLoadingScreenCSS.Object == nil { + intermediateLoadingScreenCSSValue = types.StringPointerValue(response.Settings.IntermediateLoadingScreenCSS.String) + } else { + // Otherwise, marshal the .Object field to a JSON string + intermediateLoadingScreenCSSValueBytes, err := json.Marshal(response.Settings.IntermediateLoadingScreenCSS.Object) + if err != nil { + respDiags.AddError( + "Error Marshaling settings.intermediateLoadingScreenCSS.object", + fmt.Sprintf("An error occurred while marshaling: %s", err.Error()), + ) + } + intermediateLoadingScreenCSSValue = types.StringValue(string(intermediateLoadingScreenCSSValueBytes)) + } + } + var intermediateLoadingScreenHTMLValue types.String + if response.Settings.IntermediateLoadingScreenHTML == nil { + intermediateLoadingScreenHTMLValue = types.StringNull() + } else { + // If string is set or if neither object nor string is set, just use the .String value + if response.Settings.IntermediateLoadingScreenHTML.String != nil || response.Settings.IntermediateLoadingScreenHTML.Object == nil { + intermediateLoadingScreenHTMLValue = types.StringPointerValue(response.Settings.IntermediateLoadingScreenHTML.String) + } else { + // Otherwise, marshal the .Object field to a JSON string + intermediateLoadingScreenHTMLValueBytes, err := json.Marshal(response.Settings.IntermediateLoadingScreenHTML.Object) + if err != nil { + respDiags.AddError( + "Error Marshaling settings.intermediateLoadingScreenHTML.object", + fmt.Sprintf("An error occurred while marshaling: %s", err.Error()), + ) + } + intermediateLoadingScreenHTMLValue = types.StringValue(string(intermediateLoadingScreenHTMLValueBytes)) + } + } + var settingsJsLinksValue types.Set + if response.Settings.JsLinks == nil { + settingsJsLinksValue = types.SetNull(settingsJsLinksElementType) + } else { + var settingsJsLinksValues []attr.Value + for _, settingsJsLinksResponseValue := range response.Settings.JsLinks { + settingsJsLinksValue, diags := types.ObjectValue(settingsJsLinksAttrTypes, map[string]attr.Value{ + "crossorigin": types.StringValue(settingsJsLinksResponseValue.Crossorigin), + "defer": types.BoolValue(settingsJsLinksResponseValue.Defer), + "integrity": types.StringValue(settingsJsLinksResponseValue.Integrity), + "label": types.StringValue(settingsJsLinksResponseValue.Label), + "referrerpolicy": types.StringValue(settingsJsLinksResponseValue.Referrerpolicy), + "type": types.StringValue(settingsJsLinksResponseValue.Type), + "value": types.StringValue(settingsJsLinksResponseValue.Value), + }) + respDiags.Append(diags...) + settingsJsLinksValues = append(settingsJsLinksValues, settingsJsLinksValue) + } + settingsJsLinksValue, diags = types.SetValue(settingsJsLinksElementType, settingsJsLinksValues) + respDiags.Append(diags...) + } + var settingsSensitiveInfoFieldsValue types.Set + if response.Settings.SensitiveInfoFields == nil { + settingsSensitiveInfoFieldsValue = types.SetNull(types.StringType) + } else { + settingsSensitiveInfoFieldsValue, diags = types.SetValueFrom(context.Background(), types.StringType, response.Settings.SensitiveInfoFields) + respDiags.Append(diags...) + } + settingsValue, diags = types.ObjectValue(settingsAttrTypes, map[string]attr.Value{ + "csp": types.StringPointerValue(response.Settings.Csp), + "css": types.StringPointerValue(response.Settings.Css), + "css_links": settingsCssLinksValue, + "custom_error_screen_brand_logo_url": types.StringPointerValue(response.Settings.CustomErrorScreenBrandLogoUrl), + "custom_error_show_footer": types.BoolPointerValue(response.Settings.CustomErrorShowFooter), + "custom_favicon_link": types.StringPointerValue(response.Settings.CustomFaviconLink), + "custom_logo_urlselection": types.Int32PointerValue(response.Settings.CustomLogoURLSelection), + "custom_title": types.StringPointerValue(response.Settings.CustomTitle), + "default_error_screen_brand_logo": types.BoolPointerValue(response.Settings.DefaultErrorScreenBrandLogo), + "flow_http_timeout_in_seconds": types.Int32PointerValue(response.Settings.FlowHttpTimeoutInSeconds), + "flow_timeout_in_seconds": flowTimeoutInSecondsValue, + "intermediate_loading_screen_css": intermediateLoadingScreenCSSValue, + "intermediate_loading_screen_html": intermediateLoadingScreenHTMLValue, + "js_custom_flow_player": types.StringPointerValue(response.Settings.JsCustomFlowPlayer), + "js_links": settingsJsLinksValue, + "log_level": types.Int32PointerValue(response.Settings.LogLevel), + "require_authentication_to_initiate": types.BoolPointerValue(response.Settings.RequireAuthenticationToInitiate), + "scrub_sensitive_info": types.BoolPointerValue(response.Settings.ScrubSensitiveInfo), + "sensitive_info_fields": settingsSensitiveInfoFieldsValue, + "use_csp": types.BoolPointerValue(response.Settings.UseCSP), + "use_custom_css": types.BoolPointerValue(response.Settings.UseCustomCSS), + "use_custom_flow_player": types.BoolPointerValue(response.Settings.UseCustomFlowPlayer), + "use_custom_script": types.BoolPointerValue(response.Settings.UseCustomScript), + "use_intermediate_loading_screen": types.BoolPointerValue(response.Settings.UseIntermediateLoadingScreen), + "validate_on_save": types.BoolPointerValue(response.Settings.ValidateOnSave), + }) + respDiags.Append(diags...) + } + state.Settings = settingsValue + // trigger + triggerConfigurationMfaAttrTypes := map[string]attr.Type{ + "enabled": types.BoolType, + "time": types.Float32Type, + "time_format": types.StringType, + } + triggerConfigurationPwdAttrTypes := map[string]attr.Type{ + "enabled": types.BoolType, + "time": types.Float32Type, + "time_format": types.StringType, + } + triggerConfigurationAttrTypes := map[string]attr.Type{ + "mfa": types.ObjectType{AttrTypes: triggerConfigurationMfaAttrTypes}, + "pwd": types.ObjectType{AttrTypes: triggerConfigurationPwdAttrTypes}, + } + triggerAttrTypes := map[string]attr.Type{ + "configuration": types.ObjectType{AttrTypes: triggerConfigurationAttrTypes}, + "type": types.StringType, + } + var triggerValue types.Object + if response.Trigger == nil { + triggerValue = types.ObjectNull(triggerAttrTypes) + } else { + var triggerConfigurationValue types.Object + if response.Trigger.Configuration == nil { + triggerConfigurationValue = types.ObjectNull(triggerConfigurationAttrTypes) + } else { + triggerConfigurationMfaValue, diags := types.ObjectValue(triggerConfigurationMfaAttrTypes, map[string]attr.Value{ + "enabled": types.BoolValue(response.Trigger.Configuration.Mfa.Enabled), + "time": types.Float32Value(response.Trigger.Configuration.Mfa.Time), + "time_format": types.StringValue(response.Trigger.Configuration.Mfa.TimeFormat), + }) + respDiags.Append(diags...) + triggerConfigurationPwdValue, diags := types.ObjectValue(triggerConfigurationPwdAttrTypes, map[string]attr.Value{ + "enabled": types.BoolValue(response.Trigger.Configuration.Pwd.Enabled), + "time": types.Float32Value(response.Trigger.Configuration.Pwd.Time), + "time_format": types.StringValue(response.Trigger.Configuration.Pwd.TimeFormat), + }) + respDiags.Append(diags...) + triggerConfigurationValue, diags = types.ObjectValue(triggerConfigurationAttrTypes, map[string]attr.Value{ + "mfa": triggerConfigurationMfaValue, + "pwd": triggerConfigurationPwdValue, + }) + respDiags.Append(diags...) + } + triggerTypeValue := types.StringValue(string(response.Trigger.Type)) + triggerValue, diags = types.ObjectValue(triggerAttrTypes, map[string]attr.Value{ + "configuration": triggerConfigurationValue, + "type": triggerTypeValue, + }) + respDiags.Append(diags...) + } + state.Trigger = triggerValue + return respDiags +} + +func (r *davinciFlowResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + var data davinciFlowResourceModel + + if r.Client == nil { + resp.Diagnostics.AddError( + "Client not initialized", + "Expected the PingOne client, got nil. Please report this issue to the provider maintainers.") + return + } + + // Read Terraform prior state data into the model + resp.Diagnostics.Append(req.State.Get(ctx, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + // Read API call logic + environmentIdUuid, err := uuid.Parse(data.EnvironmentId.ValueString()) + if err != nil { + resp.Diagnostics.AddAttributeError( + path.Root("environment_id"), + "Attribute Validation Error", + fmt.Sprintf("The value '%s' for attribute '%s' is not a valid UUID: %s", data.EnvironmentId.ValueString(), "EnvironmentId", err.Error()), + ) + return + } + var responseData *pingone.DaVinciFlowResponse + resp.Diagnostics.Append(framework.ParseResponse( + ctx, + + func() (any, *http.Response, error) { + fO, fR, fErr := r.Client.DaVinciFlowsApi.GetFlowById(ctx, environmentIdUuid, data.Id.ValueString()).Execute() + return framework.CheckEnvironmentExistsOnPermissionsError(ctx, r.Client, data.EnvironmentId.ValueString(), fO, fR, fErr) + }, + "GetFlowById", + framework.CustomErrorResourceNotFoundWarning, + framework.InsufficientPrivilegeRetryable, + &responseData, + )...) + + if resp.Diagnostics.HasError() { + return + } + + // Remove from state if resource is not found + if responseData == nil { + resp.State.RemoveResource(ctx) + return + } + + // Read response into the model + resp.Diagnostics.Append(data.readClientResponse(responseData)...) + + if resp.Diagnostics.HasError() { + return + } + + // Save updated data into Terraform state + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (r *davinciFlowResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + var data davinciFlowResourceModel + + if r.Client == nil { + resp.Diagnostics.AddError( + "Client not initialized", + "Expected the PingOne client, got nil. Please report this issue to the provider maintainers.") + return + } + + // Read Terraform plan data into the model + resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + // Update API call logic + clientData, diags := data.buildClientStructPut() + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + environmentIdUuid, err := uuid.Parse(data.EnvironmentId.ValueString()) + if err != nil { + resp.Diagnostics.AddAttributeError( + path.Root("environment_id"), + "Attribute Validation Error", + fmt.Sprintf("The value '%s' for attribute '%s' is not a valid UUID: %s", data.EnvironmentId.ValueString(), "EnvironmentId", err.Error()), + ) + return + } + var responseData *pingone.DaVinciFlowResponse + resp.Diagnostics.Append(framework.ParseResponse( + ctx, + + func() (any, *http.Response, error) { + fO, fR, fErr := r.Client.DaVinciFlowsApi.ReplaceFlowById(ctx, environmentIdUuid, data.Id.ValueString()).DaVinciFlowReplaceRequest(*clientData).Execute() + return framework.CheckEnvironmentExistsOnPermissionsError(ctx, r.Client, data.EnvironmentId.ValueString(), fO, fR, fErr) + }, + "ReplaceFlowById", + framework.DefaultCustomError, + framework.InsufficientPrivilegeRetryable, + &responseData, + )...) + + if resp.Diagnostics.HasError() { + return + } + + // Read response into the model + resp.Diagnostics.Append(data.readClientResponse(responseData)...) + + if resp.Diagnostics.HasError() { + return + } + + // Save data into Terraform state + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (r *davinciFlowResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + var data davinciFlowResourceModel + + if r.Client == nil { + resp.Diagnostics.AddError( + "Client not initialized", + "Expected the PingOne client, got nil. Please report this issue to the provider maintainers.") + return + } + + // Read Terraform prior state data into the model + resp.Diagnostics.Append(req.State.Get(ctx, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + // Delete API call logic + environmentIdUuid, err := uuid.Parse(data.EnvironmentId.ValueString()) + if err != nil { + resp.Diagnostics.AddAttributeError( + path.Root("environment_id"), + "Attribute Validation Error", + fmt.Sprintf("The value '%s' for attribute '%s' is not a valid UUID: %s", data.EnvironmentId.ValueString(), "EnvironmentId", err.Error()), + ) + return + } + resp.Diagnostics.Append(framework.ParseResponse( + ctx, + + func() (any, *http.Response, error) { + fR, fErr := r.Client.DaVinciFlowsApi.DeleteFlowById(ctx, environmentIdUuid, data.Id.ValueString()).Execute() + return framework.CheckEnvironmentExistsOnPermissionsError(ctx, r.Client, data.EnvironmentId.ValueString(), nil, fR, fErr) + }, + "DeleteFlowById", + framework.CustomErrorResourceNotFoundWarning, + framework.InsufficientPrivilegeRetryable, + nil, + )...) +} + +func (r *davinciFlowResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { + + idComponents := []framework.ImportComponent{ + { + Label: "environment_id", + Regexp: verify.P1ResourceIDRegexp, + }, + { + Label: "flow_id", + Regexp: verify.P1DVResourceIDRegexp, + PrimaryID: true, + }, + } + + attributes, err := framework.ParseImportID(req.ID, idComponents...) + if err != nil { + resp.Diagnostics.AddError( + "Unexpected Import Identifier", + err.Error(), + ) + return + } + + for _, idComponent := range idComponents { + pathKey := idComponent.Label + + if idComponent.PrimaryID { + pathKey = "id" + } + + resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root(pathKey), attributes[idComponent.Label])...) + } +} diff --git a/internal/service/davinci/resource_davinci_flow_gen_test.go b/internal/service/davinci/resource_davinci_flow_gen_test.go new file mode 100644 index 000000000..d57a65854 --- /dev/null +++ b/internal/service/davinci/resource_davinci_flow_gen_test.go @@ -0,0 +1,1108 @@ +// Copyright © 2025 Ping Identity Corporation +// Code generated by ping-terraform-plugin-framework-generator + +//go:build beta + +package davinci_test + +import ( + "context" + "fmt" + "os" + "regexp" + "testing" + + "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/pingidentity/pingone-go-client/pingone" + "github.com/pingidentity/terraform-provider-pingone/internal/acctest" + acctestlegacysdk "github.com/pingidentity/terraform-provider-pingone/internal/acctest/legacysdk" + "github.com/pingidentity/terraform-provider-pingone/internal/acctest/service/base" + "github.com/pingidentity/terraform-provider-pingone/internal/acctest/testhcl" + "github.com/pingidentity/terraform-provider-pingone/internal/verify" +) + +func TestAccDavinciFlow_RemovalDrift(t *testing.T) { + t.Parallel() + + resourceName := acctest.ResourceNameGen() + resourceFullName := fmt.Sprintf("pingone_davinci_flow.%s", resourceName) + + environmentName := acctest.ResourceNameGenEnvironment() + + licenseID := os.Getenv("PINGONE_LICENSE_ID") + var environmentId string + var id string + + var p1Client *pingone.APIClient + var ctx = context.Background() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheckClient(t) + acctest.PreCheckNewEnvironment(t) + acctest.PreCheckBeta(t) + + p1Client = acctest.PreCheckTestClient(ctx, t) + }, + ProtoV6ProviderFactories: acctest.ProtoV6ProviderFactories, + CheckDestroy: davinciFlow_CheckDestroy, + ErrorCheck: acctest.ErrorCheck(t), + Steps: []resource.TestStep{ + // Configure + { + Config: davinciFlow_MinimalHCL(resourceName, false), + Check: davinciFlow_GetIDs(resourceFullName, &environmentId, &id), + }, + { + PreConfig: func() { + davinciFlow_Delete(ctx, p1Client, t, environmentId, id) + }, + RefreshState: true, + ExpectNonEmptyPlan: true, + }, + // Test removal of the environment + { + Config: davinciFlow_NewEnvHCL(environmentName, licenseID, resourceName), + Check: davinciFlow_GetIDs(resourceFullName, &environmentId, &id), + }, + { + PreConfig: func() { + base.Environment_RemovalDrift_PreConfig(ctx, p1Client, t, environmentId) + }, + RefreshState: true, + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func TestAccDavinciFlow_MinimalMaximalClean(t *testing.T) { + testAccDavinciFlow_MinimalMaximal(t, false) +} + +func TestAccDavinciFlow_MinimalMaximalWithBootstrap(t *testing.T) { + testAccDavinciFlow_MinimalMaximal(t, true) +} + +func testAccDavinciFlow_MinimalMaximal(t *testing.T, withBootstrap bool) { + t.Parallel() + + resourceName := acctest.ResourceNameGen() + resourceFullName := fmt.Sprintf("pingone_davinci_flow.%s", resourceName) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheckClient(t) + acctest.PreCheckBeta(t) + }, + ProtoV6ProviderFactories: acctest.ProtoV6ProviderFactories, + CheckDestroy: davinciFlow_CheckDestroy, + ErrorCheck: acctest.ErrorCheck(t), + Steps: []resource.TestStep{ + { + // Create the resource with a minimal model + Config: davinciFlow_MinimalHCL(resourceName, withBootstrap), + Check: davinciFlow_CheckComputedValuesMinimal(resourceName), + }, + { + // Delete the minimal model + Config: davinciFlow_MinimalHCL(resourceName, withBootstrap), + Destroy: true, + }, + { + // Re-create with a complete model + Config: davinciFlow_DeviceManagementMainFlowHCL(t, resourceName, withBootstrap), + Check: davinciFlow_CheckComputedValuesComplete(resourceName), + }, + { + // Back to minimal model + Config: davinciFlow_MinimalHCL(resourceName, withBootstrap), + Check: davinciFlow_CheckComputedValuesMinimal(resourceName), + }, + { + // Back to complete model + Config: davinciFlow_DeviceManagementMainFlowHCL(t, resourceName, withBootstrap), + Check: davinciFlow_CheckComputedValuesComplete(resourceName), + }, + { + // Complete model with reordering of lists and sets + Config: davinciFlow_DeviceManagementMainFlowReorderedHCL(t, resourceName, withBootstrap), + Check: davinciFlow_CheckComputedValuesComplete(resourceName), + }, + { + // Test importing the resource + Config: davinciFlow_DeviceManagementMainFlowHCL(t, resourceName, withBootstrap), + ResourceName: fmt.Sprintf("pingone_davinci_flow.%s", resourceName), + ImportStateIdFunc: func() resource.ImportStateIdFunc { + return func(s *terraform.State) (string, error) { + rs, ok := s.RootModule().Resources[resourceFullName] + if !ok { + return "", fmt.Errorf("Resource Not found: %s", resourceFullName) + } + + return fmt.Sprintf("%s/%s", rs.Primary.Attributes["environment_id"], rs.Primary.Attributes["id"]), nil + } + }(), + ImportStateVerifyIdentifierAttribute: "id", + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccDavinciFlow_BasicClean(t *testing.T) { + testAccDavinciFlow_Basic(t, false) +} + +func TestAccDavinciFlow_BasicWithBootstrap(t *testing.T) { + testAccDavinciFlow_Basic(t, true) +} + +func testAccDavinciFlow_Basic(t *testing.T, withBootstrapConfig bool) { + t.Parallel() + + resourceName := acctest.ResourceNameGen() + resourceFullName := fmt.Sprintf("pingone_davinci_flow.%s", resourceName) + + fullStepHcl := davinciFlow_FullBasicHCL(t, resourceName, withBootstrapConfig) + fullStep := resource.TestStep{ + Config: fullStepHcl, + Check: davinciFlow_CheckComputedValuesFullBasic(resourceName), + } + + fullStepModifyNodePropsHcl := davinciFlow_FullBasicModifyNodePropertiesHCL(t, resourceName, withBootstrapConfig) + fullStepModifyNodeProps := resource.TestStep{ + Config: fullStepModifyNodePropsHcl, + Check: davinciFlow_CheckComputedValuesFullBasic(resourceName), + } + + minimalStepHcl := davinciFlow_FullMinimalHCL(t, resourceName, withBootstrapConfig) + minimalStep := resource.TestStep{ + Config: minimalStepHcl, + Check: davinciFlow_CheckComputedValuesFullMinimal(resourceName), + } + + updateStepHcl := davinciFlow_FullMinimalUpdateHCL(t, resourceName, withBootstrapConfig) + updateStep := resource.TestStep{ + Config: updateStepHcl, + Check: davinciFlow_CheckComputedValuesFullMinimal(resourceName), + } + + updateNoDescriptionStepHcl := davinciFlow_FullMinimalNoDescriptionUpdateHCL(t, resourceName, withBootstrapConfig) + updateNoDescriptionStep := resource.TestStep{ + Config: updateNoDescriptionStepHcl, + Check: davinciFlow_CheckComputedValuesFullMinimal(resourceName), + } + + updateNewNodeStepHcl := davinciFlow_FullMinimalWithAddedNodeHCL(t, resourceName, withBootstrapConfig) + updateNewNodeStep := resource.TestStep{ + Config: updateNewNodeStepHcl, + Check: davinciFlow_CheckComputedValuesFullMinimalAddedNode(resourceName), + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheckClient(t) + acctest.PreCheckBeta(t) + }, + ProtoV6ProviderFactories: acctest.ProtoV6ProviderFactories, + CheckDestroy: davinciFlow_CheckDestroy, + ErrorCheck: acctest.ErrorCheck(t), + Steps: []resource.TestStep{ + // Create full from scratch + fullStep, + minimalStep, + { + Config: minimalStepHcl, + Destroy: true, + }, + // Create minimal from scratch + minimalStep, + fullStep, + // Test modifying node properties + fullStepModifyNodeProps, + { + Config: fullStepModifyNodePropsHcl, + Destroy: true, + }, + // Test updates + minimalStep, + updateStep, + { + Config: updateStepHcl, + Destroy: true, + }, + // Test updates without description + minimalStep, + updateNoDescriptionStep, + // Test adding a node + updateNewNodeStep, + // Test importing the resource + { + Config: updateNewNodeStepHcl, + ResourceName: fmt.Sprintf("pingone_davinci_flow.%s", resourceName), + ImportStateIdFunc: func() resource.ImportStateIdFunc { + return func(s *terraform.State) (string, error) { + rs, ok := s.RootModule().Resources[resourceFullName] + if !ok { + return "", fmt.Errorf("Resource Not found: %s", resourceFullName) + } + + return fmt.Sprintf("%s/%s", rs.Primary.Attributes["environment_id"], rs.Primary.Attributes["id"]), nil + } + }(), + ImportStateVerifyIdentifierAttribute: "id", + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccDavinciFlow_EmptyObjectsInSettings(t *testing.T) { + t.Parallel() + + resourceName := acctest.ResourceNameGen() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheckClient(t) + acctest.PreCheckBeta(t) + }, + ProtoV6ProviderFactories: acctest.ProtoV6ProviderFactories, + CheckDestroy: davinciFlow_CheckDestroy, + ErrorCheck: acctest.ErrorCheck(t), + Steps: []resource.TestStep{ + { + Config: davinciFlow_EmptyObjectsInSettingsHCL(t, resourceName, false), + Check: davinciFlow_CheckComputedValuesFullMinimal(resourceName), + }, + }, + }) +} + +func TestAccDavinciFlow_ComplexObjectsInSettings(t *testing.T) { + t.Parallel() + + resourceName := acctest.ResourceNameGen() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheckClient(t) + acctest.PreCheckBeta(t) + }, + ProtoV6ProviderFactories: acctest.ProtoV6ProviderFactories, + CheckDestroy: davinciFlow_CheckDestroy, + ErrorCheck: acctest.ErrorCheck(t), + Steps: []resource.TestStep{ + { + Config: davinciFlow_ComplexObjectsInSettingsHCL(t, resourceName, false), + Check: davinciFlow_CheckComputedValuesFullMinimal(resourceName), + }, + }, + }) +} + +func TestAccDavinciFlow_VariableRefsClean(t *testing.T) { + testAccDavinciFlow_VariableRefs(t, false) +} + +func TestAccDavinciFlow_VariableRefsWithBootstrap(t *testing.T) { + testAccDavinciFlow_VariableRefs(t, true) +} + +func testAccDavinciFlow_VariableRefs(t *testing.T, withBootstrap bool) { + t.Parallel() + + resourceName := acctest.ResourceNameGen() + + fullWithVarsStepHcl := davinciFlow_VariableRefsHCL(t, resourceName, withBootstrap) + fullWithVarsStep := resource.TestStep{ + Config: fullWithVarsStepHcl, + Check: davinciFlow_CheckComputedValuesFullBasicWithVariableRefs(resourceName), + } + + minimalNoDefinedVarsStepHcl := davinciFlow_FullBasicHCL(t, resourceName, withBootstrap) + minimalNoDefinedVarsStep := resource.TestStep{ + Config: minimalNoDefinedVarsStepHcl, + Check: davinciFlow_CheckComputedValuesFullBasic(resourceName), + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheckClient(t) + acctest.PreCheckBeta(t) + }, + ProtoV6ProviderFactories: acctest.ProtoV6ProviderFactories, + CheckDestroy: davinciFlow_CheckDestroy, + ErrorCheck: acctest.ErrorCheck(t), + Steps: []resource.TestStep{ + // Create full from scratch + fullWithVarsStep, + minimalNoDefinedVarsStep, + { + Config: minimalNoDefinedVarsStepHcl, + Destroy: true, + }, + // Create minimal from scratch + minimalNoDefinedVarsStep, + fullWithVarsStep, + { + Config: davinciFlow_VariableRefsHCL(t, resourceName, withBootstrap), + Check: davinciFlow_CheckComputedValuesFullBasicWithVariableRefs(resourceName), + }, + }, + }) +} + +func TestAccDavinciFlow_NewEnv(t *testing.T) { + t.Parallel() + + resourceName := acctest.ResourceNameGen() + + environmentName := acctest.ResourceNameGenEnvironment() + + licenseID := os.Getenv("PINGONE_LICENSE_ID") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheckClient(t) + acctest.PreCheckNewEnvironment(t) + acctest.PreCheckBeta(t) + }, + ProtoV6ProviderFactories: acctest.ProtoV6ProviderFactories, + CheckDestroy: davinciFlow_CheckDestroy, + ErrorCheck: acctest.ErrorCheck(t), + Steps: []resource.TestStep{ + { + Config: davinciFlow_NewEnvHCL(environmentName, licenseID, resourceName), + Check: davinciFlow_CheckComputedValuesMinimal(resourceName), + }, + }, + }) +} + +func TestAccDavinciFlow_BadParameters(t *testing.T) { + t.Parallel() + + resourceName := acctest.ResourceNameGen() + resourceFullName := fmt.Sprintf("pingone_davinci_flow.%s", resourceName) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheckClient(t) + acctest.PreCheckBeta(t) + }, + ProtoV6ProviderFactories: acctest.ProtoV6ProviderFactories, + CheckDestroy: davinciFlow_CheckDestroy, + ErrorCheck: acctest.ErrorCheck(t), + Steps: []resource.TestStep{ + // Configure + { + Config: davinciFlow_MinimalHCL(resourceName, true), + }, + // Errors + { + ResourceName: resourceFullName, + ImportState: true, + ExpectError: regexp.MustCompile(`Unexpected Import Identifier`), + }, + { + ResourceName: resourceFullName, + ImportStateId: "/", + ImportState: true, + ExpectError: regexp.MustCompile(`Unexpected Import Identifier`), + }, + { + ResourceName: resourceFullName, + ImportStateId: "badformat/badformat", + ImportState: true, + ExpectError: regexp.MustCompile(`Unexpected Import Identifier`), + }, + }, + }) +} + +// Minimal HCL with a one-node "flow" +func davinciFlow_MinimalHCL(resourceName string, withBootstrap bool) string { + return fmt.Sprintf(` + %[1]s + +resource "pingone_davinci_flow" "%[2]s" { + environment_id = data.pingone_environment.general_test.id + name = "%[2]s" + description = "This is a demo flow" + color = "#00FF00" + + graph_data = { + elements = { + nodes = [{ + data = { + id = "8bnj41592a" + node_type = "CONNECTION" + connector_id = "pingOneSSOConnector" + label = "PingOne" + status = "configured" + capability_name = "userLookup" + type = "action" + properties = jsonencode({ + "additionalUserProperties" : { + "value" : [] + }, + "username" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + }, + "population" : { + "value" : "c9f3fb3f-11e9-4eb0-b4ba-9fb7789a8418" + }, + "userIdentifierForFindUser" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 420 + y = 360 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }] + } + + data = "{}" + + box_selection_enabled = true + user_zooming_enabled = true + zooming_enabled = true + zoom = 1 + min_zoom = 0.01 + max_zoom = 10000 + panning_enabled = true + user_panning_enabled = true + + pan = { + x = 0 + y = 0 + } + + renderer = jsonencode({ + "name" : "null" + }) + } + + output_schema = { + output = { + type = "object", + properties = jsonencode({}), + additionalProperties = true + } + } + + trigger = { + type = "AUTHENTICATION" + } +} +`, acctest.DaVinciSandboxEnvironment(withBootstrap), resourceName) +} + +// HCL for the OOTB "Device Management - Main Flow" flow +func davinciFlow_DeviceManagementMainFlowHCL(t *testing.T, resourceName string, withBootstrap bool) string { + hcl, err := testhcl.ReadTestHcl("pingone_davinci_flow/ootb_device_management.tf") + if err != nil { + t.Fatalf("failed to read HCL in davinciFlow_DeviceManagementMainFlowHCL: %v", err) + } + return fmt.Sprintf(hcl, acctest.DaVinciSandboxEnvironment(withBootstrap), resourceName) +} + +// HCL for the OOTB "Device Management - Main Flow" flow with reorderings for lists and sets +func davinciFlow_DeviceManagementMainFlowReorderedHCL(t *testing.T, resourceName string, withBootstrap bool) string { + hcl, err := testhcl.ReadTestHcl("pingone_davinci_flow/ootb_device_management_reordered.tf") + if err != nil { + t.Fatalf("failed to read HCL in davinciFlow_DeviceManagementMainFlowReorderedHCL: %v", err) + } + return fmt.Sprintf(hcl, acctest.DaVinciSandboxEnvironment(withBootstrap), resourceName) +} + +func davinciFlow_FullBasicHCL(t *testing.T, resourceName string, withBootstrap bool) string { + hcl, err := testhcl.ReadTestHcl("pingone_davinci_flow/full_basic.tf") + if err != nil { + t.Fatalf("failed to read HCL in davinciFlow_FullWithMappingIDsHCL: %v", err) + } + return fmt.Sprintf(hcl, acctest.DaVinciSandboxEnvironment(withBootstrap), resourceName) +} + +func davinciFlow_FullBasicModifyNodePropertiesHCL(t *testing.T, resourceName string, withBootstrap bool) string { + hcl, err := testhcl.ReadTestHcl("pingone_davinci_flow/full_basic_modify_node_properties.tf") + if err != nil { + t.Fatalf("failed to read HCL in davinciFlow_FullWithMappingIDsModifyNodePropertiesHCL: %v", err) + } + return fmt.Sprintf(hcl, acctest.DaVinciSandboxEnvironment(withBootstrap), resourceName) +} + +func davinciFlow_FullMinimalHCL(t *testing.T, resourceName string, withBootstrap bool) string { + descriptionHcl := ` + description = "base description" + ` + hcl, err := testhcl.ReadTestHcl("pingone_davinci_flow/full_minimal.tf") + if err != nil { + t.Fatalf("failed to read HCL in davinciFlow_MinimalWithMappingIDsHCL: %v", err) + } + return fmt.Sprintf(hcl, acctest.DaVinciSandboxEnvironment(withBootstrap), resourceName, descriptionHcl) +} + +func davinciFlow_FullMinimalUpdateHCL(t *testing.T, resourceName string, withBootstrap bool) string { + descriptionHcl := ` + description = "updated description" + ` + hcl, err := testhcl.ReadTestHcl("pingone_davinci_flow/full_minimal.tf") + if err != nil { + t.Fatalf("failed to read HCL in davinciFlow_MinimalWithMappingIDsUpdateHCL: %v", err) + } + return fmt.Sprintf(hcl, acctest.DaVinciSandboxEnvironment(withBootstrap), resourceName, descriptionHcl) +} + +func davinciFlow_FullMinimalNoDescriptionUpdateHCL(t *testing.T, resourceName string, withBootstrap bool) string { + hcl, err := testhcl.ReadTestHcl("pingone_davinci_flow/full_minimal.tf") + if err != nil { + t.Fatalf("failed to read HCL in davinciFlow_MinimalWithMappingIDsNoDescriptionUpdateHCL: %v", err) + } + // No HCL provided for description + return fmt.Sprintf(hcl, acctest.DaVinciSandboxEnvironment(withBootstrap), resourceName, "") +} + +func davinciFlow_FullMinimalWithAddedNodeHCL(t *testing.T, resourceName string, withBootstrap bool) string { + descriptionHcl := ` + description = "base description" + ` + hcl, err := testhcl.ReadTestHcl("pingone_davinci_flow/full_minimal_added_node.tf") + if err != nil { + t.Fatalf("failed to read HCL in davinciFlow_MinimalWithMappingIDsHCL: %v", err) + } + return fmt.Sprintf(hcl, acctest.DaVinciSandboxEnvironment(withBootstrap), resourceName, descriptionHcl) +} + +func davinciFlow_EmptyObjectsInSettingsHCL(t *testing.T, resourceName string, withBootstrap bool) string { + hcl, err := testhcl.ReadTestHcl("pingone_davinci_flow/full_minimal_empty_objects_in_settings.tf") + if err != nil { + t.Fatalf("failed to read HCL in davinciFlow_EmptyObjectsInSettingsHCL: %v", err) + } + return fmt.Sprintf(hcl, acctest.DaVinciSandboxEnvironment(withBootstrap), resourceName) +} + +func davinciFlow_ComplexObjectsInSettingsHCL(t *testing.T, resourceName string, withBootstrap bool) string { + hcl, err := testhcl.ReadTestHcl("pingone_davinci_flow/full_minimal_complex_objects_in_settings.tf") + if err != nil { + t.Fatalf("failed to read HCL in davinciFlow_ComplexObjectsInSettingsHCL: %v", err) + } + return fmt.Sprintf(hcl, acctest.DaVinciSandboxEnvironment(withBootstrap), resourceName) +} + +func davinciFlow_VariableRefsHCL(t *testing.T, resourceName string, withBootstrap bool) string { + hcl, err := testhcl.ReadTestHcl("pingone_davinci_flow/full_basic_with_variable_refs.tf") + if err != nil { + t.Fatalf("failed to read HCL in davinciFlow_VariableRefsHCL: %v", err) + } + return fmt.Sprintf(hcl, acctest.DaVinciSandboxEnvironment(withBootstrap), resourceName) +} + +func davinciFlow_NewEnvHCL(environmentName, licenseID, resourceName string) string { + return fmt.Sprintf(` + %[1]s + +resource "pingone_davinci_flow" "%[3]s" { + environment_id = pingone_environment.%[2]s.id + name = "%[3]s" + description = "This is a demo flow" + color = "#00FF00" + + graph_data = { + elements = { + edges = [] + nodes = [{ + data = { + id = "8bnj41592a" + node_type = "CONNECTION" + connector_id = "pingOneSSOConnector" + label = "PingOne" + status = "configured" + capability_name = "userLookup" + type = "action" + properties = jsonencode({ + "additionalUserProperties" : { + "value" : [] + }, + "username" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + }, + "population" : { + "value" : "c9f3fb3f-11e9-4eb0-b4ba-9fb7789a8418" + }, + "userIdentifierForFindUser" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 420 + y = 360 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }] + } + + data = "{}" + + box_selection_enabled = true + user_zooming_enabled = true + zooming_enabled = true + zoom = 1 + min_zoom = 0.01 + max_zoom = 10000 + pannable = true + panning_enabled = true + user_panning_enabled = true + + pan = { + x = 0 + y = 0 + } + + renderer = jsonencode({ + "name" : "null" + }) + } + + output_schema = { + output = { + type = "object", + properties = jsonencode({}), + additionalProperties = true + } + } + + trigger = { + type = "AUTHENTICATION" + } +} +`, acctestlegacysdk.MinimalSandboxEnvironment(environmentName, licenseID), environmentName, resourceName) +} + +// Validate any computed values when applying minimal HCL +func davinciFlow_CheckComputedValuesMinimal(resourceName string) resource.TestCheckFunc { + return resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.#", "1"), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "pingOneSSOConnector", + }), + resource.TestCheckResourceAttrSet(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "current_version"), + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "edges.#", "0"), + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "enabled", "true"), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "pingOneSSOConnector", + "data.name": "", + "data.id": "8bnj41592a", + }), + resource.TestMatchResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "id", verify.P1DVResourceIDRegexp), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "input_schema.*", map[string]string{ + "description": "A string that specifies an identifier to pre-fill the username field of a sign-on screen.", + "is_expanded": "true", + "preferred_control_type": "textField", + "preferred_data_type": "string", + "property_name": "loginHint", + "required": "false", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "input_schema.*", map[string]string{ + "description": "An integer that specifies the maximum amount of time allowed (in seconds) since the user last authenticated. If the user's last sign on in the session is greater than the integer value specified in this property, then existing session information cannot be used to skip authentication or influence any authentication logic. This value is set automatically to 0 if prompt=login is set for an OIDC application or if ForceAuthn=true is set for a SAML application. Otherwise, this value is set to the max_age property value for OIDC applications, if present, or omitted otherwise.", + "is_expanded": "true", + "preferred_control_type": "textField", + "preferred_data_type": "number", + "property_name": "maxSecondsSinceLastSignOn", + "required": "false", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "input_schema.*", map[string]string{ + "description": "An object that specifies all the parameters from the OIDC authorization request.", + "is_expanded": "true", + "preferred_control_type": "textField", + "preferred_data_type": "object", + "property_name": "authorizationRequest", + "required": "false", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "input_schema.*", map[string]string{ + "description": "An object that specifies all the parameters from the SAML request.", + "is_expanded": "true", + "preferred_control_type": "textField", + "preferred_data_type": "object", + "property_name": "samlRequest", + "required": "false", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "input_schema.*", map[string]string{ + "description": "An object that specifies all the parameters from the WS-FED request.", + "is_expanded": "true", + "preferred_control_type": "textField", + "preferred_data_type": "object", + "property_name": "wsFedRequest", + "required": "false", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "input_schema.*", map[string]string{ + "description": "An object that specifies the configuration information about the PingOne application that initiated the authentication request.", + "is_expanded": "true", + "preferred_control_type": "textField", + "preferred_data_type": "object", + "property_name": "application", + "required": "true", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "input_schema.*", map[string]string{ + "description": "Internal information that is only useful to P1. This is meant to be opaque and may be changed or removed in the future.", + "is_expanded": "true", + "preferred_control_type": "textField", + "preferred_data_type": "object", + "property_name": "relayState", + "required": "true", + }), + resource.TestCheckNoResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "published_version"), + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "settings.log_level", "4"), + ) +} + +// Validate any computed values when applying complete HCL +func davinciFlow_CheckComputedValuesComplete(resourceName string) resource.TestCheckFunc { + return resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.#", "7"), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "annotationConnector", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "flowConnector", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "functionsConnector", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "httpConnector", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "nodeConnector", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "pingOneMfaConnector", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "pingOneSSOConnector", + }), + resource.TestCheckResourceAttrSet(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "current_version"), + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "enabled", "true"), + resource.TestMatchResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "id", verify.P1DVResourceIDRegexp), + resource.TestCheckNoResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "published_version"), + ) +} + +func davinciFlow_CheckComputedValuesFullMinimal(resourceName string) resource.TestCheckFunc { + return resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.#", "1"), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "errorConnector", + }), + resource.TestCheckResourceAttrSet(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "current_version"), + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "enabled", "true"), + resource.TestMatchResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "id", verify.P1DVResourceIDRegexp), + resource.TestCheckNoResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "input_schema"), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "errorConnector", + "data.name": "", + "data.id": "2pzouq7el7", + }), + resource.TestCheckNoResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "published_version"), + ) +} + +func davinciFlow_CheckComputedValuesFullMinimalAddedNode(resourceName string) resource.TestCheckFunc { + return resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.#", "1"), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "errorConnector", + }), + resource.TestCheckResourceAttrSet(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "current_version"), + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "enabled", "true"), + resource.TestMatchResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "id", verify.P1DVResourceIDRegexp), + resource.TestCheckNoResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "input_schema"), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "errorConnector", + "data.name": "", + "data.id": "2pzouq7el7", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "errorConnector", + "data.name": "", + "data.id": "123456", + }), + resource.TestCheckNoResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "published_version"), + ) +} + +func davinciFlow_CheckComputedValuesFullBasic(resourceName string) resource.TestCheckFunc { + return resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.#", "5"), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "errorConnector", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "flowConnector", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "functionsConnector", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "httpConnector", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "variablesConnector", + }), + resource.TestCheckResourceAttrSet(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "current_version"), + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "enabled", "true"), + resource.TestMatchResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "id", verify.P1DVResourceIDRegexp), + resource.TestCheckNoResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "input_schema"), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "functionsConnector", + "data.name": fmt.Sprintf("%s-functions", resourceName), + "data.id": "nx0o1b2cmw", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "httpConnector", + "data.name": fmt.Sprintf("%s-http", resourceName), + "data.id": "ikt13crnhy", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "errorConnector", + "data.name": "", + "data.id": "vsp1ewtr9m", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "httpConnector", + "data.name": fmt.Sprintf("%s-http", resourceName), + "data.id": "1u2m5vzr49", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "variablesConnector", + "data.name": fmt.Sprintf("%s-variables", resourceName), + "data.id": "3zvjdgdljx", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "flowConnector", + "data.name": fmt.Sprintf("%s-flow", resourceName), + "data.id": "kq5ybvwvro", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "flowConnector", + "data.name": fmt.Sprintf("%s-flow", resourceName), + "data.id": "xb74p6rkd8", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.name": "", + "data.id": "8fvg7tfr8j", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.name": "", + "data.id": "bbemfztdyk", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.name": "", + "data.id": "cdcw8k7dnx", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.name": "", + "data.id": "j74pmg6577", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.name": "", + "data.id": "pensvkew7y", + }), + resource.TestCheckNoResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "published_version"), + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "settings.log_level", "4"), + ) +} + +func davinciFlow_CheckComputedValuesFullBasicWithVariableRefs(resourceName string) resource.TestCheckFunc { + return resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.#", "5"), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "errorConnector", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "flowConnector", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "functionsConnector", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "httpConnector", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "connectors.*", map[string]string{ + "id": "variablesConnector", + }), + resource.TestCheckResourceAttrSet(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "current_version"), + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "enabled", "true"), + resource.TestMatchResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "id", verify.P1DVResourceIDRegexp), + resource.TestCheckNoResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "input_schema"), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "functionsConnector", + "data.name": fmt.Sprintf("%s-functions", resourceName), + "data.id": "nx0o1b2cmw", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "httpConnector", + "data.name": fmt.Sprintf("%s-http", resourceName), + "data.id": "ikt13crnhy", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "errorConnector", + "data.name": fmt.Sprintf("%s-error", resourceName), + "data.id": "vsp1ewtr9m", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "httpConnector", + "data.name": fmt.Sprintf("%s-http", resourceName), + "data.id": "1u2m5vzr49", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "variablesConnector", + "data.name": fmt.Sprintf("%s-variables", resourceName), + "data.id": "3zvjdgdljx", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "flowConnector", + "data.name": fmt.Sprintf("%s-flow", resourceName), + "data.id": "kq5ybvwvro", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "flowConnector", + "data.name": fmt.Sprintf("%s-flow", resourceName), + "data.id": "xb74p6rkd8", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.name": "", + "data.id": "8fvg7tfr8j", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.name": "", + "data.id": "bbemfztdyk", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.name": "", + "data.id": "cdcw8k7dnx", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.name": "", + "data.id": "j74pmg6577", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.name": "", + "data.id": "pensvkew7y", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "variablesConnector", + "data.name": fmt.Sprintf("%s-variables", resourceName), + "data.id": "0cj7n971ix", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.name": "", + "data.id": "esg7oyahen", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.connector_id": "variablesConnector", + "data.name": fmt.Sprintf("%s-variables", resourceName), + "data.id": "j3j8fmgc9q", + }), + resource.TestCheckTypeSetElemNestedAttrs(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "graph_data.elements.nodes.*", map[string]string{ + "data.name": "", + "data.id": "1uu35lv024", + }), + resource.TestCheckNoResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "published_version"), + resource.TestCheckResourceAttr(fmt.Sprintf("pingone_davinci_flow.%s", resourceName), "settings.log_level", "4"), + ) +} + +func davinciFlow_GetIDs(resourceName string, environmentId, id *string) resource.TestCheckFunc { + return func(s *terraform.State) error { + + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("Resource Not found: %s", resourceName) + } + if environmentId != nil { + *environmentId = rs.Primary.Attributes["environment_id"] + } + if id != nil { + *id = rs.Primary.Attributes["id"] + } + + return nil + } +} + +// Delete the resource +func davinciFlow_Delete(ctx context.Context, apiClient *pingone.APIClient, t *testing.T, environmentId, id string) { + if environmentId == "" || id == "" { + t.Fatalf("One of the identifier attributes can't be determined. environmentId: '%s' id: '%s'", environmentId, id) + } + + _, err := apiClient.DaVinciFlowsApi.DeleteFlowById(ctx, uuid.MustParse(environmentId), id).Execute() + if err != nil { + t.Fatalf("Failed to delete davinci_flow: %v", err) + } +} + +// Test that any objects created by the test are destroyed +func davinciFlow_CheckDestroy(s *terraform.State) error { + var ctx = context.Background() + + p1Client, err := acctest.TestClient(ctx) + + if err != nil { + return err + } + + for _, rs := range s.RootModule().Resources { + if rs.Type != "pingone_davinci_flow" { + continue + } + shouldContinue, err := acctest.CheckParentEnvironmentDestroy(ctx, p1Client, rs.Primary.Attributes["environment_id"]) + if err != nil { + return err + } + + if shouldContinue { + continue + } + + _, r, err := p1Client.DaVinciFlowsApi.GetFlowById(ctx, uuid.MustParse(rs.Primary.Attributes["environment_id"]), rs.Primary.Attributes["id"]).Execute() + + shouldContinue, err = acctest.CheckForResourceDestroy(r, err) + if err != nil { + return err + } + + if shouldContinue { + continue + } + + return fmt.Errorf("PingOne davinci_flow Instance %s still exists", rs.Primary.ID) + } + + return nil +} diff --git a/internal/service/davinci/resource_davinci_variable_gen.go b/internal/service/davinci/resource_davinci_variable_gen.go index e6e2ac416..4bc5ea6f2 100644 --- a/internal/service/davinci/resource_davinci_variable_gen.go +++ b/internal/service/davinci/resource_davinci_variable_gen.go @@ -551,7 +551,7 @@ func (r *davinciVariableResource) Create(ctx context.Context, req resource.Creat }, "CreateVariable", framework.DefaultCustomError, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) @@ -616,7 +616,7 @@ func (r *davinciVariableResource) Read(ctx context.Context, req resource.ReadReq }, "GetVariableById", framework.CustomErrorResourceNotFoundWarning, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) @@ -693,7 +693,7 @@ func (r *davinciVariableResource) Update(ctx context.Context, req resource.Updat }, "ReplaceVariableById", framework.DefaultCustomError, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, &responseData, )...) @@ -757,7 +757,7 @@ func (r *davinciVariableResource) Delete(ctx context.Context, req resource.Delet }, "DeleteVariableById", framework.CustomErrorResourceNotFoundWarning, - framework.DefaultRetryable, + framework.InsufficientPrivilegeRetryable, nil, )...) } diff --git a/internal/service/davinci/resource_davinci_variable_gen_test.go b/internal/service/davinci/resource_davinci_variable_gen_test.go index 7b2bf357a..a1ccb3002 100644 --- a/internal/service/davinci/resource_davinci_variable_gen_test.go +++ b/internal/service/davinci/resource_davinci_variable_gen_test.go @@ -309,7 +309,6 @@ func TestAccDavinciVariable_FlowContextWithBootstrap(t *testing.T) { } func testAccDavinciVariable_FlowContext(t *testing.T, withBootstrapConfig bool) { - t.Skip("Skipping TestAccDavinciVariable_FlowContext until pingone_davinci_flow is available for use in tests") t.Parallel() resourceName := acctest.ResourceNameGen() @@ -474,19 +473,108 @@ resource "pingone_davinci_variable" "%[2]s" { } // Maximal HCL with all values set where possible -// TODO test with flow id once we have API/resource available - see TestAccDavinciVariable_FlowContext func davinciVariable_CompleteHCL(resourceName string) string { return fmt.Sprintf(` %[1]s +resource "pingone_davinci_flow" "%[2]s" { + environment_id = data.pingone_environment.general_test.id + name = "%[2]s" + description = "This is a demo flow" + color = "#00FF00" + + graph_data = { + elements = { + edges = [] + nodes = [{ + data = { + id = "8bnj41592a" + node_type = "CONNECTION" + connector_id = "pingOneSSOConnector" + label = "PingOne" + status = "configured" + capability_name = "userLookup" + type = "action" + properties = jsonencode({ + "additionalUserProperties" : { + "value" : [] + }, + "username" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + }, + "population" : { + "value" : "c9f3fb3f-11e9-4eb0-b4ba-9fb7789a8418" + }, + "userIdentifierForFindUser" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 420 + y = 360 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }] + } + + data = "{}" + + box_selection_enabled = true + user_zooming_enabled = true + zooming_enabled = true + zoom = 1 + min_zoom = 0.01 + max_zoom = 10000 + pannable = true + panning_enabled = true + user_panning_enabled = true + + pan = { + x = 0 + y = 0 + } + + renderer = jsonencode({ + "name" : "null" + }) + } + + settings = { + csp = "worker-src 'self' blob:; script-src 'self' https://cdn.jsdelivr.net https://code.jquery.com https://devsdk.singularkey.com http://cdnjs.cloudflare.com 'unsafe-inline' 'unsafe-eval';" + intermediate_loading_screen_css = "" + intermediate_loading_screen_html = "" + log_level = 2 + } + + output_schema = { + output = { + type = "object", + properties = jsonencode({}), + additionalProperties = true + } + } + + trigger = { + type = "AUTHENTICATION" + } +} + resource "pingone_davinci_variable" "%[2]s" { environment_id = data.pingone_environment.general_test.id - context = "flowInstance" + context = "flow" data_type = "object" display_name = "myobj" - // flow = { - // id = //TODO - // } + flow = { + id = pingone_davinci_flow.%[2]s.id + } max = 200 min = 0 mutable = false @@ -619,13 +707,106 @@ func davinciVariable_FlowContextHCL(resourceName string, withBootstrapConfig boo return fmt.Sprintf(` %[1]s +resource "pingone_davinci_flow" "%[2]s" { + environment_id = data.pingone_environment.general_test.id + name = "%[2]s" + description = "This is a demo flow" + color = "#00FF00" + + graph_data = { + elements = { + edges = [] + nodes = [{ + data = { + id = "8bnj41592a" + node_type = "CONNECTION" + connector_id = "pingOneSSOConnector" + label = "PingOne" + status = "configured" + capability_name = "userLookup" + type = "action" + properties = jsonencode({ + "additionalUserProperties" : { + "value" : [] + }, + "username" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + }, + "population" : { + "value" : "c9f3fb3f-11e9-4eb0-b4ba-9fb7789a8418" + }, + "userIdentifierForFindUser" : { + "value" : "[\n {\n \"children\": [\n {\n \"text\": \"5282e30d-6e05-499c-ae68-0069fba776f1\"\n }\n ]\n }\n]" + } + }) + } + position = { + x = 420 + y = 360 + } + group = "nodes" + removed = false + selected = false + selectable = true + locked = false + grabbable = true + pannable = false + classes = "" + }] + } + + data = "{}" + + box_selection_enabled = true + user_zooming_enabled = true + zooming_enabled = true + zoom = 1 + min_zoom = 0.01 + max_zoom = 10000 + pannable = true + panning_enabled = true + user_panning_enabled = true + + pan = { + x = 0 + y = 0 + } + + renderer = jsonencode({ + "name" : "null" + }) + } + + settings = { + csp = "worker-src 'self' blob:; script-src 'self' https://cdn.jsdelivr.net https://code.jquery.com https://devsdk.singularkey.com http://cdnjs.cloudflare.com 'unsafe-inline' 'unsafe-eval';" + intermediate_loading_screen_css = "" + intermediate_loading_screen_html = "" + log_level = 2 + } + + output_schema = { + output = { + type = "object", + properties = jsonencode({}), + additionalProperties = true + } + } + + trigger = { + type = "AUTHENTICATION" + } +} + resource "pingone_davinci_variable" "%[2]s" { environment_id = data.pingone_environment.general_test.id context = "flow" data_type = "string" display_name = "Flow Variable Display" - mutable = false - name = "%[2]s" + flow = { + id = pingone_davinci_flow.%[2]s.id + } + mutable = false + name = "%[2]s" value = { string = "flow-test-value" } diff --git a/internal/service/davinci/service_beta.go b/internal/service/davinci/service_beta.go index 815c1980c..583667067 100644 --- a/internal/service/davinci/service_beta.go +++ b/internal/service/davinci/service_beta.go @@ -16,6 +16,7 @@ func BetaResources() []func() resource.Resource { NewDavinciApplicationResource, NewDavinciApplicationSecretResource, NewDavinciConnectorInstanceResource, + NewDavinciFlowResource, NewDavinciVariableResource, } }