Skip to content

Commit 61a1369

Browse files
new-resource: google_vertex_ai_cache_config (#15157)
1 parent 006dfbb commit 61a1369

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Copyright 2025 Google Inc.
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
#
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
14+
---
15+
name: 'CacheConfig'
16+
description: |-
17+
Config of GenAI caching features. This is a singleton resource.
18+
references:
19+
guides:
20+
'Official Documentation': 'https://cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/Shared.Types/CacheConfig'
21+
api: 'https://cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1/projects/updateCacheConfig'
22+
docs:
23+
import_format:
24+
- 'projects/{{project}}/cacheConfig'
25+
base_url: 'projects/{{project}}/cacheConfig'
26+
self_link: 'projects/{{project}}/cacheConfig'
27+
examples:
28+
- name: 'vertex_ai_cache_config'
29+
primary_resource_id: 'cache_config'
30+
test_env_vars:
31+
project: 'PROJECT_NAME'
32+
create_verb: 'PATCH'
33+
update_verb: 'PATCH'
34+
exclude_delete: true
35+
async:
36+
actions: ['create', 'update']
37+
type: 'OpAsync'
38+
operation:
39+
base_url: '{{op_id}}'
40+
result:
41+
resource_inside_response: true
42+
properties:
43+
- name: 'name'
44+
type: String
45+
description: |
46+
Identifier. name of the cache config. Format: - `projects/{project}/cacheConfig`.
47+
output: true
48+
- name: 'disableCache'
49+
type: Boolean
50+
description: |
51+
If set to true, disables GenAI caching. Otherwise caching is enabled.
52+
required: true
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
resource "google_vertex_ai_cache_config" "{{$.PrimaryResourceId}}" {
2+
project = "{{index $.TestEnvVars "project"}}"
3+
disable_cache = true
4+
}

0 commit comments

Comments
 (0)