Skip to content

Commit 57c0693

Browse files
committed
fix: query performance factor is no longer forcenew
1 parent c53a9b8 commit 57c0693

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

provider/pro/resource_rediscloud_pro_database.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ func ResourceRedisCloudProDatabase() *schema.Resource {
230230
Type: schema.TypeString,
231231
Optional: true,
232232
Computed: true,
233-
ForceNew: true,
234233
ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) {
235234
v := val.(string)
236235
matched, err := regexp.MatchString(`^([2468])x$`, v)

provider/resource_rediscloud_pro_database_qpf_test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,11 @@ func TestAccResourceRedisCloudProDatabase_qpf(t *testing.T) {
130130
),
131131
},
132132

133-
// Test plan to ensure query_performance_factor change forces a new resource
133+
// Test that query_performance_factor can be updated without forcing replacement
134134
{
135-
Config: formatDatabaseConfig(name, testCloudAccountName, password, "2x", `modules = [{ name = "RediSearch" }]`),
136-
PlanOnly: true, // Runs terraform plan without applying
137-
ExpectNonEmptyPlan: true, // Ensures that a change is detected
138-
Check: resource.ComposeTestCheckFunc(
135+
Config: formatDatabaseConfig(name, testCloudAccountName, password, "2x", `modules = [{ name = "RediSearch" }]`),
136+
Check: resource.ComposeAggregateTestCheckFunc(
137+
resource.TestCheckResourceAttr("rediscloud_subscription_database.example", "name", "example"),
139138
resource.TestCheckResourceAttr("rediscloud_subscription_database.example", "query_performance_factor", "2x"),
140139
),
141140
},

0 commit comments

Comments
 (0)