Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/upgrading_to_sql_db_4.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ The new `read_replicas` variable is used to manage all replica configuration. In

- You must have `read_replica_size` objects inside `read_replicas`
- You must use the full `zone` id which includes the region e.g. `europe-west1-c` instead of `c`
- You must not have used `random_instance_name`

**Important:** If you have enabled `random_instance_name` then you will need to manually migrate state because the migration script and module does not include the random string as part of the replica state key.

```diff
module "test" {
Expand Down
2 changes: 1 addition & 1 deletion modules/mysql/read_replica.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

locals {
replicas = {
for x in var.read_replicas : "${local.master_instance_name}-replica${var.read_replica_name_suffix}${x.name}" => x
for x in var.read_replicas : "${var.name}-replica${var.read_replica_name_suffix}${x.name}" => x
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/postgresql/read_replica.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

locals {
replicas = {
for x in var.read_replicas : "${local.master_instance_name}-replica${var.read_replica_name_suffix}${x.name}" => x
for x in var.read_replicas : "${var.name}-replica${var.read_replica_name_suffix}${x.name}" => x
}
}

Expand Down