Skip to content

Commit 26c25af

Browse files
Switch from an explicit default to O+C for redis readReplicasMode (#5899) (#11420)
Signed-off-by: Modular Magician <[email protected]>
1 parent a61828a commit 26c25af

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.changelog/5899.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
redis: fixed an issue where older redis instances had a dangerous diff on the field `read_replicas_mode`, adding a default of `READ_REPLICAS_DISABLED`. Now, if the field is not set in config, the value of the field will keep the old value from state.
3+
```

google/resource_redis_instance.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ resolution and up to nine fractional digits.`,
285285
},
286286
"read_replicas_mode": {
287287
Type: schema.TypeString,
288+
Computed: true,
288289
Optional: true,
289290
ForceNew: true,
290291
ValidateFunc: validateEnum([]string{"READ_REPLICAS_DISABLED", "READ_REPLICAS_ENABLED", ""}),
@@ -293,8 +294,7 @@ If not set, Memorystore Redis backend will default to READ_REPLICAS_DISABLED.
293294
- READ_REPLICAS_DISABLED: If disabled, read endpoint will not be provided and the
294295
instance cannot scale up or down the number of replicas.
295296
- READ_REPLICAS_ENABLED: If enabled, read endpoint will be provided and the instance
296-
can scale up and down the number of replicas. Default value: "READ_REPLICAS_DISABLED" Possible values: ["READ_REPLICAS_DISABLED", "READ_REPLICAS_ENABLED"]`,
297-
Default: "READ_REPLICAS_DISABLED",
297+
can scale up and down the number of replicas. Possible values: ["READ_REPLICAS_DISABLED", "READ_REPLICAS_ENABLED"]`,
298298
},
299299
"redis_configs": {
300300
Type: schema.TypeMap,

website/docs/r/redis_instance.html.markdown

-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ The following arguments are supported:
313313
instance cannot scale up or down the number of replicas.
314314
- READ_REPLICAS_ENABLED: If enabled, read endpoint will be provided and the instance
315315
can scale up and down the number of replicas.
316-
Default value is `READ_REPLICAS_DISABLED`.
317316
Possible values are `READ_REPLICAS_DISABLED` and `READ_REPLICAS_ENABLED`.
318317

319318
* `region` -

0 commit comments

Comments
 (0)