diff --git a/ibm_catalog.json b/ibm_catalog.json index 31e44513..fbe1e9cf 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -287,6 +287,9 @@ }, { "key": "backup_crn" + }, + { + "key": "remote_leader_crn" } ] } diff --git a/modules/fscloud/README.md b/modules/fscloud/README.md index a43ffbe3..33a8cb63 100644 --- a/modules/fscloud/README.md +++ b/modules/fscloud/README.md @@ -45,6 +45,7 @@ No resources. | [members](#input\_members) | Allocated number of members. Members can be scaled up but not down. | `number` | `3` | no | | [mysql\_version](#input\_mysql\_version) | Version of the MySQL instance. If no value is passed, the current preferred version of IBM Cloud Databases is used. | `string` | `null` | no | | [region](#input\_region) | The region where you want to deploy your instance. Must be the same region as the Hyper Protect Crypto Services instance. | `string` | `"us-south"` | no | +| [remote\_leader\_crn](#input\_remote\_leader\_crn) | A CRN of the leader database to make the replica(read-only) deployment. The leader database is created by a database deployment with the same service ID. A read-only replica is set up to replicate all of your data from the leader deployment to the replica deployment by using asynchronous replication. For more information, see https://cloud.ibm.com/docs/databases-for-mysql?topic=databases-for-mysql-read-replicas | `string` | `null` | no | | [resource\_group\_id](#input\_resource\_group\_id) | The resource group ID where the MySQL instance will be created. | `string` | n/a | yes | | [resource\_tags](#input\_resource\_tags) | Optional list of tags to be added to the MySQL instance. | `list(string)` | `[]` | no | | [service\_credential\_names](#input\_service\_credential\_names) | Map of name, role for service credentials that you want to create for the database | `map(string)` | `{}` | no | diff --git a/modules/fscloud/main.tf b/modules/fscloud/main.tf index ae672472..4bcbbb7d 100644 --- a/modules/fscloud/main.tf +++ b/modules/fscloud/main.tf @@ -24,4 +24,5 @@ module "mysql_db" { users = var.users service_credential_names = var.service_credential_names auto_scaling = var.auto_scaling + remote_leader_crn = var.remote_leader_crn } diff --git a/modules/fscloud/variables.tf b/modules/fscloud/variables.tf index 4af600de..c5e53a09 100644 --- a/modules/fscloud/variables.tf +++ b/modules/fscloud/variables.tf @@ -24,6 +24,12 @@ variable "region" { default = "us-south" } +variable "remote_leader_crn" { + type = string + description = "A CRN of the leader database to make the replica(read-only) deployment. The leader database is created by a database deployment with the same service ID. A read-only replica is set up to replicate all of your data from the leader deployment to the replica deployment by using asynchronous replication. For more information, see https://cloud.ibm.com/docs/databases-for-mysql?topic=databases-for-mysql-read-replicas" + default = null +} + ############################################################################## # ICD hosting model properties ############################################################################## diff --git a/solutions/standard/main.tf b/solutions/standard/main.tf index 0d832273..1eb19d60 100644 --- a/solutions/standard/main.tf +++ b/solutions/standard/main.tf @@ -266,6 +266,7 @@ module "mysql" { auto_scaling = var.auto_scaling service_credential_names = var.service_credential_names backup_crn = var.backup_crn + remote_leader_crn = var.remote_leader_crn } locals { diff --git a/solutions/standard/variables.tf b/solutions/standard/variables.tf index 22dd6175..c188cd33 100644 --- a/solutions/standard/variables.tf +++ b/solutions/standard/variables.tf @@ -36,6 +36,12 @@ variable "region" { default = "us-south" } +variable "remote_leader_crn" { + type = string + description = "A CRN of the leader database to make the replica(read-only) deployment. The leader database is created by a database deployment with the same service ID. A read-only replica is set up to replicate all of your data from the leader deployment to the replica deployment by using asynchronous replication. [Learn more](https://cloud.ibm.com/docs/databases-for-mysql?topic=databases-for-mysql-read-replicas)" + default = null +} + variable "mysql_version" { description = "The version of the Databases for MySQL instance. If no value is specified, the current preferred version of Databases for MySQL is used." type = string