terraform-ibm-modules / terraform-ibm-icd-elasticsearch

Implements an instance of the IBM Cloud Databases for Elasticsearch service.
Apache License 2.0
0 stars 1 forks source link

KMS key should be ignored when existing DB instance is used #276

Closed in-1911 closed 1 month ago

in-1911 commented 1 month ago

When the module is called with passing existing_db_instance_crn, the KMS key should be ignored completely.

Otherwise the validation fails with an error:

...
existing_db_instance_crn = "<valid DB instance CRN"
existing_kms_key_crn =  null
...
 2024/09/06 16:24:38 Terraform plan | 
 2024/09/06 16:24:38 Terraform plan |   on main.tf line 14, in locals:
 2024/09/06 16:24:38 Terraform plan |   14:   kms_key_crn = var.existing_kms_key_crn != null ? var.existing_kms_key_crn : module.kms[0].keys[format("%!s(MISSING).%!s(MISSING)", local.elasticsearch_key_ring_name, local.elasticsearch_key_name)].crn
 2024/09/06 16:24:38 Terraform plan |     ├────────────────
 2024/09/06 16:24:38 Terraform plan |     │ module.kms is empty tuple
 2024/09/06 16:24:38 Terraform plan | 
 2024/09/06 16:24:38 Terraform plan | The given key does not identify an element in this collection value: the
 2024/09/06 16:24:38 Terraform plan | collection has no elements.

https://github.com/terraform-ibm-modules/terraform-ibm-icd-elasticsearch/blob/5e64d635bbd7f660a61b264518913ec74aba5248/solutions/standard/main.tf#L14

terraform-ibm-modules-ops commented 1 month ago

:tada: This issue has been resolved in version 1.19.9 :tada:

The release is available on:

Your semantic-release bot :package::rocket: