Skip to content

Commit

Permalink
Documentation added and tests slightly improved
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnSharpe committed Apr 16, 2024
1 parent 58441f4 commit 33eb2b1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/resources/rediscloud_active_active_subscription.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ resource "rediscloud_active_active_subscription" "subscription-resource" {
creation_plan {
memory_limit_in_gb = 1
quantity = 1
modules = ["RedisJSON"]
region {
region = "us-east-1"
networking_deployment_cidr = "192.168.0.0/24"
Expand Down Expand Up @@ -65,6 +66,7 @@ The `creation_plan` block supports:

* `memory_limit_in_gb` - (Required) Maximum memory usage that will be used for your largest planned database, including replication and other overhead
* `quantity` - (Required) The planned number of databases in the subscription.
* `modules` - (Optional) A list of modules to be enabled on all deployments of this database. Only `RedisJSON` is currently supported.

The creation_plan `region` block supports:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ resource "rediscloud_active_active_subscription_database" "database-resource" {
value = 40
}
global_modules = ["RedisJSON"]
override_region {
name = "us-east-2"
override_global_source_ips = ["192.10.0.0/16"]
Expand Down Expand Up @@ -91,7 +93,8 @@ The following arguments are supported:
* `global_data_persistence` - (Optional) Global rate of database data persistence (in persistent storage) of regions that dont override global settings. Default: 'none'
* `global_password` - (Optional) Password to access the database of regions that don't override global settings. If left empty, the password will be generated automatically
* `global_alert` - (Optional) A block defining Redis database alert of regions that don't override global settings, documented below, can be specified multiple times. (either: 'dataset-size', 'datasets-size', 'throughput-higher-than', 'throughput-lower-than', 'latency', 'syncsource-error', 'syncsource-lag' or 'connections-limit')
* `global_source_ips` - (Optional) List of source IP addresses or subnet masks of regions that don't override global settings. 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'])
* `global_modules` - (Optional) A list of modules to be enabled on all deployments of this database. Only `RedisJSON` is currently supported. Ignored after database creation.
* `global_source_ips` - (Optional) List of source IP addresses or subnet masks of regions that don't override global settings. 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'])
* `global_resp_version` - (Optional) Either 'resp2' or 'resp3'. Resp version for Crdb databases within the AA database. Must be compatible with Redis version.
* `port` - (Optional) TCP port on which the database is available - must be between 10000 and 19999. **Modifying this attribute will force creation of a new resource.**
* `override_region` - (Optional) Override region specific configuration, documented below
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func resourceRedisCloudActiveActiveSubscriptionDatabase() *schema.Resource {
},
},
"global_modules": {
Description: "Set of modules to enable on the database. This information is only used when creating a new database and any changes will be ignored after this.",
Description: "List of modules to enable on the database. This information is only used when creating a new database and any changes will be ignored after this.",
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ func TestAccResourceRedisCloudActiveActiveSubscription_CRUDI(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "creation_plan.#", "1"),
resource.TestCheckResourceAttr(resourceName, "creation_plan.0.memory_limit_in_gb", "1"),
resource.TestCheckResourceAttr(resourceName, "creation_plan.0.quantity", "1"),
resource.TestCheckResourceAttr(resourceName, "creation_plan.0.modules.#", "1"),
resource.TestCheckResourceAttr(resourceName, "creation_plan.0.modules.0", "RedisJSON"),
resource.TestCheckResourceAttr(resourceName, "creation_plan.0.region.#", "2"),
resource.TestCheckResourceAttr(resourceName, "creation_plan.0.region.0.write_operations_per_second", "1000"),
resource.TestCheckResourceAttr(resourceName, "creation_plan.0.region.0.read_operations_per_second", "1000"),
Expand Down

0 comments on commit 33eb2b1

Please sign in to comment.