google_dialogflow_cx_environment

Represents an environment for an agent. You can create multiple versions of your agent and publish them to separate environments. When you edit an agent, you are editing the draft agent. At any point, you can save the draft agent as an agent version, which is an immutable snapshot of your agent. When you save the draft agent, it is published to the default environment. When you create agent versions, you can publish them to custom environments. You can create a variety of custom environments for testing, development, production, etc.

To get more information about Environment, see:

Open in Cloud Shell

Example Usage - Dialogflowcx Environment Full

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"
}

resource "google_dialogflow_cx_environment" "development" {
  parent       = google_dialogflow_cx_agent.agent.id
  display_name = "Development"
  description  = "Development Environment"
  version_configs {
    version = google_dialogflow_cx_version.version_1.id
  }
}

Argument Reference

The following arguments are supported:

The version_configs 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

Environment can be imported using any of these accepted formats:

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

import {
  id = "{{parent}}/environments/{{name}}"
  to = google_dialogflow_cx_environment.default
}

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

$ terraform import google_dialogflow_cx_environment.default {{parent}}/environments/{{name}}
$ terraform import google_dialogflow_cx_environment.default {{parent}}/{{name}}