google_dialogflow_cx_agent

Agents are best described as Natural Language Understanding (NLU) modules that transform user requests into actionable data. You can include agents in your app, product, or service to determine user intent and respond to the user in a natural way.

To get more information about Agent, see:

Open in Cloud Shell

Example Usage - Dialogflowcx Agent Full

resource "google_storage_bucket" "bucket" {
  name                        = "dialogflowcx-bucket"
  location                    = "US"
  uniform_bucket_level_access = true
}

resource "google_dialogflow_cx_agent" "full_agent" {
  display_name = "dialogflowcx-agent"
  location = "global"
  default_language_code = "en"
  supported_language_codes = ["fr","de","es"]
  time_zone = "America/New_York"
  description = "Example description."
  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
  }
  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",
        }
      }
    })
  }
}

Argument Reference

The following arguments are supported:


The speech_to_text_settings block supports:

The advanced_settings block supports:

The audio_export_gcs_destination block supports:

The dtmf_settings block supports:

The git_integration_settings block supports:

The github_settings block supports:

The text_to_speech_settings block supports:

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

Agent can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import Agent using one of the formats above. For example:

import {
  id = "projects/{{project}}/locations/{{location}}/agents/{{name}}"
  to = google_dialogflow_cx_agent.default
}

When using the terraform import command, Agent can be imported using one of the formats above. For example:

$ terraform import google_dialogflow_cx_agent.default projects/{{project}}/locations/{{location}}/agents/{{name}}
$ terraform import google_dialogflow_cx_agent.default {{project}}/{{location}}/{{name}}
$ terraform import google_dialogflow_cx_agent.default {{location}}/{{name}}

User Project Overrides

This resource supports User Project Overrides.