Skip to content

Commit 1d0d100

Browse files
authored
Update rediscloud_subscription_database.md (#323)
Documentation adjustments
1 parent 478f87f commit 1d0d100

File tree

1 file changed

+21
-23
lines changed

1 file changed

+21
-23
lines changed

docs/resources/rediscloud_subscription_database.md

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ data "rediscloud_cloud_account" "account" {
2121
provider_type = "AWS"
2222
}
2323
24-
resource "rediscloud_subscription" "example" {
24+
resource "rediscloud_subscription" "subscription-resource" {
2525
26-
name = "example"
26+
name = "subscription-name"
2727
payment_method = "credit-card"
2828
payment_method_id = data.rediscloud_payment_method.card.id
2929
memory_storage = "ram"
@@ -53,9 +53,9 @@ resource "rediscloud_subscription" "example" {
5353
}
5454
5555
// The primary database to provision
56-
resource "rediscloud_subscription_database" "example" {
57-
subscription_id = rediscloud_subscription.example.id
58-
name = "example-database"
56+
resource "rediscloud_subscription_database" "database-resource" {
57+
subscription_id = rediscloud_subscription.subscription-resource.id
58+
name = "database-name"
5959
protocol = "redis"
6060
memory_limit_in_gb = 1
6161
data_persistence = "none"
@@ -64,7 +64,6 @@ resource "rediscloud_subscription_database" "example" {
6464
support_oss_cluster_api = false
6565
external_endpoint_for_oss_cluster_api = false
6666
replication = false
67-
average_item_size_in_bytes = 0
6867
6968
modules = [
7069
{
@@ -79,20 +78,20 @@ resource "rediscloud_subscription_database" "example" {
7978
name = "dataset-size"
8079
value = 40
8180
}
82-
depends_on = [rediscloud_subscription.example]
81+
depends_on = [rediscloud_subscription.subscription-resource]
8382
8483
}
8584
8685
// An example of how a replica database can be provisioned
87-
resource "rediscloud_subscription_database" "example_replica" {
88-
subscription_id = rediscloud_subscription.example.id
89-
name = "example-replica"
86+
resource "rediscloud_subscription_database" "database-resource-replica" {
87+
subscription_id = rediscloud_subscription.subscription-resource.id
88+
name = "database-name-replica"
9089
protocol = "redis"
9190
memory_limit_in_gb = 1
9291
throughput_measurement_by = "operations-per-second"
9392
throughput_measurement_value = 10000
94-
replica_of = [format("redis://%s", rediscloud_subscription_database.example.public_endpoint)]
95-
depends_on = [rediscloud_subscription.example]
93+
replica_of = [format("redis://%s", rediscloud_subscription_database.database-resource.public_endpoint)]
94+
depends_on = [rediscloud_subscription.subscription-resource]
9695
9796
}
9897
```
@@ -101,9 +100,8 @@ resource "rediscloud_subscription_database" "example_replica" {
101100

102101
The following arguments are supported:
103102

104-
* `subscription_id`: (Required) The ID of the subscription to create the database in.
105-
* `name` - (Required) A meaningful name to identify the database.
106-
the top of the page for more information.
103+
* `subscription_id` - (Required) The ID of the subscription to create the database in
104+
* `name` - (Required) A meaningful name to identify the database
107105
* `throughput_measurement_by` - (Required) Throughput measurement method, (either ‘number-of-shards’ or ‘operations-per-second’)
108106
* `throughput_measurement_value` - (Required) Throughput value (as applies to selected measurement method)
109107
* `memory_limit_in_gb` - (Required) Maximum memory usage for this specific database
@@ -117,27 +115,27 @@ The following arguments are supported:
117115
database will be a replica of. If the URI provided is Redis Labs Cloud instance, only host and port should be provided.
118116
Cannot be enabled when `support_oss_cluster_api` is enabled.
119117
* `modules` - (Optional) A list of modules objects, documented below
120-
* `alert` - (Optional) Set of alerts to enable on the database, documented below
118+
* `alert` - (Optional) A block defining Redis database alert, documented below, can be specified multiple times
121119
* `data_persistence` - (Optional) Rate of database data persistence (in persistent storage). Default: ‘none’
122-
* `data_eviction` - (Optional) The data items eviction policy (either: 'allkeys-lru', 'allkeys-lfu', 'allkeys-random', 'volatile-lru', 'volatile-lfu', 'volatile-random', 'volatile-ttl' or 'noeviction'. Default: 'volatile-lru')
120+
* `data_eviction` - (Optional) The data items eviction policy (either: 'allkeys-lru', 'allkeys-lfu', 'allkeys-random', 'volatile-lru', 'volatile-lfu', 'volatile-random', 'volatile-ttl' or 'noeviction'). Default: 'volatile-lru'
123121
* `password` - (Optional) Password to access the database. If omitted, a random 32 character long alphanumeric password will be automatically generated
124122
* `replication` - (Optional) Databases replication. Default: ‘true’
125123
* `average_item_size_in_bytes` - (Optional) Relevant only to ram-and-flash clusters. Estimated average size (measured in bytes)
126124
of the items stored in the database. Default: 1000
127-
* `source_ips` - (Optional) Set of CIDR addresses to allow access to the database. Defaults to allowing traffic.
125+
* `source_ips` - (Optional) List of source IP addresses or subnet masks. If specified, Redis clients will be able to connect to this database only from within the specified source IP addresses ranges (example: [‘192.168.10.0/32’, ‘192.168.12.0/24’])
128126
* `hashing_policy` - (Optional) List of regular expression rules to shard the database by. See
129127
[the documentation on clustering](https://docs.redislabs.com/latest/rc/concepts/clustering/) for more information on the
130128
hashing policy. This cannot be set when `support_oss_cluster_api` is set to true.
131129
* `enable_tls` - (Optional) Use TLS for authentication. Default: ‘false’
132130

133131
The `alert` block supports:
134132

135-
* `name` (Required) Alert name
136-
* `value` (Required) Alert value
133+
* `name` (Required) - Alert name
134+
* `value` (Required) - Alert value
137135

138-
The `modules` attribute supports:
136+
The `modules` list supports:
139137

140-
* `name` (Required) Name of the Redis Labs database module to enable
138+
* `name` (Required) - Name of the Redis database module to enable
141139

142140
Example:
143141

@@ -170,6 +168,6 @@ The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/l
170168
`rediscloud_subscription_database` can be imported using the ID of the subscription and the ID of the database in the format {subscription ID}/{database ID}, e.g.
171169

172170
```
173-
$ terraform import rediscloud_subscription_database.example_database 123456/12345678
171+
$ terraform import rediscloud_subscription_database.database-resource 123456/12345678
174172
```
175173

0 commit comments

Comments
 (0)