Represents a Dialogflow intent. Intents convert a number of user expressions or patterns into an action. An action is an extraction of a user command or sentence semantics.
To get more information about Intent, see:
resource "google_dialogflow_agent" "basic_agent" {
display_name = "example_agent"
default_language_code = "en"
time_zone = "America/New_York"
}
resource "google_dialogflow_intent" "basic_intent" {
depends_on = [google_dialogflow_agent.basic_agent]
display_name = "basic-intent"
}
resource "google_project" "agent_project" {
project_id = "my-project"
name = "my-project"
org_id = "123456789"
}
resource "google_project_service" "agent_project" {
project = google_project.agent_project.project_id
service = "dialogflow.googleapis.com"
disable_dependent_services = false
}
resource "google_service_account" "dialogflow_service_account" {
account_id = "my-account"
}
resource "google_project_iam_member" "agent_create" {
project = google_project_service.agent_project.project
role = "roles/dialogflow.admin"
member = "serviceAccount:${google_service_account.dialogflow_service_account.email}"
}
resource "google_dialogflow_agent" "basic_agent" {
project = google_project.agent_project.project_id
display_name = "example_agent"
default_language_code = "en"
time_zone = "America/New_York"
}
resource "google_dialogflow_intent" "full_intent" {
project = google_project.agent_project.project_id
depends_on = [google_dialogflow_agent.basic_agent]
display_name = "full-intent"
webhook_state = "WEBHOOK_STATE_ENABLED"
priority = 1
is_fallback = false
ml_disabled = true
action = "some_action"
reset_contexts = true
input_context_names = ["projects/${google_project.agent_project.project_id}/agent/sessions/-/contexts/some_id"]
events = ["some_event"]
default_response_platforms = ["FACEBOOK","SLACK"]
}
The following arguments are supported:
display_name
-
(Required)
The name of this intent to be displayed on the console.webhook_state
-
(Optional)
Indicates whether webhooks are enabled for the intent.
WEBHOOK_STATE_ENABLED
, WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING
.priority
-
(Optional)
The priority of this intent. Higher numbers represent higher priorities.
is_fallback
-
(Optional)
Indicates whether this is a fallback intent.
ml_disabled
-
(Optional)
Indicates whether Machine Learning is disabled for the intent.
Note: If mlDisabled setting is set to true, then this intent is not taken into account during inference in ML
ONLY match mode. Also, auto-markup in the UI is turned off.
input_context_names
-
(Optional)
The list of context names required for this intent to be triggered.
Format: projects/
events
-
(Optional)
The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of
the contexts must be present in the active user session for an event to trigger this intent. See the
events reference for more details.
action
-
(Optional)
The name of the action associated with the intent.
Note: The action name must not contain whitespaces.
reset_contexts
-
(Optional)
Indicates whether to delete all contexts in the current session when this intent is matched.
default_response_platforms
-
(Optional)
The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED
(i.e. default platform).
Each value may be one of: FACEBOOK
, SLACK
, TELEGRAM
, KIK
, SKYPE
, LINE
, VIBER
, ACTIONS_ON_GOOGLE
, GOOGLE_HANGOUTS
.
parent_followup_intent_name
-
(Optional)
The unique identifier of the parent intent in the chain of followup intents.
Format: projects/
project
- (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format {{name}}
name
-
The unique identifier of this intent.
Format: projects/
root_followup_intent_name
-
The unique identifier of the root intent in the chain of followup intents. It identifies the correct followup
intents chain for this intent.
Format: projects/
followup_intent_info
-
Information about all followup intents that have this intent as a direct or indirect parent. We populate this field
only in the output.
Structure is documented below.
The followup_intent_info
block contains:
followup_intent_name
-
(Optional)
The unique identifier of the followup intent.
Format: projects/
parent_followup_intent_name
-
(Optional)
The unique identifier of the followup intent's parent.
Format: projects/
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.update
- Default is 20 minutes.delete
- Default is 20 minutes.Intent can be imported using any of these accepted formats:
{{name}}
In Terraform v1.5.0 and later, use an import
block to import Intent using one of the formats above. For example:
import {
id = "{{name}}"
to = google_dialogflow_intent.default
}
When using the terraform import
command, Intent can be imported using one of the formats above. For example:
$ terraform import google_dialogflow_intent.default {{name}}
This resource supports User Project Overrides.