Skip to content

Commit 1719b69

Browse files
Merge pull request #615 from RedisLabs/develop
New release: 2.1.2
2 parents 9888019 + c035f43 commit 1719b69

23 files changed

+570
-45
lines changed

.github/workflows/terraform_provider_pr.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,19 @@ jobs:
149149
go-version-file: go.mod
150150
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloud(PrivateServiceConnect_CRUDI|AclRule_CRUDI)"'
151151

152+
# TODO: remove this after release
153+
# qpf = query performance factor
154+
go_test_smoke_qpf:
155+
name: go test smoke qpf
156+
needs: [ go_build ]
157+
runs-on: ubuntu-latest
158+
steps:
159+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
160+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
161+
with:
162+
go-version-file: go.mod
163+
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloudProDatabase_qpf.*"'
164+
152165
tfproviderlint:
153166
name: tfproviderlint
154167
needs: [go_build]

docs/data-sources/rediscloud_private_service_connect_endpoints.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The `endpoints` object has these attributes:
3939
* `gcp_vpc_subnet_name` - The GCP Subnet name
4040
* `endpoint_connection_name` - The endpoint connection name
4141
* `status` - The endpoint status
42-
* `service_attachments` - The 40 service attachments that are created for the Private Service Connect endpoint, documented below
42+
* `service_attachments` - The service attachments that are created for the Private Service Connect endpoint, documented below
4343

4444
The `service_attachments` object has these attributes:
4545

docs/guides/migration-guide-v1.0.0.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ resource "rediscloud_subscription" "example" {
7070
7171
alert {
7272
name = "dataset-size"
73-
value = 40
73+
value = 1
7474
}
7575
}
7676
}
@@ -132,7 +132,7 @@ To use the latest schema, you need to modify the `rediscloud_subscription` resou
132132
133133
alert {
134134
name = "dataset-size"
135-
value = 40
135+
value = 1
136136
}
137137
}
138138
```

docs/resources/rediscloud_active_active_private_service_connect_endpoint.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ resource "rediscloud_active_active_subscription_regions" "regions" {
7979
}
8080
8181
locals {
82-
service_attachment_count = 40 # Each rediscloud_active_active_private_service_connect_endpoint will have exactly 40 service attachments
82+
service_attachment_count = 1 # Each rediscloud_active_active_private_service_connect_endpoint will have exactly 1 service attachment
8383
region_id = one([for r in rediscloud_active_active_subscription_regions.regions.region : r.region_id if r.region == var.gcp_region])
8484
}
8585

docs/resources/rediscloud_active_active_subscription_database.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ resource "rediscloud_active_active_subscription_database" "database-resource" {
5050
global_source_ips = ["192.168.0.0/16"]
5151
global_alert {
5252
name = "dataset-size"
53-
value = 40
53+
value = 1
5454
}
5555
5656
global_modules = ["RedisJSON"]
@@ -161,4 +161,4 @@ To update an existing configuration for a database which uses the `memory_limit_
161161
$ terraform state rm rediscloud_active_active_subscription_database.database-resource
162162
(Update the configuration to use `dataset_size_in_gb` instead of `memory_limit_in_gb`)
163163
$ terraform import rediscloud_active_active_subscription_database.database-resource 123456/12345678
164-
```
164+
```

docs/resources/rediscloud_private_service_connect_endpoint.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ resource "rediscloud_subscription" "subscription" {
4343
}
4444
4545
locals {
46-
service_attachment_count = 40 # Each rediscloud_private_service_connect_endpoint will have exactly 40 service attachments
46+
service_attachment_count = 1 # Each rediscloud_private_service_connect_endpoint will have exactly 1 service attachment
4747
}
4848
4949
resource "rediscloud_private_service_connect" "service" {
@@ -195,7 +195,7 @@ module "private_service_connect" {
195195
## Attribute Reference
196196

197197
* `private_service_connect_endpoint_id` - The ID of the Private Service Connect Endpoint
198-
* `service_attachments` - The 40 service attachments that are created for the Private Service Connect endpoint, documented below
198+
* `service_attachments` - The service attachment that is created for the Private Service Connect endpoint, documented below
199199

200200
The `service_attachments` object has these attributes:
201201

docs/resources/rediscloud_subscription_database.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ resource "rediscloud_subscription_database" "database-resource" {
6565
6666
alert {
6767
name = "dataset-size"
68-
value = 40
68+
value = 1
6969
}
7070
7171
tags = {
@@ -171,4 +171,4 @@ To update an existing configuration for a database which uses the `memory_limit_
171171
$ terraform state rm rediscloud_subscription_database.database-resource
172172
(Update the configuration to use `dataset_size_in_gb` instead of `memory_limit_in_gb`)
173173
$ terraform import rediscloud_subscription_database.database-resource 123456/12345678
174-
```
174+
```

provider/datasource_rediscloud_pro_database.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ func dataSourceRedisCloudProDatabase() *schema.Resource {
5959
Type: schema.TypeFloat,
6060
Computed: true,
6161
},
62+
"query_performance_factor": {
63+
Description: "Query performance factor for this specific database",
64+
Type: schema.TypeString,
65+
Computed: true,
66+
},
6267
"support_oss_cluster_api": {
6368
Description: "Supports the Redis open-source (OSS) Cluster API",
6469
Type: schema.TypeBool,
@@ -476,6 +481,10 @@ func dataSourceRedisCloudProDatabaseRead(ctx context.Context, d *schema.Resource
476481
return diag.FromErr(err)
477482
}
478483

484+
if err := d.Set("query_performance_factor", redis.String(*db.QueryPerformanceFactor)); err != nil {
485+
return diag.FromErr(err)
486+
}
487+
479488
return diags
480489
}
481490

provider/datasource_rediscloud_pro_database_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ func TestAccDataSourceRedisCloudProDatabase_basic(t *testing.T) {
4343
resource.TestCheckResourceAttrSet(dataSourceById, "public_endpoint"),
4444
resource.TestCheckResourceAttrSet(dataSourceById, "private_endpoint"),
4545
resource.TestCheckResourceAttr(dataSourceById, "enable_default_user", "true"),
46+
resource.TestCheckResourceAttr(dataSourceById, "query_performance_factor", "2x"),
4647

4748
resource.TestCheckResourceAttr(dataSourceByName, "name", "tf-database"),
4849
resource.TestCheckResourceAttr(dataSourceByName, "protocol", "redis"),
@@ -59,6 +60,7 @@ func TestAccDataSourceRedisCloudProDatabase_basic(t *testing.T) {
5960
resource.TestCheckResourceAttrSet(dataSourceByName, "public_endpoint"),
6061
resource.TestCheckResourceAttrSet(dataSourceByName, "private_endpoint"),
6162
resource.TestCheckResourceAttr(dataSourceByName, "enable_default_user", "true"),
63+
resource.TestCheckResourceAttr(dataSourceByName, "query_performance_factor", "2x"),
6264
),
6365
},
6466
},
@@ -94,6 +96,8 @@ resource "rediscloud_subscription" "example" {
9496
support_oss_cluster_api=true
9597
throughput_measurement_by = "operations-per-second"
9698
throughput_measurement_value = 1000
99+
query_performance_factor = "2x"
100+
modules = ["RediSearch"]
97101
}
98102
}
99103
resource "rediscloud_subscription_database" "example" {
@@ -108,6 +112,12 @@ resource "rediscloud_subscription_database" "example" {
108112
support_oss_cluster_api = true
109113
replication = false
110114
enable_default_user = true
115+
query_performance_factor = "2x"
116+
modules = [
117+
{
118+
name: "RediSearch"
119+
}
120+
]
111121
}
112122
113123
data "rediscloud_database" "example-by-id" {

provider/datasource_rediscloud_pro_subscription_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ resource "rediscloud_active_active_subscription_database" "example" {
167167
global_source_ips = ["192.168.0.0/16", "192.170.0.0/16"]
168168
global_alert {
169169
name = "dataset-size"
170-
value = 40
170+
value = 1
171171
}
172172
override_region {
173173
name = "us-east-1"

0 commit comments

Comments
 (0)