blob: 56c418659845459e0e4c77a73b216ae52e2804bf [file] [log] [blame]
---
# ----------------------------------------------------------------------------
#
# *** 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: "Discovery Engine"
description: |-
Vertex AI Search and Conversation can be used to create a search engine or a chat application by connecting it with a datastore
---
# google\_discovery\_engine\_search\_engine
Vertex AI Search and Conversation can be used to create a search engine or a chat application by connecting it with a datastore
To get more information about SearchEngine, see:
* [API documentation](https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines)
* How-to Guides
* [Create a Search Engine](https://cloud.google.com/generative-ai-app-builder/docs/create-engine-es)
<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=discoveryengine_searchengine_basic&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 - Discoveryengine Searchengine Basic
```hcl
resource "google_discovery_engine_data_store" "basic" {
location = "global"
data_store_id = "example-datastore-id"
display_name = "tf-test-structured-datastore"
industry_vertical = "GENERIC"
content_config = "NO_CONTENT"
solution_types = ["SOLUTION_TYPE_SEARCH"]
create_advanced_site_search = false
}
resource "google_discovery_engine_search_engine" "basic" {
engine_id = "example-engine-id"
collection_id = "default_collection"
location = google_discovery_engine_data_store.basic.location
display_name = "Example Display Name"
data_store_ids = [google_discovery_engine_data_store.basic.data_store_id]
search_engine_config {
}
}
```
## Argument Reference
The following arguments are supported:
* `display_name` -
(Required)
Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.
* `data_store_ids` -
(Required)
The data stores associated with this engine. For SOLUTION_TYPE_SEARCH type of engines, they can only associate with at most one data store.
* `search_engine_config` -
(Required)
Configurations for a Search Engine.
Structure is [documented below](#nested_search_engine_config).
* `engine_id` -
(Required)
Unique ID to use for Search Engine App.
* `collection_id` -
(Required)
The collection ID.
* `location` -
(Required)
Location.
<a name="nested_search_engine_config"></a>The `search_engine_config` block supports:
* `search_tier` -
(Optional)
The search feature tier of this engine. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.
Default value is `SEARCH_TIER_STANDARD`.
Possible values are: `SEARCH_TIER_STANDARD`, `SEARCH_TIER_ENTERPRISE`.
* `search_add_ons` -
(Optional)
The add-on that this search engine enables.
Each value may be one of: `SEARCH_ADD_ON_LLM`.
- - -
* `industry_vertical` -
(Optional)
The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to GENERIC. Vertical on Engine has to match vertical of the DataStore liniked to the engine.
Default value is `GENERIC`.
Possible values are: `GENERIC`, `MEDIA`.
* `common_config` -
(Optional)
Common config spec that specifies the metadata of the engine.
Structure is [documented below](#nested_common_config).
* `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_common_config"></a>The `common_config` block supports:
* `company_name` -
(Optional)
The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.cd
## Attributes Reference
In addition to the arguments listed above, the following computed attributes are exported:
* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/engines/{{engine_id}}`
* `name` -
The unique full resource name of the search engine. Values are of the format
`projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
This field must be a UTF-8 encoded string with a length limit of 1024
characters.
* `create_time` -
Timestamp the Engine was created at.
* `update_time` -
Timestamp the Engine was last updated.
## 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
SearchEngine can be imported using any of these accepted formats:
* `projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/engines/{{engine_id}}`
* `{{project}}/{{location}}/{{collection_id}}/{{engine_id}}`
* `{{location}}/{{collection_id}}/{{engine_id}}`
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import SearchEngine using one of the formats above. For example:
```tf
import {
id = "projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/engines/{{engine_id}}"
to = google_discovery_engine_search_engine.default
}
```
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), SearchEngine can be imported using one of the formats above. For example:
```
$ terraform import google_discovery_engine_search_engine.default projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/engines/{{engine_id}}
$ terraform import google_discovery_engine_search_engine.default {{project}}/{{location}}/{{collection_id}}/{{engine_id}}
$ terraform import google_discovery_engine_search_engine.default {{location}}/{{collection_id}}/{{engine_id}}
```
## User Project Overrides
This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override).