Skip to content

Commit c193ebf

Browse files
author
hellertang
authored
change backup_period to optional (#659)
1 parent abbfc2d commit c193ebf

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

tencentcloud/resource_tc_redis_backup_config.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ func resourceTencentCloudRedisBackupConfig() *schema.Resource {
6565
},
6666
"backup_period": {
6767
Type: schema.TypeSet,
68-
Required: true,
68+
Optional: true,
69+
Computed: true,
6970
Elem: &schema.Schema{Type: schema.TypeString},
71+
Deprecated: "It has been deprecated from version 1.58.2. It makes no difference to online config at all",
7072
Description: "Specifys which day the backup action should take place. Valid values: `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` and `Sunday`.",
7173
},
7274
},
@@ -139,6 +141,9 @@ func resourceTencentCloudRedisBackupConfigUpdate(d *schema.ResourceData, meta in
139141
}
140142
backupPeriods = append(backupPeriods, v.(string))
141143
}
144+
145+
backupPeriods = []string{"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}
146+
142147
if len(backupPeriods) == 0 {
143148
return fmt.Errorf("redis backup config[backup_period] can not empty")
144149
}

website/docs/r/redis_backup_config.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ resource "tencentcloud_redis_backup_config" "redislab" {
2525

2626
The following arguments are supported:
2727

28-
* `backup_period` - (Required) Specifys which day the backup action should take place. Valid values: `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` and `Sunday`.
2928
* `backup_time` - (Required) Specifys what time the backup action should take place. And the time interval should be one hour.
3029
* `redis_id` - (Required, ForceNew) ID of a redis instance to which the policy will be applied.
30+
* `backup_period` - (Optional, **Deprecated**) It has been deprecated from version 1.58.2. It makes no difference to online config at all Specifys which day the backup action should take place. Valid values: `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` and `Sunday`.
3131

3232
## Attributes Reference
3333

0 commit comments

Comments
 (0)