Skip to content

Commit 573c1bd

Browse files
feat: added support for Elasticsearch 8.7<br>* removed support for depricated versions 7.9 and 7.10<br>* updated required terraform version range to ">= 1.3.0, < 1.6.0"<br>* updated the default value of the plan variable to enterprise since the module only supports Elasticsearch versions 7.17 and 8.7 which both require an enterprise plan (#23)
1 parent 37fcff6 commit 573c1bd

File tree

8 files changed

+27
-35
lines changed

8 files changed

+27
-35
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ You need the following permissions to run this module.
5858

5959
| Name | Version |
6060
|------|---------|
61-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.0 |
61+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.0, < 1.6.0 |
6262
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >= 1.56.1, < 2.0.0 |
6363
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.9.1 |
6464

@@ -95,7 +95,7 @@ You need the following permissions to run this module.
9595
| <a name="input_member_memory_mb"></a> [member\_memory\_mb](#input\_member\_memory\_mb) | Allocated memory per-member. For more information, see https://cloud.ibm.com/docs/databases-for-elasticsearch?topic=databases-for-elasticsearch-resources-scaling | `number` | `1024` | no |
9696
| <a name="input_members"></a> [members](#input\_members) | Allocated number of members. For more information, see https://cloud.ibm.com/docs/databases-for-elasticsearch?topic=databases-for-elasticsearch-resources-scaling | `number` | `3` | no |
9797
| <a name="input_name"></a> [name](#input\_name) | The name to give the Elasticsearch instance. | `string` | n/a | yes |
98-
| <a name="input_plan"></a> [plan](#input\_plan) | The name of the service plan that you choose for your Elasticsearch instance | `string` | `"standard"` | no |
98+
| <a name="input_plan"></a> [plan](#input\_plan) | The name of the service plan that you choose for your Elasticsearch instance | `string` | `"enterprise"` | no |
9999
| <a name="input_plan_validation"></a> [plan\_validation](#input\_plan\_validation) | Enable or disable validating the database parameters for elasticsearch during the plan phase | `bool` | `true` | no |
100100
| <a name="input_region"></a> [region](#input\_region) | The region where you want to deploy your instance. | `string` | `"us-south"` | no |
101101
| <a name="input_resource_group_id"></a> [resource\_group\_id](#input\_resource\_group\_id) | The resource group ID where the Elasticsearch instance will be created. | `string` | n/a | yes |

examples/basic/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 1.0.0"
2+
required_version = ">= 1.3.0, < 1.6.0"
33
required_providers {
44
# Pin to the lowest provider version of the range defined in the main module's version.tf to ensure lowest version still works
55
ibm = {

examples/complete/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 1.3.0"
2+
required_version = ">= 1.3.0, < 1.6.0"
33
# Pin to the lowest provider version of the range defined in the main module's version.tf to ensure lowest version still works
44
required_providers {
55
ibm = {

module-metadata.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"pos": {
1313
"filename": "variables.tf",
14-
"line": 101
14+
"line": 99
1515
}
1616
},
1717
"auto_scaling": {
@@ -20,7 +20,7 @@
2020
"description": "Optional rules to allow the database to increase resources in response to usage. Only a single autoscaling block is allowed. Make sure you understand the effects of autoscaling, especially for production environments. See https://cloud.ibm.com/docs/databases-for-elasticsearch?topic=databases-for-elasticsearch-autoscaling in the IBM Cloud Docs.",
2121
"pos": {
2222
"filename": "variables.tf",
23-
"line": 120
23+
"line": 118
2424
}
2525
},
2626
"backup_encryption_key_crn": {
@@ -29,7 +29,7 @@
2929
"description": "The CRN of a Key Protect key, that you want to use for encrypting disk that holds deployment backups. Only used if var.kms_encryption_enabled is set to true. If no value passed, the value passed for the 'kms_key_crn' variable will be used. BYOK for backups is available only in US regions us-south and us-east, and eu-de. Only keys in the us-south and eu-de are durable to region failures. To ensure that your backups are available even if a region failure occurs, you must use a key from us-south or eu-de. Take note that Hyper Protect Crypto Services for IBM Cloud® Databases backups is not currently supported, so if no value is passed here, but a HPCS value is passed for var.kms_key_crn, databases backup encryption will use the default encryption keys.",
3030
"pos": {
3131
"filename": "variables.tf",
32-
"line": 182
32+
"line": 180
3333
}
3434
},
3535
"cbr_rules": {
@@ -46,7 +46,7 @@
4646
],
4747
"pos": {
4848
"filename": "variables.tf",
49-
"line": 208
49+
"line": 206
5050
}
5151
},
5252
"elasticsearch_version": {
@@ -72,7 +72,7 @@
7272
],
7373
"pos": {
7474
"filename": "variables.tf",
75-
"line": 198
75+
"line": 196
7676
},
7777
"immutable": true,
7878
"computed": true
@@ -87,7 +87,7 @@
8787
],
8888
"pos": {
8989
"filename": "variables.tf",
90-
"line": 162
90+
"line": 160
9191
}
9292
},
9393
"kms_key_crn": {
@@ -99,7 +99,7 @@
9999
],
100100
"pos": {
101101
"filename": "variables.tf",
102-
"line": 168
102+
"line": 166
103103
},
104104
"immutable": true
105105
},
@@ -110,7 +110,7 @@
110110
"default": 0,
111111
"pos": {
112112
"filename": "variables.tf",
113-
"line": 86
113+
"line": 84
114114
}
115115
},
116116
"member_disk_mb": {
@@ -120,7 +120,7 @@
120120
"default": 5120,
121121
"pos": {
122122
"filename": "variables.tf",
123-
"line": 94
123+
"line": 92
124124
}
125125
},
126126
"member_memory_mb": {
@@ -130,7 +130,7 @@
130130
"default": 1024,
131131
"pos": {
132132
"filename": "variables.tf",
133-
"line": 79
133+
"line": 77
134134
}
135135
},
136136
"members": {
@@ -140,7 +140,7 @@
140140
"default": 3,
141141
"pos": {
142142
"filename": "variables.tf",
143-
"line": 72
143+
"line": 70
144144
}
145145
},
146146
"name": {
@@ -160,14 +160,14 @@
160160
"name": "plan",
161161
"type": "string",
162162
"description": "The name of the service plan that you choose for your Elasticsearch instance",
163-
"default": "standard",
163+
"default": "enterprise",
164164
"required": true,
165165
"source": [
166166
"ibm_database.elasticsearch.plan"
167167
],
168168
"pos": {
169169
"filename": "variables.tf",
170-
"line": 59
170+
"line": 58
171171
},
172172
"immutable": true,
173173
"options": "standard, enterprise, enterprise-sharding"
@@ -230,7 +230,7 @@
230230
],
231231
"pos": {
232232
"filename": "variables.tf",
233-
"line": 147
233+
"line": 145
234234
}
235235
},
236236
"service_endpoints": {
@@ -256,7 +256,7 @@
256256
"default": false,
257257
"pos": {
258258
"filename": "variables.tf",
259-
"line": 192
259+
"line": 190
260260
}
261261
},
262262
"tags": {
@@ -292,7 +292,7 @@
292292
],
293293
"pos": {
294294
"filename": "variables.tf",
295-
"line": 108
295+
"line": 106
296296
}
297297
}
298298
},
@@ -382,7 +382,7 @@
382382
}
383383
},
384384
"required_core": [
385-
"\u003e= 1.3.0"
385+
"\u003e= 1.3.0, \u003c 1.6.0"
386386
],
387387
"required_providers": {
388388
"ibm": {

tests/other_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ func TestRunBasicExample(t *testing.T) {
1717
Prefix: "es-test",
1818
ResourceGroup: resourceGroup,
1919
BestRegionYAMLPath: regionSelectionPath,
20-
TerraformVars: map[string]interface{}{
21-
"elasticsearch_version": "7.10", // test the version that is not currently tested in pr_test.go
22-
},
2320
})
2421

2522
output, err := options.RunTestConsistency()

tests/pr_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ func TestRunCompleteExample(t *testing.T) {
5454
ResourceGroup: resourceGroup,
5555
BestRegionYAMLPath: regionSelectionPath,
5656
TerraformVars: map[string]interface{}{
57-
"elasticsearch_version": "7.17", // latest supported version
58-
"plan": "enterprise", // this version requires enterprise plan
5957
"existing_sm_instance_guid": permanentResources["secretsManagerGuid"],
6058
"existing_sm_instance_region": permanentResources["secretsManagerRegion"],
6159
"users": []map[string]interface{}{
@@ -91,8 +89,7 @@ func TestRunUpgradeExample(t *testing.T) {
9189
ResourceGroup: resourceGroup,
9290
BestRegionYAMLPath: regionSelectionPath,
9391
TerraformVars: map[string]interface{}{
94-
"elasticsearch_version": "7.9", // lowest supported version
95-
"plan": "standard", // this version requires standard plan
92+
"elasticsearch_version": "7.17", // lowest supported version
9693
"existing_sm_instance_guid": permanentResources["secretsManagerGuid"],
9794
"existing_sm_instance_region": permanentResources["secretsManagerRegion"],
9895
},

variables.tf

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,22 @@ variable "elasticsearch_version" {
4848
validation {
4949
condition = anytrue([
5050
var.elasticsearch_version == null,
51+
var.elasticsearch_version == "8.7",
5152
var.elasticsearch_version == "7.17",
52-
var.elasticsearch_version == "7.10",
53-
var.elasticsearch_version == "7.9"
5453
])
55-
error_message = "Version must be 7.9 or 7.10 or 7.17 (Enterprise plan only). If no value passed, the current ICD preferred version is used."
54+
error_message = "Version must be 8.7 or 7.17 (Enterprise plan only). If no value passed, the current ICD preferred version is used."
5655
}
5756
}
5857

5958
variable "plan" {
6059
type = string
6160
description = "The name of the service plan that you choose for your Elasticsearch instance"
62-
default = "standard"
61+
default = "enterprise"
6362
validation {
6463
condition = anytrue([
65-
var.plan == "standard",
6664
var.plan == "enterprise",
6765
])
68-
error_message = "Only supported plans are standard or enterprise"
66+
error_message = "Only supported plan is enterprise"
6967
}
7068
}
7169

version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 1.3.0"
2+
required_version = ">= 1.3.0, < 1.6.0"
33
# Use "greater than or equal to" range in modules
44
required_providers {
55
ibm = {

0 commit comments

Comments
 (0)