You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: added support to install and start the Elastic's Natural Language Processing model using new input enable_elser_model<br>- the default value of the member_host_flavor in the DA has changed from multitenant to b3c.4x16.encrypted.<br>- the default value of the member_cpu_count in the DA has changed from 0 to 3<br>- the default value of plan in the DA has updated from enterprise to platinum. (#223)
|[ibm_database_connection.database_connection](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/data-sources/database_connection)| data source |
82
85
@@ -91,6 +94,7 @@ You need the following permissions to run this module.
91
94
| <aname="input_backup_encryption_key_crn"></a> [backup\_encryption\_key\_crn](#input\_backup\_encryption\_key\_crn)| The CRN of a KMS (Key Protect or Hyper Protect Crypto Service) key to use for encrypting the disk that holds deployment backups. Applies only if `kms_encryption_enabled` is true. Limitations exist for regions. For more information, see [Key Protect integration](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-key-protect&interface=ui#key-byok) or [Hyper Protect Crypto Services integration](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-hpcs#use-hpcs-backups). |`string`|`null`| no |
92
95
| <aname="input_cbr_rules"></a> [cbr\_rules](#input\_cbr\_rules)| The list of context-based restriction rules to create. | <pre>list(object({<br> description = string<br> account_id = string<br> rule_contexts = list(object({<br> attributes = optional(list(object({<br> name = string<br> value = string<br> }))) }))<br> enforcement_mode = string<br> }))</pre> |`[]`| no |
93
96
| <aname="input_elasticsearch_version"></a> [elasticsearch\_version](#input\_elasticsearch\_version)| The version of Databases for Elasticsearch to deploy. Possible values: `8.7`, `8.10`, `8.12`, which requires an Enterprise Platinum pricing plan. If no value is specified, the current preferred version for IBM Cloud Databases is used. |`string`|`null`| no |
97
+
| <aname="input_enable_elser_model"></a> [enable\_elser\_model](#input\_enable\_elser\_model)| Set it to true to install and start the Elastic's Natural Language Processing model. [Learn more](https://cloud.ibm.com/docs/databases-for-elasticsearch?topic=databases-for-elasticsearch-elser-embeddings-elasticsearch)|`bool`|`false`| no |
94
98
| <aname="input_existing_kms_instance_guid"></a> [existing\_kms\_instance\_guid](#input\_existing\_kms\_instance\_guid)| The GUID of a Hyper Protect Crypto Services or Key Protect instance for the CRN specified in `kms_key_crn` and `backup_encryption_key_crn`. Applies only if `kms_encryption_enabled` is true, `skip_iam_authorization_policy` is false, and you specify values for `kms_key_crn` or `backup_encryption_key_crn`. |`string`|`null`| no |
95
99
| <aname="input_kms_encryption_enabled"></a> [kms\_encryption\_enabled](#input\_kms\_encryption\_enabled)| Whether to specify the keys used to encrypt data in the database. Specify `true` to identify the encryption keys. If set to `false`, the data is encrypted with randomly generated keys. [Learn more about Key Protect integration](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-key-protect). [Learn more about HPCS integration](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-hpcs). |`bool`|`false`| no |
96
100
| <aname="input_kms_key_crn"></a> [kms\_key\_crn](#input\_kms\_key\_crn)| The root key CRN of the Key Protect or Hyper Protect Crypto Services instance to use for disk encryption. Applies only if `kms_encryption_enabled` is true. |`string`|`null`| no |
description="Set it to true to install and start the Elastic's Natural Language Processing model. [Learn more](https://cloud.ibm.com/docs/databases-for-elasticsearch?topic=databases-for-elasticsearch-elser-embeddings-elasticsearch)"
Copy file name to clipboardExpand all lines: main.tf
+47Lines changed: 47 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,10 @@ locals {
8
8
validate_auth_policy=var.kms_encryption_enabled&& var.skip_iam_authorization_policy==false&& var.existing_kms_instance_guid==null?tobool("When var.skip_iam_authorization_policy is set to false, and var.kms_encryption_enabled to true, a value must be passed for var.existing_kms_instance_guid in order to create the auth policy.") :true
9
9
# tflint-ignore: terraform_unused_declarations
10
10
validate_backup_key=var.backup_encryption_key_crn!=null&& var.use_default_backup_encryption_key==true?tobool("When passing a value for 'backup_encryption_key_crn' you cannot set 'use_default_backup_encryption_key' to 'true'") :true
11
+
# tflint-ignore: terraform_unused_declarations
12
+
validate_plan=var.enable_elser_model&& var.plan!="platinum"?tobool("When var.enable_elser_model is set to true, a value for var.plan must be 'platinum' in order to enable ELSER model.") :true
13
+
# tflint-ignore: terraform_unused_declarations
14
+
validate_es_user=var.enable_elser_model&&!((length(var.service_credential_names) >0&&length([fork, vinvar.service_credential_names:kifv=="Administrator"]) >0) || var.admin_pass!=null) ?tobool("When var.enable_elser_model is set to true, a value must be passed for var.service_credential_names or var.admin_pass. var.service_credential_names must contain at least one credential name with Administrator role.") :true
11
15
12
16
# If no value passed for 'backup_encryption_key_crn' use the value of 'kms_key_crn' and perform validation of 'kms_key_crn' to check if region is supported by backup encryption key.
13
17
@@ -262,3 +266,46 @@ data "ibm_database_connection" "database_connection" {
# Enable Elastic's Natural Language Processing model (ELSER) support by calling ES REST API directly using shell script. Learn more https://cloud.ibm.com/docs/databases-for-elasticsearch?topic=databases-for-elasticsearch-elser-embeddings-elasticsearch
275
+
# Firstly, ELSER model is installed using 'put_vectordb_model' null_resource. Secondly, ELSER model is started with `start_vectordb_model` null_resource.
276
+
#
277
+
# To authenticate ES rest API, the credentials are extracted from 'service_credential_names' or ES 'adminpassword' using the following logic:
278
+
# if elser_model is enabled, then
279
+
# if service_credential_names are used, then get the key name of a credential where role is 'Administrator'
280
+
# use the key name to obtain username and password from service_credentials_object
281
+
# else if admin_pass is used, then use 'admin' for username and password from ES password
Copy file name to clipboardExpand all lines: modules/fscloud/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,7 @@ No resources.
37
37
| <aname="input_backup_encryption_key_crn"></a> [backup\_encryption\_key\_crn](#input\_backup\_encryption\_key\_crn)| The CRN of a Hyper Protect Crypto Service use for encrypting the disk that holds deployment backups. Only used if var.kms\_encryption\_enabled is set to true. There are limitation per region on the Hyper Protect Crypto Services and region for those services. See https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-hpcs#use-hpcs-backups|`string`|`null`| no |
38
38
| <aname="input_cbr_rules"></a> [cbr\_rules](#input\_cbr\_rules)| (Optional, list) List of CBR rules to create | <pre>list(object({<br> description = string<br> account_id = string<br> rule_contexts = list(object({<br> attributes = optional(list(object({<br> name = string<br> value = string<br> }))) }))<br> enforcement_mode = string<br> }))</pre> |`[]`| no |
39
39
| <aname="input_elasticsearch_version"></a> [elasticsearch\_version](#input\_elasticsearch\_version)| Version of the Elasticsearch instance. If no value is passed, the current preferred version of IBM Cloud Databases is used. |`string`|`null`| no |
40
+
| <aname="input_enable_elser_model"></a> [enable\_elser\_model](#input\_enable\_elser\_model)| Set it to true to install and start the Elastic's Natural Language Processing model.[Learn more](https://cloud.ibm.com/docs/databases-for-elasticsearch?topic=databases-for-elasticsearch-elser-embeddings-elasticsearch)|`bool`|`false`| no |
40
41
| <aname="input_existing_kms_instance_guid"></a> [existing\_kms\_instance\_guid](#input\_existing\_kms\_instance\_guid)| The GUID of the Hyper Protect Crypto Services instance. It is only required while creating authorization policy. |`string`|`null`| no |
41
42
| <aname="input_kms_key_crn"></a> [kms\_key\_crn](#input\_kms\_key\_crn)| The root key CRN of the Hyper Protect Crypto Service (HPCS) to use for disk encryption. |`string`| n/a | yes |
42
43
| <aname="input_member_cpu_count"></a> [member\_cpu\_count](#input\_member\_cpu\_count)| Allocated dedicated CPU per member. For shared CPU, set to 0. For more information, see https://cloud.ibm.com/docs/databases-for-elasticsearch?topic=databases-for-elasticsearch-resources-scaling|`number`|`0`| no |
Copy file name to clipboardExpand all lines: modules/fscloud/variables.tf
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -190,3 +190,9 @@ variable "cbr_rules" {
190
190
default=[]
191
191
# Validation happens in the rule module
192
192
}
193
+
194
+
variable"enable_elser_model" {
195
+
type=bool
196
+
description="Set it to true to install and start the Elastic's Natural Language Processing model.[Learn more](https://cloud.ibm.com/docs/databases-for-elasticsearch?topic=databases-for-elasticsearch-elser-embeddings-elasticsearch)"
# learn more https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-ml-put-trained-model#operation-ml-put-trained-model-wait_for_completion
0 commit comments