Skip to content

Commit 40e33dd

Browse files
Update CES Tool fields (#15782) (#1175)
[upstream:b72afb07dbe1fcb2abbb129475024a217358a548] Signed-off-by: Modular Magician <[email protected]>
1 parent 4fff19c commit 40e33dd

File tree

2 files changed

+52
-40
lines changed
  • ces_tool_client_function_basic
  • ces_tool_google_search_tool_basic

2 files changed

+52
-40
lines changed

ces_tool_client_function_basic/main.tf

Lines changed: 50 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -15,82 +15,92 @@ resource "google_ces_tool" "ces_tool_client_function_basic" {
1515
name = "ces_tool_client_function_basic-${local.name_suffix}"
1616
description = "example-description"
1717
parameters {
18-
description = "schema description"
19-
type = "ARRAY"
20-
nullable = true
21-
required = ["some_property"]
22-
enum = ["VALUE_A", "VALUE_B"]
23-
ref = "#/defs/MyDefinition"
24-
unique_items = true
25-
defs = jsonencode({
26-
SimpleString = {
27-
type = "STRING"
28-
description = "A simple string definition"
29-
}})
18+
additional_properties = jsonencode(
19+
{
20+
type = "BOOLEAN"
21+
})
3022
any_of = jsonencode([
3123
{
3224
type = "STRING"
3325
description = "any_of option 1: string"
3426
},])
3527
default = jsonencode(
3628
false)
29+
defs = jsonencode({
30+
SimpleString = {
31+
type = "STRING"
32+
description = "A simple string definition"
33+
}})
34+
description = "schema description"
35+
enum = ["VALUE_A", "VALUE_B"]
36+
items = jsonencode({
37+
type = "ARRAY"
38+
description = "An array"
39+
})
40+
max_items = 32
41+
maximum = 64
42+
min_items = 1
43+
minimum = 2
44+
nullable = true
3745
prefix_items = jsonencode([
3846
{
3947
type = "ARRAY"
4048
description = "prefix item 1"
4149
},])
42-
additional_properties = jsonencode(
43-
{
44-
type = "BOOLEAN"
45-
})
4650
properties = jsonencode({
4751
name = {
4852
type = "STRING"
4953
description = "A name"
5054
}})
51-
items = jsonencode({
52-
type = "ARRAY"
53-
description = "An array"
54-
})
55-
}
56-
response {
57-
description = "schema description"
58-
type = "ARRAY"
59-
nullable = true
60-
required = ["some_property"]
61-
enum = ["VALUE_A", "VALUE_B"]
6255
ref = "#/defs/MyDefinition"
56+
required = ["some_property"]
57+
title = "Title"
58+
type = "ARRAY"
6359
unique_items = true
64-
defs = jsonencode({
65-
SimpleString = {
66-
type = "STRING"
67-
description = "A simple string definition"
68-
}})
60+
}
61+
response {
62+
additional_properties = jsonencode(
63+
{
64+
type = "BOOLEAN"
65+
})
6966
any_of = jsonencode([
7067
{
7168
type = "STRING"
7269
description = "any_of option 1: string"
7370
},])
7471
default = jsonencode(
7572
false)
73+
defs = jsonencode({
74+
SimpleString = {
75+
type = "STRING"
76+
description = "A simple string definition"
77+
}})
78+
description = "schema description"
79+
enum = ["VALUE_A", "VALUE_B"]
80+
items = jsonencode({
81+
type = "ARRAY"
82+
description = "An array"
83+
})
84+
max_items = 32
85+
maximum = 64
86+
min_items = 1
87+
minimum = 2
88+
nullable = true
7689
prefix_items = jsonencode([
7790
{
7891
type = "ARRAY"
7992
description = "prefix item 1"
8093
},])
81-
additional_properties = jsonencode(
82-
{
83-
type = "BOOLEAN"
84-
})
8594
properties = jsonencode({
8695
name = {
8796
type = "STRING"
8897
description = "A name"
8998
}})
90-
items = jsonencode({
91-
type = "ARRAY"
92-
description = "An array"
93-
})
99+
ref = "#/defs/MyDefinition"
100+
required = ["some_property"]
101+
title = "Title"
102+
type = "ARRAY"
103+
unique_items = true
94104
}
95105
}
96106
}

ces_tool_google_search_tool_basic/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ resource "google_ces_tool" "ces_tool_google_search_tool_basic" {
1313
execution_type = "SYNCHRONOUS"
1414
google_search_tool {
1515
name = "example-tool"
16+
context_urls = ["example.com", "example2.com"]
1617
description = "example-description"
1718
exclude_domains = ["example.com", "example2.com"]
19+
preferred_domains = ["example3.com", "example4.com"]
1820
}
1921
}

0 commit comments

Comments
 (0)