Skip to content

Conversation

@henryrecker-pingidentity
Copy link
Contributor

@henryrecker-pingidentity henryrecker-pingidentity commented Sep 23, 2025

Change Description

Adds a new beta pingone_davinci_application resource. Currently targeted at the DavinciConnectorInstanceResource branch for a cleaner diff.

Beta test run: https://github.com/pingidentity/terraform-provider-pingone/actions/runs/17957705448 - once again various intermittent access failed errors on tests with new environments.

This resource uses the apiKey.enabled field to control enabling and disabling the apiKey, instead of the actual underlying API field apiKeyEnabled that controls this. I've done it this way for an improved UX for terraform.

Required SDK Upgrades

N/A

Testing Shell Command

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

Testing Results

Expand Results
=== RUN   TestAccDavinciApplication_RemovalDrift
=== PAUSE TestAccDavinciApplication_RemovalDrift
=== RUN   TestAccDavinciApplication_MinimalMaximalClean
=== PAUSE TestAccDavinciApplication_MinimalMaximalClean
=== RUN   TestAccDavinciApplication_MinimalMaximalWithBootstrap
=== PAUSE TestAccDavinciApplication_MinimalMaximalWithBootstrap
=== RUN   TestAccDavinciApplication_NewEnv
=== PAUSE TestAccDavinciApplication_NewEnv
=== RUN   TestAccDavinciApplication_BadParameters
=== PAUSE TestAccDavinciApplication_BadParameters
=== RUN   TestAccDavinciApplication_WithOAuth
=== PAUSE TestAccDavinciApplication_WithOAuth
=== RUN   TestAccDavinciConnectorInstance_RemovalDrift
=== PAUSE TestAccDavinciConnectorInstance_RemovalDrift
=== RUN   TestAccDavinciConnectorInstance_MinimalMaximalClean
=== PAUSE TestAccDavinciConnectorInstance_MinimalMaximalClean
=== RUN   TestAccDavinciConnectorInstance_MinimalMaximalWithBootstrap
=== PAUSE TestAccDavinciConnectorInstance_MinimalMaximalWithBootstrap
=== RUN   TestAccDavinciConnectorInstance_NewEnv
=== PAUSE TestAccDavinciConnectorInstance_NewEnv
=== RUN   TestAccDavinciConnectorInstance_Properties
=== PAUSE TestAccDavinciConnectorInstance_Properties
=== RUN   TestAccDavinciConnectorInstance_ComplexProperties
=== PAUSE TestAccDavinciConnectorInstance_ComplexProperties
=== RUN   TestAccDavinciConnectorInstance_BadParameters
=== PAUSE TestAccDavinciConnectorInstance_BadParameters
=== RUN   TestAccDavinciVariable_RemovalDrift
=== PAUSE TestAccDavinciVariable_RemovalDrift
=== RUN   TestAccDavinciVariable_MinimalMaximal
=== PAUSE TestAccDavinciVariable_MinimalMaximal
=== RUN   TestAccDavinciVariable_Boolean
=== PAUSE TestAccDavinciVariable_Boolean
=== RUN   TestAccDavinciVariable_Number
=== PAUSE TestAccDavinciVariable_Number
=== RUN   TestAccDavinciVariable_Secret
=== PAUSE TestAccDavinciVariable_Secret
=== RUN   TestAccDavinciVariable_ChangeDataType
=== PAUSE TestAccDavinciVariable_ChangeDataType
=== RUN   TestAccDavinciVariable_UserContextClean
=== PAUSE TestAccDavinciVariable_UserContextClean
=== RUN   TestAccDavinciVariable_UserContextWithBootstrap
=== PAUSE TestAccDavinciVariable_UserContextWithBootstrap
=== RUN   TestAccDavinciVariable_FlowContextClean
    resource_davinci_variable_gen_test.go:312: Skipping TestAccDavinciVariable_FlowContext until pingone_davinci_flow is available for use in tests
--- SKIP: TestAccDavinciVariable_FlowContextClean (0.00s)
=== RUN   TestAccDavinciVariable_FlowContextWithBootstrap
    resource_davinci_variable_gen_test.go:312: Skipping TestAccDavinciVariable_FlowContext until pingone_davinci_flow is available for use in tests
