Skip to content

Commit

Permalink
doc(redis): fixed markdownlint errors in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Mia-Cross committed Jun 14, 2022
1 parent 3f7e1a5 commit 5219351
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions docs/resources/redis_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ resource "scaleway_redis_cluster" "main" {
tags = [ "test", "redis" ]
cluster_size = 1
tls_enabled = "true"
acl {
ip = "0.0.0.0/0"
description = "Allow all"
Expand All @@ -40,14 +40,16 @@ resource "scaleway_redis_cluster" "main" {
node_type = "MDB-BETA-M"
user_name = "my_initial_user"
password = "thiZ_is_v&ry_s3cret"
settings = {
"maxclients" = "1000"
"tcp-keepalive" = "120"
}
}
```

### With a private network

```hcl
resource "scaleway_vpc_private_network" "pn" {
name = "private-network"
Expand Down Expand Up @@ -106,28 +108,32 @@ The following arguments are supported:

- `acl` - (Optional) List of acl rules, this is cluster's authorized IPs.

~> The `acl` block supports:
~> The `acl` block supports:

- `ip` - (Required) The ip range to whitelist in [CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation)
- `description` - (Optional) A text describing this rule. Default description: `Allow IP`
- `ip` - (Required) The ip range to whitelist in [CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation)
- `description` - (Optional) A text describing this rule. Default description: `Allow IP`

- `settings` - (Optional) Map of settings for redis cluster. Available settings can be found by listing redis versions with scaleway API or CLI

- `private_network` - (Optional) Describes the private network you want to connect to your cluster. If not set, a public network will be provided.

~> The `private_network` block supports :
- `id` - (Required) The UUID of the private network resource.
- `service_ips` - (Required) Endpoint IPv4 addresses in [CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation). You must provide at least one IP per node.

- `id` - (Required) The UUID of the private network resource.
- `service_ips` - (Required) Endpoint IPv4 addresses in [CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation). You must provide at least one IP per node.

~> **Important:** The way to use private networks differs whether you are using redis in standalone or cluster mode.

- Standalone mode (`cluster_size` = 1) : you can attach as many private networks as you want (each must be a separate block). If you detach your only private network, your cluster won't be reachable until you define a new private or public network. You can modify your private_network and its specs, you can have both a private and public network side by side.

- Cluster mode (`cluster_size` > 1) : you can define a single private network as you create your cluster, you won't be able to edit or detach it afterwards, unless you create another cluster. Your `service_ips` must be listed as follows:

```hcl
service_ips = [
"10.12.1.10/20",
"10.12.1.10/20",
"10.12.1.11/20",
"10.12.1.12/20",
]
]
```

## Attributes Reference
Expand Down

0 comments on commit 5219351

Please sign in to comment.