Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YCDOCIO-4375: Zone C has been replaced by zone D #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
18 changes: 9 additions & 9 deletions redis-cluster-sharded.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
locals {
zone_a_v4_cidr_blocks = "10.1.0.0/16" # Set the CIDR block for subnet in the ru-central1-a availability zone.
zone_b_v4_cidr_blocks = "10.2.0.0/16" # Set the CIDR block for subnet in the ru-central1-b availability zone.
zone_c_v4_cidr_blocks = "10.3.0.0/16" # Set the CIDR block for subnet in the ru-central1-c availability zone.
zone_d_v4_cidr_blocks = "10.3.0.0/16" # Set the CIDR block for subnet in the ru-central1-d availability zone.
# Yandex Managed Service for Valkey cluster.
redis_version = "6.2" # Set the Valkey version.
redis_version = "7.2" # Set the Valkey version.
password = "" # Set the cluster password.
shard_name1 = "shard1" # Set the name for the first shard.
shard_name2 = "shard2" # Set the name for the first shard.
Expand Down Expand Up @@ -41,12 +41,12 @@ resource "yandex_vpc_subnet" "subnet-b" {
v4_cidr_blocks = [local.zone_b_v4_cidr_blocks]
}

resource "yandex_vpc_subnet" "subnet-c" {
description = "Subnet in the ru-central1-c availability zone"
name = "subnet-c"
zone = "ru-central1-c"
resource "yandex_vpc_subnet" "subnet-d" {
description = "Subnet in the ru-central1-d availability zone"
name = "subnet-d"
zone = "ru-central1-d"
network_id = yandex_vpc_network.network.id
v4_cidr_blocks = [local.zone_c_v4_cidr_blocks]
v4_cidr_blocks = [local.zone_d_v4_cidr_blocks]
}

resource "yandex_vpc_security_group" "security-group-redis" {
Expand Down Expand Up @@ -133,8 +133,8 @@ resource "yandex_mdb_redis_cluster" "redis-cluster" {
}

host {
zone = "ru-central1-c"
subnet_id = yandex_vpc_subnet.subnet-c.id
zone = "ru-central1-d"
subnet_id = yandex_vpc_subnet.subnet-d.id
shard_name = local.shard_name3
assign_public_ip = true # Required for connection from the Internet. For a method without VM.
}
Expand Down