--- SKIP: TestAccDavinciVariable_FlowContextWithBootstrap (0.00s)
=== RUN   TestAccDavinciVariable_SecretValueTypesClean
=== PAUSE TestAccDavinciVariable_SecretValueTypesClean
=== RUN   TestAccDavinciVariable_SecretValueTypesWithBootstrap
=== PAUSE TestAccDavinciVariable_SecretValueTypesWithBootstrap
=== RUN   TestAccDavinciVariable_NewEnv
=== PAUSE TestAccDavinciVariable_NewEnv
=== RUN   TestAccDavinciVariable_BadParameters
=== PAUSE TestAccDavinciVariable_BadParameters
=== CONT  TestAccDavinciApplication_RemovalDrift
=== CONT  TestAccDavinciVariable_RemovalDrift
=== CONT  TestAccDavinciVariable_UserContextClean
=== CONT  TestAccDavinciConnectorInstance_MinimalMaximalClean
=== CONT  TestAccDavinciConnectorInstance_Properties
=== CONT  TestAccDavinciConnectorInstance_BadParameters
=== CONT  TestAccDavinciApplication_BadParameters
=== CONT  TestAccDavinciConnectorInstance_ComplexProperties
=== CONT  TestAccDavinciApplication_NewEnv
=== CONT  TestAccDavinciApplication_MinimalMaximalWithBootstrap
=== CONT  TestAccDavinciVariable_SecretValueTypesWithBootstrap
=== CONT  TestAccDavinciVariable_BadParameters
=== CONT  TestAccDavinciApplication_MinimalMaximalClean
=== CONT  TestAccDavinciVariable_NewEnv
=== CONT  TestAccDavinciVariable_ChangeDataType
=== CONT  TestAccDavinciVariable_Secret
--- PASS: TestAccDavinciVariable_Secret (4.32s)
=== CONT  TestAccDavinciVariable_Boolean
--- PASS: TestAccDavinciApplication_BadParameters (6.02s)
=== CONT  TestAccDavinciVariable_SecretValueTypesClean
--- PASS: TestAccDavinciConnectorInstance_BadParameters (6.12s)
=== CONT  TestAccDavinciVariable_MinimalMaximal
--- PASS: TestAccDavinciVariable_BadParameters (6.22s)
=== CONT  TestAccDavinciConnectorInstance_RemovalDrift
--- PASS: TestAccDavinciVariable_UserContextClean (7.01s)
=== CONT  TestAccDavinciVariable_UserContextWithBootstrap
--- PASS: TestAccDavinciVariable_Boolean (3.70s)
=== CONT  TestAccDavinciConnectorInstance_NewEnv
--- PASS: TestAccDavinciVariable_SecretValueTypesWithBootstrap (10.16s)
=== CONT  TestAccDavinciConnectorInstance_MinimalMaximalWithBootstrap
--- PASS: TestAccDavinciVariable_ChangeDataType (10.35s)
=== CONT  TestAccDavinciApplication_WithOAuth
--- PASS: TestAccDavinciVariable_UserContextWithBootstrap (6.19s)
=== CONT  TestAccDavinciVariable_Number
--- PASS: TestAccDavinciConnectorInstance_Properties (15.01s)
--- PASS: TestAccDavinciConnectorInstance_MinimalMaximalClean (16.14s)
--- PASS: TestAccDavinciVariable_Number (3.66s)
--- PASS: TestAccDavinciApplication_MinimalMaximalWithBootstrap (17.78s)
--- PASS: TestAccDavinciVariable_SecretValueTypesClean (11.87s)
--- PASS: TestAccDavinciApplication_MinimalMaximalClean (18.37s)
--- PASS: TestAccDavinciVariable_MinimalMaximal (16.89s)
--- PASS: TestAccDavinciConnectorInstance_MinimalMaximalWithBootstrap (16.85s)
--- PASS: TestAccDavinciApplication_WithOAuth (22.54s)
--- PASS: TestAccDavinciConnectorInstance_ComplexProperties (36.69s)
--- PASS: TestAccDavinciApplication_NewEnv (39.83s)
--- PASS: TestAccDavinciVariable_NewEnv (39.98s)
--- PASS: TestAccDavinciConnectorInstance_NewEnv (40.73s)
--- PASS: TestAccDavinciApplication_RemovalDrift (70.45s)
--- PASS: TestAccDavinciVariable_RemovalDrift (72.30s)
--- PASS: TestAccDavinciConnectorInstance_RemovalDrift (70.17s)
PASS
ok  	github.com/pingidentity/terraform-provider-pingone/internal/service/davinci	76.793s

@henryrecker-pingidentity henryrecker-pingidentity requested a review from a team as a code owner September 23, 2025 19:55
@henryrecker-pingidentity henryrecker-pingidentity requested a review from a team as a code owner December 1, 2025 20:47
Base automatically changed from DavinciConnectorInstanceResource to main December 9, 2025 20:40
Copy link
Collaborator

@patrickcping patrickcping left a comment

Choose a reason for hiding this comment

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

A few minor points but LGTM 🚀 🚀

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

Choose a reason for hiding this comment

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

Should be DefaultCreateReadRetryable (at least until we make a provider-wide effort to remove it)

Optional: true,
Default: objectdefault.StaticValue(apiKeyDefault),
},
"environment_id": schema.StringAttribute{
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have framework.Attr_LinkID to make this universally consistent

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

Choose a reason for hiding this comment

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

We have framework.Attr_ID() to make this universally consistent

ElementType: types.StringType,
Optional: true,
Computed: true,
Description: "Options are \"authorizationCode\", \"clientCredentials\", \"implicit\".",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this meant to come from an enum?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is generated from the provider spec.

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

Choose a reason for hiding this comment

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

Probably should be DefaultCreateReadRetryable until we make a provider-wide effort to remove it

"implicit",
]
logout_uris = [
"https://example.com/logout",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use pingidentity.com or ping-eng.com as we don't own the example.com domain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants