| --- |
| # ---------------------------------------------------------------------------- |
| # |
| # *** AUTO GENERATED CODE *** Type: MMv1 *** |
| # |
| # ---------------------------------------------------------------------------- |
| # |
| # This file is automatically generated by Magic Modules and manual |
| # changes will be clobbered when the file is regenerated. |
| # |
| # Please read more about how to change this file in |
| # .github/CONTRIBUTING.md. |
| # |
| # ---------------------------------------------------------------------------- |
| subcategory: "Dialogflow CX" |
| description: |- |
| You can create multiple versions of your agent flows and deploy them to separate serving environments. |
| --- |
| |
| # google\_dialogflow\_cx\_version |
| |
| You can create multiple versions of your agent flows and deploy them to separate serving environments. |
| When you edit a flow, you are editing a draft flow. At any point, you can save a draft flow as a flow version. A flow version is an immutable snapshot of your flow data and associated agent data like intents, entities, webhooks, pages, route groups, etc. |
| |
| |
| To get more information about Version, see: |
| |
| * [API documentation](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.flows.versions) |
| * How-to Guides |
| * [Official Documentation](https://cloud.google.com/dialogflow/cx/docs) |
| |
| <div class = "oics-button" style="float: right; margin: 0 0 -15px"> |
| <a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=dialogflowcx_version_full&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank"> |
| <img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;"> |
| </a> |
| </div> |
| ## Example Usage - Dialogflowcx Version Full |
| |
| |
| ```hcl |
| resource "google_dialogflow_cx_agent" "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 |
| } |
| } |
| |
| |
| resource "google_dialogflow_cx_version" "version_1" { |
| parent = google_dialogflow_cx_agent.agent.start_flow |
| display_name = "1.0.0" |
| description = "version 1.0.0" |
| } |
| ``` |
| |
| ## Argument Reference |
| |
| The following arguments are supported: |
| |
| |
| * `display_name` - |
| (Required) |
| The human-readable name of the version. Limit of 64 characters. |
| |
| |
| - - - |
| |
| |
| * `description` - |
| (Optional) |
| The description of the version. The maximum length is 500 characters. If exceeded, the request is rejected. |
| |
| * `parent` - |
| (Optional) |
| The Flow to create an Version for. |
| Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>. |
| |
| |
| ## Attributes Reference |
| |
| In addition to the arguments listed above, the following computed attributes are exported: |
| |
| * `id` - an identifier for the resource with format `{{parent}}/versions/{{name}}` |
| |
| * `name` - |
| Format: projects//locations//agents//flows//versions/. Version ID is a self-increasing number generated by Dialogflow upon version creation. |
| |
| * `nlu_settings` - |
| The NLU settings of the flow at version creation. |
| Structure is [documented below](#nested_nlu_settings). |
| |
| * `create_time` - |
| A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". |
| |
| * `state` - |
| The state of this version. |
| * RUNNING: Version is not ready to serve (e.g. training is running). |
| * SUCCEEDED: Training has succeeded and this version is ready to serve. |
| * FAILED: Version training failed. |
| |
| |
| <a name="nested_nlu_settings"></a>The `nlu_settings` block contains: |
| |
| * `model_type` - |
| (Optional) |
| Indicates the type of NLU model. |
| * MODEL_TYPE_STANDARD: Use standard NLU model. |
| * MODEL_TYPE_ADVANCED: Use advanced NLU model. |
| Possible values are: `MODEL_TYPE_STANDARD`, `MODEL_TYPE_ADVANCED`. |
| |
| * `classification_threshold` - |
| (Optional) |
| To filter out false positive results and still get variety in matched natural language inputs for your agent, you can tune the machine learning classification threshold. If the returned score value is less than the threshold value, then a no-match event will be triggered. |
| The score values range from 0.0 (completely uncertain) to 1.0 (completely certain). If set to 0.0, the default of 0.3 is used. |
| |
| * `model_training_mode` - |
| (Optional) |
| Indicates NLU model training mode. |
| * MODEL_TRAINING_MODE_AUTOMATIC: NLU model training is automatically triggered when a flow gets modified. User can also manually trigger model training in this mode. |
| * MODEL_TRAINING_MODE_MANUAL: User needs to manually trigger NLU model training. Best for large flows whose models take long time to train. |
| Possible values are: `MODEL_TRAINING_MODE_AUTOMATIC`, `MODEL_TRAINING_MODE_MANUAL`. |
| |
| ## Timeouts |
| |
| This resource provides the following |
| [Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: |
| |
| - `create` - Default is 40 minutes. |
| - `update` - Default is 40 minutes. |
| - `delete` - Default is 20 minutes. |
| |
| ## Import |
| |
| |
| Version can be imported using any of these accepted formats: |
| |
| * `{{parent}}/versions/{{name}}` |
| * `{{parent}}/{{name}}` |
| |
| |
| In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Version using one of the formats above. For example: |
| |
| ```tf |
| import { |
| id = "{{parent}}/versions/{{name}}" |
| to = google_dialogflow_cx_version.default |
| } |
| ``` |
| |
| When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Version can be imported using one of the formats above. For example: |
| |
| ``` |
| $ terraform import google_dialogflow_cx_version.default {{parent}}/versions/{{name}} |
| $ terraform import google_dialogflow_cx_version.default {{parent}}/{{name}} |
| ``` |