Skip to content

Commit

Permalink
Adding settings to Dialogflow CX resources (#9078) (#577)
Browse files Browse the repository at this point in the history
[upstream:465cfd537dbbb13854796e5954994c4c4a3c92e6]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Oct 19, 2023
1 parent 1914fbc commit 43ca508
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 18 deletions.
45 changes: 42 additions & 3 deletions dialogflowcx_agent_full/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
resource "google_storage_bucket" "bucket" {
name = "dialogflowcx-bucket-${local.name_suffix}"
location = "US"
uniform_bucket_level_access = true
}

resource "google_dialogflow_cx_agent" "full_agent" {
display_name = "dialogflowcx-agent-${local.name_suffix}"
location = "global"
Expand All @@ -8,7 +14,40 @@ resource "google_dialogflow_cx_agent" "full_agent" {
avatar_uri = "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png"
enable_stackdriver_logging = true
enable_spell_correction = true
speech_to_text_settings {
enable_speech_adaptation = true
}
speech_to_text_settings {
enable_speech_adaptation = true
}
advanced_settings {
audio_export_gcs_destination {
uri = "${google_storage_bucket.bucket.url}/prefix-"
}
dtmf_settings {
enabled = true
max_digits = 1
finish_digit = "#"
}
}
git_integration_settings {
github_settings {
display_name = "Github Repo"
repository_uri = "https://api.github.com/repos/githubtraining/hellogitworld"
tracking_branch = "main"
access_token = "secret-token"
branches = ["main"]
}
}
text_to_speech_settings {
synthesize_speech_configs = jsonencode({
en = {
voice = {
name = "en-US-Neural2-A"
}
}
fr = {
voice = {
name = "fr-CA-Neural2-A",
}
}
})
}
}
6 changes: 3 additions & 3 deletions dialogflowcx_entity_type_full/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ resource "google_dialogflow_cx_agent" "agent" {
avatar_uri = "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png"
enable_stackdriver_logging = true
enable_spell_correction = true
speech_to_text_settings {
enable_speech_adaptation = true
}
speech_to_text_settings {
enable_speech_adaptation = true
}
}


Expand Down
6 changes: 3 additions & 3 deletions dialogflowcx_environment_full/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ resource "google_dialogflow_cx_agent" "agent" {
avatar_uri = "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png"
enable_stackdriver_logging = true
enable_spell_correction = true
speech_to_text_settings {
enable_speech_adaptation = true
}
speech_to_text_settings {
enable_speech_adaptation = true
}
}

resource "google_dialogflow_cx_version" "version_1" {
Expand Down
17 changes: 17 additions & 0 deletions dialogflowcx_flow_full/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ resource "google_dialogflow_cx_agent" "agent" {
}
}

resource "google_storage_bucket" "bucket" {
name = "dialogflowcx-bucket-${local.name_suffix}"
location = "US"
uniform_bucket_level_access = true
}


resource "google_dialogflow_cx_flow" "basic_flow" {
parent = google_dialogflow_cx_agent.agent.id
Expand Down Expand Up @@ -262,4 +268,15 @@ resource "google_dialogflow_cx_flow" "basic_flow" {
}
target_flow = google_dialogflow_cx_agent.agent.start_flow
}

advanced_settings {
audio_export_gcs_destination {
uri = "${google_storage_bucket.bucket.url}/prefix-"
}
dtmf_settings {
enabled = true
max_digits = 1
finish_digit = "#"
}
}
}
6 changes: 3 additions & 3 deletions dialogflowcx_intent_full/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ resource "google_dialogflow_cx_agent" "agent" {
avatar_uri = "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png"
enable_stackdriver_logging = true
enable_spell_correction = true
speech_to_text_settings {
enable_speech_adaptation = true
}
speech_to_text_settings {
enable_speech_adaptation = true
}
}


Expand Down
15 changes: 15 additions & 0 deletions dialogflowcx_page_full/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,13 @@ resource "google_dialogflow_cx_page" "basic_page" {
}
required = "true"
redact = "true"
advanced_settings {
dtmf_settings {
enabled = true
max_digits = 1
finish_digit = "#"
}
}
}
}

Expand Down Expand Up @@ -535,6 +542,14 @@ resource "google_dialogflow_cx_page" "basic_page" {
}
target_page = google_dialogflow_cx_page.my_page2.id
}

advanced_settings {
dtmf_settings {
enabled = true
max_digits = 1
finish_digit = "#"
}
}
}

resource "google_dialogflow_cx_page" "my_page2" {
Expand Down
6 changes: 3 additions & 3 deletions dialogflowcx_version_full/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ resource "google_dialogflow_cx_agent" "agent" {
avatar_uri = "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png"
enable_stackdriver_logging = true
enable_spell_correction = true
speech_to_text_settings {
enable_speech_adaptation = true
}
speech_to_text_settings {
enable_speech_adaptation = true
}
}


Expand Down
6 changes: 3 additions & 3 deletions dialogflowcx_webhook_full/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ resource "google_dialogflow_cx_agent" "agent" {
avatar_uri = "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png"
enable_stackdriver_logging = true
enable_spell_correction = true
speech_to_text_settings {
enable_speech_adaptation = true
}
speech_to_text_settings {
enable_speech_adaptation = true
}
}


Expand Down

0 comments on commit 43ca508

Please sign in to comment.