oci_generative_ai_agent_knowledge_base

This resource provides the Knowledge Base resource in Oracle Cloud Infrastructure Generative Ai Agent service.

CreateKnowledgeBase

Creates a knowledge base.

Example Usage

resource "oci_generative_ai_agent_knowledge_base" "test_knowledge_base" {
	#Required
	compartment_id = var.compartment_id
	index_config {
		#Required
		index_config_type = var.knowledge_base_index_config_index_config_type

		#Optional
		cluster_id = oci_containerengine_cluster.test_cluster.id
		database_connection {
			#Required
			connection_id = oci_database_migration_connection.test_connection.id
			connection_type = var.knowledge_base_index_config_database_connection_connection_type
		}
		database_functions {

			#Optional
			name = var.knowledge_base_index_config_database_functions_name
		}
		indexes {

			#Optional
			name = var.knowledge_base_index_config_indexes_name
			schema {

				#Optional
				body_key = var.knowledge_base_index_config_indexes_schema_body_key
				embedding_body_key = var.knowledge_base_index_config_indexes_schema_embedding_body_key
				title_key = var.knowledge_base_index_config_indexes_schema_title_key
				url_key = var.knowledge_base_index_config_indexes_schema_url_key
			}
		}
		secret_detail {
			#Required
			type = var.knowledge_base_index_config_secret_detail_type
			vault_secret_id = oci_vault_secret.test_secret.id

			#Optional
			client_id = oci_generative_ai_agent_client.test_client.id
			idcs_url = var.knowledge_base_index_config_secret_detail_idcs_url
			scope_url = var.knowledge_base_index_config_secret_detail_scope_url
		}
		should_enable_hybrid_search = var.knowledge_base_index_config_should_enable_hybrid_search
	}

	#Optional
	defined_tags = {"Operations.CostCenter"= "42"}
	description = var.knowledge_base_description
	display_name = var.knowledge_base_display_name
	freeform_tags = {"Department"= "Finance"}
}

Argument Reference

The following arguments are supported:

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the Knowledge Base * update - (Defaults to 20 minutes), when updating the Knowledge Base * delete - (Defaults to 20 minutes), when destroying the Knowledge Base

Import

KnowledgeBases can be imported using the id, e.g.

$ terraform import oci_generative_ai_agent_knowledge_base.test_knowledge_base "id"