...
1/**
2 * Copyright 2022 Google LLC
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17```hcl
18resource "google_dialogflow_cx_agent" "agent" {
19 display_name = "dialogflowcx-agent"
20 location = "global"
21 default_language_code = "en"
22 supported_language_codes = ["fr","de","es"]
23 time_zone = "America/New_York"
24 description = "Example description."
25 avatar_uri = "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png"
26 enable_stackdriver_logging = true
27 enable_spell_correction = true
28 speech_to_text_settings {
29 enable_speech_adaptation = true
30 }
31}
32
33
34resource "google_dialogflow_cx_intent" "basic_intent" {
35 parent = google_dialogflow_cx_agent.agent.id
36 display_name = "Example"
37 priority = 1
38 description = "Intent example"
39 training_phrases {
40 parts {
41 text = "training"
42 }
43
44 parts {
45 text = "phrase"
46 }
47
48 parts {
49 text = "example"
50 }
51
52 repeat_count = 1
53 }
54
55 parameters {
56 id = "param1"
57 entity_type = "projects/-/locations/-/agents/-/entityTypes/sys.date"
58 }
59
60 labels = {
61 label1 = "value1",
62 label2 = "value2"
63 }
64}
65```
View as plain text