| --- |
| # ---------------------------------------------------------------------------- |
| # |
| # *** 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" |
| description: |- |
| By default, your agent responds to a matched intent with a static response. |
| --- |
| |
| # google\_dialogflow\_fulfillment |
| |
| By default, your agent responds to a matched intent with a static response. If you're using one of the integration options, you can provide a more dynamic response by using fulfillment. When you enable fulfillment for an intent, Dialogflow responds to that intent by calling a service that you define. For example, if an end-user wants to schedule a haircut on Friday, your service can check your database and respond to the end-user with availability information for Friday. |
| |
| |
| To get more information about Fulfillment, see: |
| |
| * [API documentation](https://cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.agent/getFulfillment) |
| * How-to Guides |
| * [Official Documentation](https://cloud.google.com/dialogflow/es/docs/fulfillment-overview) |
| |
| ## Example Usage - Dialogflow Fulfillment Basic |
| |
| |
| ```hcl |
| resource "google_dialogflow_agent" "basic_agent" { |
| display_name = "example_agent" |
| default_language_code = "en" |
| time_zone = "America/New_York" |
| } |
| |
| resource "google_dialogflow_fulfillment" "basic_fulfillment" { |
| depends_on = [google_dialogflow_agent.basic_agent] |
| display_name = "basic-fulfillment" |
| enabled = true |
| generic_web_service { |
| uri = "https://google.com" |
| username = "admin" |
| password = "password" |
| request_headers = { |
| name = "wrench" |
| } |
| } |
| } |
| ``` |
| |
| ## Argument Reference |
| |
| The following arguments are supported: |
| |
| |
| * `display_name` - |
| (Required) |
| The human-readable name of the fulfillment, unique within the agent. |
| |
| |
| - - - |
| |
| |
| * `enabled` - |
| (Optional) |
| Whether fulfillment is enabled. |
| |
| * `features` - |
| (Optional) |
| The field defines whether the fulfillment is enabled for certain features. |
| Structure is [documented below](#nested_features). |
| |
| * `generic_web_service` - |
| (Optional) |
| Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. |
| Structure is [documented below](#nested_generic_web_service). |
| |
| * `project` - (Optional) The ID of the project in which the resource belongs. |
| If it is not provided, the provider project is used. |
| |
| |
| <a name="nested_features"></a>The `features` block supports: |
| |
| * `type` - |
| (Required) |
| The type of the feature that enabled for fulfillment. |
| * SMALLTALK: Fulfillment is enabled for SmallTalk. |
| Possible values are: `SMALLTALK`. |
| |
| <a name="nested_generic_web_service"></a>The `generic_web_service` block supports: |
| |
| * `uri` - |
| (Required) |
| The fulfillment URI for receiving POST requests. It must use https protocol. |
| |
| * `username` - |
| (Optional) |
| The user name for HTTP Basic authentication. |
| |
| * `password` - |
| (Optional) |
| The password for HTTP Basic authentication. |
| |
| * `request_headers` - |
| (Optional) |
| The HTTP request headers to send together with fulfillment requests. |
| |
| ## Attributes Reference |
| |
| 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 the fulfillment. |
| Format: projects/<Project ID>/agent/fulfillment - projects/<Project ID>/locations/<Location ID>/agent/fulfillment |
| |
| |
| ## Timeouts |
| |
| This resource provides the following |
| [Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: |
| |
| - `create` - Default is 20 minutes. |
| - `update` - Default is 20 minutes. |
| - `delete` - Default is 20 minutes. |
| |
| ## Import |
| |
| |
| Fulfillment can be imported using any of these accepted formats: |
| |
| * `{{name}}` |
| |
| |
| In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Fulfillment using one of the formats above. For example: |
| |
| ```tf |
| import { |
| id = "{{name}}" |
| to = google_dialogflow_fulfillment.default |
| } |
| ``` |
| |
| When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Fulfillment can be imported using one of the formats above. For example: |
| |
| ``` |
| $ terraform import google_dialogflow_fulfillment.default {{name}} |
| ``` |
| |
| ## User Project Overrides |
| |
| This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). |