-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make google_notebooks_instance metadata field updatable (#7945)
* Added update tests proving that metadata is not updatable * Test fixes * Made notebooks instance metadata field updatable * Added metadata to ImportStateVerifyIgnore for impacted tests * Removed non-updatable fields from update test * Temporarily made metadata field not updatable to prove that only these changes are required to make the tests pass * Revert "Temporarily made metadata field not updatable to prove that only these changes are required to make the tests pass" This reverts commit f22a9e4.
- Loading branch information
Showing
3 changed files
with
40 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
mmv1/templates/terraform/update_encoder/notebooks_instance.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Update requests use "items" as the api name instead of "metadata" | ||
// https://cloud.google.com/vertex-ai/docs/workbench/reference/rest/v1/projects.locations.instances/updateMetadataItems | ||
if metadata, ok := obj["metadata"]; ok { | ||
obj["items"] = metadata | ||
delete(obj, "metadata") | ||
} | ||
return obj, nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters