feat: add deletion_policy field to reasoning engine resource#16744
feat: add deletion_policy field to reasoning engine resource#16744slevenick merged 2 commits intoGoogleCloudPlatform:mainfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Googlers: For automatic test runs see go/terraform-auto-test-runs. @slevenick, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
|
Related issue: hashicorp/terraform-provider-google#26443 |
| external_providers: ["time"] | ||
| ignore_read_extra: | ||
| - 'force_destroy' | ||
| virtual_fields: |
There was a problem hiding this comment.
What the internal Magic Modules documentation says (mmv1/api/resource.go):
Virtual fields are similar to url_param_only fields in that they create a schema entry
which is not read from or submitted to the API.
However virtual fields are meant to provide toggles for Terraform-specific behavior
in a resource (eg: delete_contents_on_destroy) whereas url_param_only fields
should be used for url construction (like region or location).
So we should probably go with virtual field per my understanding, but not sure actually
There was a problem hiding this comment.
Ok this makes sense as written but I'm going to ask you to change some things to match an upcoming pattern that we are adding to the provider. Here's what needs to change:
- Change the name of the field to
deletion_policy - Change the type to an enum with a single value of
FORCE - Add a custom pre_delete for this resource that checks if the enum is set to FORCE and if so, adds the force query parameter to the deletion URL
This will allow us to add standardized support for the other deletion_policy possibilities in the future
df14a69 to
61ccc87
Compare
Nice, thanks! Changes applied :) cc @slevenick |
|
Are you able to sign the CLA? |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_vertex_ai_reasoning_engine" "primary" {
deletion_policy = # value needed
}
|
Tests analyticsTotal tests: 85 Click here to see the affected service packages
🟢 All tests passed! View the build log |
slevenick
left a comment
There was a problem hiding this comment.
Thanks for the changes, this looks good. Can you add a test that sets this?
61ccc87 to
797188a
Compare
797188a to
f78985f
Compare
f78985f to
a79d82e
Compare
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 86 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
2d9078f
Release Note Template for Downstream PRs (will be copied)
See Write release notes for guidance.