Skip to content

Commit 625a8b3

Browse files
Jordan-Williams2Jordan-Williams2
authored andcommitted
fix: add bnpp fix
1 parent 74a6521 commit 625a8b3

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

main.tf

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ resource "ibm_database" "elasticsearch" {
8383
## This is used to conditionally add one, OR, the other group block depending on var.local.host_flavor_set
8484
## This block is for if host_flavor IS set to specific pre-defined host sizes and not set to "multitenant"
8585
dynamic "group" {
86-
for_each = local.host_flavor_set && var.member_host_flavor != "multitenant" ? [1] : []
86+
for_each = local.host_flavor_set && var.member_host_flavor != "multitenant" && var.backup_crn == null ? [1] : []
8787
content {
8888
group_id = "member" # Only member type is allowed for elasticsearch
8989
host_flavor {
@@ -100,7 +100,7 @@ resource "ibm_database" "elasticsearch" {
100100

101101
## This block is for if host_flavor IS set to "multitenant"
102102
dynamic "group" {
103-
for_each = local.host_flavor_set && var.member_host_flavor == "multitenant" ? [1] : []
103+
for_each = local.host_flavor_set && var.member_host_flavor == "multitenant" && var.backup_crn == null ? [1] : []
104104
content {
105105
group_id = "member" # Only member type is allowed for elasticsearch
106106
host_flavor {
@@ -123,7 +123,7 @@ resource "ibm_database" "elasticsearch" {
123123

124124
## This block is for if host_flavor IS NOT set
125125
dynamic "group" {
126-
for_each = local.host_flavor_set ? [] : [1]
126+
for_each = local.host_flavor_set == false && var.backup_crn == null ? [1] : []
127127
content {
128128
group_id = "member" # Only member type is allowed for elasticsearch
129129
memory {
@@ -180,6 +180,8 @@ resource "ibm_database" "elasticsearch" {
180180

181181
timeouts {
182182
create = "120m" #Extending provisioning time to 120 minutes
183+
update = "120m"
184+
delete = "15m"
183185
}
184186
}
185187

modules/fscloud/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ No resources.
3434
| <a name="input_admin_pass"></a> [admin\_pass](#input\_admin\_pass) | The password for the database administrator. If the admin password is null then the admin user ID cannot be accessed. More users can be specified in a user block. | `string` | `null` | no |
3535
| <a name="input_auto_scaling"></a> [auto\_scaling](#input\_auto\_scaling) | 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&interface=cli#autoscaling-considerations in the IBM Cloud Docs. | <pre>object({<br/> disk = object({<br/> capacity_enabled = optional(bool, false)<br/> free_space_less_than_percent = optional(number, 10)<br/> io_above_percent = optional(number, 90)<br/> io_enabled = optional(bool, false)<br/> io_over_period = optional(string, "15m")<br/> rate_increase_percent = optional(number, 10)<br/> rate_limit_mb_per_member = optional(number, 3670016)<br/> rate_period_seconds = optional(number, 900)<br/> rate_units = optional(string, "mb")<br/> })<br/> memory = object({<br/> io_above_percent = optional(number, 90)<br/> io_enabled = optional(bool, false)<br/> io_over_period = optional(string, "15m")<br/> rate_increase_percent = optional(number, 10)<br/> rate_limit_mb_per_member = optional(number, 114688)<br/> rate_period_seconds = optional(number, 900)<br/> rate_units = optional(string, "mb")<br/> })<br/> })</pre> | `null` | no |
3636
| <a name="input_backup_crn"></a> [backup\_crn](#input\_backup\_crn) | The CRN of a backup resource to restore from. The backup is created by a database deployment with the same service ID. The backup is loaded after provisioning and the new deployment starts up that uses that data. A backup CRN is in the format crn:v1:<…>:backup:. If omitted, the database is provisioned empty. | `string` | `null` | no |
37-
| <a name="input_backup_encryption_key_crn"></a> [backup\_encryption\_key\_crn](#input\_backup\_encryption\_key\_crn) | The Hyper Protect Crypto Services (HPCS) or Key Protect root key CRN to use for encrypting the disk that holds deployment backups. There are region limitation for backup encryption. See https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-hpcs#use-hpcs-backups (HPCS) and https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-key-protect&interface=ui#key-byok (Key Protect). | `string` | `null` | no |
37+
| <a name="input_backup_encryption_key_crn"></a> [backup\_encryption\_key\_crn](#input\_backup\_encryption\_key\_crn) | The Hyper Protect Crypto Services (HPCS) or Key Protect root key CRN to use for encrypting the disk that holds deployment backups. There are region limitations for backup encryption. See https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-hpcs#use-hpcs-backups (HPCS) and https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-key-protect&interface=ui#key-byok (Key Protect). | `string` | `null` | no |
3838
| <a name="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 |
3939
| <a name="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 |
4040
| <a name="input_elser_model_type"></a> [elser\_model\_type](#input\_elser\_model\_type) | Trained ELSER model to be used for Elastic's Natural Language Processing. Possible values: `.elser_model_1`, `.elser_model_2` and `.elser_model_2_linux-x86_64`. [Learn more](https://www.elastic.co/guide/en/machine-learning/current/ml-nlp-elser.html) | `string` | `".elser_model_2_linux-x86_64"` | no |

modules/fscloud/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ variable "kms_key_crn" {
150150

151151
variable "backup_encryption_key_crn" {
152152
type = string
153-
description = "The Hyper Protect Crypto Services (HPCS) or Key Protect root key CRN to use for encrypting the disk that holds deployment backups. There are region limitation for backup encryption. See https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-hpcs#use-hpcs-backups (HPCS) and https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-key-protect&interface=ui#key-byok (Key Protect)."
153+
description = "The Hyper Protect Crypto Services (HPCS) or Key Protect root key CRN to use for encrypting the disk that holds deployment backups. There are region limitations for backup encryption. See https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-hpcs#use-hpcs-backups (HPCS) and https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-key-protect&interface=ui#key-byok (Key Protect)."
154154
default = null
155155
}
156156

tests/pr_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ func TestRunStandardSolutionSchematics(t *testing.T) {
193193
{Name: "admin_pass_sm_secret_group", Value: options.Prefix, DataType: "string"},
194194
{Name: "admin_pass_sm_secret_name", Value: options.Prefix, DataType: "string"},
195195
{Name: "enable_kibana_dashboard", Value: true, DataType: "bool"},
196-
{Name: "provider_visibility", Value: "public", DataType: "string"},
196+
{Name: "provider_visibility", Value: "private", DataType: "string"},
197197
}
198198
err := options.RunSchematicTest()
199199
assert.Nil(t, err, "This should not have errored")

0 commit comments

Comments
 (0)