-
Notifications
You must be signed in to change notification settings - Fork 7
pingone_davinci_application_secret and pingone_davinci_application_key beta resources
#1173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: DavinciApplicationFlowPolicyResource
Are you sure you want to change the base?
Conversation
…cationKeyAndSecretResources
…cationKeyAndSecretResources
…cationKeyAndSecretResources
|
@henryrecker-pingidentity I see the test results have failures due to new environment race conditions - are these now resolved and the test results are out of date? |
patrickcping
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of minor points, then LGTM 🚀 🚀
|
|
||
| type davinciApplicationKeyResourceModel struct { | ||
| ApiKey types.Object `tfsdk:"api_key"` | ||
| ApplicationId types.String `tfsdk:"application_id"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we refer to this as davinci_application_id in the flow policy resource so we have an inconsistency - just checking this and the flow policy attribute that represents the same ID value are inconsistent in the API and it's not something we've introduced?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't really have a "name" in the API since it is used as part of the path, rather than in any json body. In the generator I generate these IDs based on the last word only + "_id", which is why this ends up as "application_id". The docs do refer to this as davinciApplicationID though.
| objectplanmodifier.UseStateForUnknown(), | ||
| }, | ||
| }, | ||
| "application_id": schema.StringAttribute{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a custom type for DV IDs
| stringplanmodifier.RequiresReplace(), | ||
| }, | ||
| }, | ||
| "environment_id": schema.StringAttribute{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is framework.Attr_LinkID for consistency
| 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{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is framework.Attr_ID for consistency
| }, | ||
| "RotateDavinciApplicationApiKey", | ||
| framework.DefaultCustomError, | ||
| framework.DefaultRetryable, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DefaultCreateRead..
Change Description
Add beta resources
pingone_davinci_application_secretandpingone_davinci_application_keyChange Characteristics
Checklist
All full (or complete) PRs that need review prior to merge should have the following box checked.
If contributing a partial or incomplete change (expecting the development team to complete the remaining work) please leave the box unchecked
Required SDK Upgrades
Testing
This PR has been tested with:
Shell Command(s)
Testing Results
Some failures due to typical access failed issues with davinci in tests that create new environments
Expand Results
=== RUN TestAccDavinciApplicationSecret_RemovalDrift === PAUSE TestAccDavinciApplicationSecret_RemovalDrift === RUN TestAccDavinciApplicationSecret_Rotate === PAUSE TestAccDavinciApplicationSecret_Rotate === RUN TestAccDavinciApplicationSecret_NewEnv === PAUSE TestAccDavinciApplicationSecret_NewEnv === RUN TestAccDavinciApplicationSecret_BadParameters === PAUSE TestAccDavinciApplicationSecret_BadParameters === CONT TestAccDavinciApplicationSecret_RemovalDrift === CONT TestAccDavinciApplicationSecret_NewEnv === CONT TestAccDavinciApplicationSecret_Rotate === CONT TestAccDavinciApplicationSecret_BadParameters --- PASS: TestAccDavinciApplicationSecret_BadParameters (10.94s) --- PASS: TestAccDavinciApplicationSecret_Rotate (26.55s) === NAME TestAccDavinciApplicationSecret_NewEnv resource_davinci_application_secret_test.go:170: Step 1/1 error: Error running apply: exit status 1 Error: Error when calling `RotateDavinciApplicationSecret`: The request could not be completed. You do not have access to this resource. with pingone_davinci_application_secret.qxmnfoozry, on terraform_plugin_test.tf line 55, in resource "pingone_davinci_application_secret" "qxmnfoozry": 55: resource "pingone_davinci_application_secret" "qxmnfoozry" { PingOne Error Details: Code: ACCESS_FAILED Message: The request could not be completed. You do not have access to this resource. --- FAIL: TestAccDavinciApplicationSecret_NewEnv (38.13s) --- PASS: TestAccDavinciApplicationSecret_RemovalDrift (76.68s) FAIL FAIL github.com/pingidentity/terraform-provider-pingone/internal/service/davinci 77.165s FAIL === RUN TestAccDavinciApplicationKey_RemovalDrift === PAUSE TestAccDavinciApplicationKey_RemovalDrift === RUN TestAccDavinciApplicationKey_Rotate === PAUSE TestAccDavinciApplicationKey_Rotate === RUN TestAccDavinciApplicationKey_NewEnv === PAUSE TestAccDavinciApplicationKey_NewEnv === RUN TestAccDavinciApplicationKey_BadParameters === PAUSE TestAccDavinciApplicationKey_BadParameters === CONT TestAccDavinciApplicationKey_RemovalDrift === CONT TestAccDavinciApplicationKey_NewEnv === CONT TestAccDavinciApplicationKey_BadParameters === CONT TestAccDavinciApplicationKey_Rotate --- PASS: TestAccDavinciApplicationKey_BadParameters (10.45s) --- PASS: TestAccDavinciApplicationKey_Rotate (26.18s) --- PASS: TestAccDavinciApplicationKey_NewEnv (42.52s) === NAME TestAccDavinciApplicationKey_RemovalDrift resource_davinci_application_key_test.go:42: Step 3/4 error: Error running post-apply refresh plan: exit status 1 Error: Error when calling `GetDavinciApplicationById`: The request could not be completed. You do not have access to this resource. with pingone_davinci_application.qckajsgjcc, on terraform_plugin_test.tf line 50, in resource "pingone_davinci_application" "qckajsgjcc": 50: resource "pingone_davinci_application" "qckajsgjcc" { PingOne Error Details: Code: ACCESS_FAILED Message: The request could not be completed. You do not have access to this resource. --- FAIL: TestAccDavinciApplicationKey_RemovalDrift (48.87s) FAIL FAIL github.com/pingidentity/terraform-provider-pingone/internal/service/davinci 49.378s FAILEnd-to-end Tests Workflow Links