File tree Expand file tree Collapse file tree 3 files changed +59
-7
lines changed Expand file tree Collapse file tree 3 files changed +59
-7
lines changed Original file line number Diff line number Diff line change 1+ ```release-note:new-resource
2+ resource/tencentcloud_cfs_auto_snapshot_policy: support set day_of_month and interval_days
3+ ```
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ Provides a resource to create a cfs auto_snapshot_policy
33
44Example Usage
55
6+ use day of week
7+
68```hcl
79resource "tencentcloud_cfs_auto_snapshot_policy" "auto_snapshot_policy" {
810 day_of_week = "1,2"
@@ -12,6 +14,29 @@ resource "tencentcloud_cfs_auto_snapshot_policy" "auto_snapshot_policy" {
1214}
1315```
1416
17+ use day of month
18+
19+ ```hcl
20+ resource "tencentcloud_cfs_auto_snapshot_policy" "auto_snapshot_policy" {
21+ hour = "2,3"
22+ policy_name = "policy_name"
23+ alive_days = 7
24+ day_of_month = "2,3,4"
25+ }
26+ ```
27+
28+ use interval days
29+
30+ ```hcl
31+ resource "tencentcloud_cfs_auto_snapshot_policy" "auto_snapshot_policy" {
32+ hour = "2,3"
33+ policy_name = "policy_name"
34+ alive_days = 7
35+ interval_days = 1
36+ }
37+ ```
38+
39+
1540Import
1641
1742cfs auto_snapshot_policy can be imported using the id, e.g.
@@ -43,12 +68,6 @@ func resourceTencentCloudCfsAutoSnapshotPolicy() *schema.Resource {
4368 State : schema .ImportStatePassthrough ,
4469 },
4570 Schema : map [string ]* schema.Schema {
46- "day_of_week" : {
47- Required : true ,
48- Type : schema .TypeString ,
49- Description : "The day of the week on which to repeat the snapshot operation." ,
50- },
51-
5271 "hour" : {
5372 Required : true ,
5473 Type : schema .TypeString ,
@@ -61,6 +80,12 @@ func resourceTencentCloudCfsAutoSnapshotPolicy() *schema.Resource {
6180 Description : "Policy name." ,
6281 },
6382
83+ "day_of_week" : {
84+ Optional : true ,
85+ Type : schema .TypeString ,
86+ Description : "The day of the week on which to repeat the snapshot operation." ,
87+ },
88+
6489 "alive_days" : {
6590 Optional : true ,
6691 Type : schema .TypeInt ,
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ Provides a resource to create a cfs auto_snapshot_policy
1313
1414## Example Usage
1515
16+ use day of week
17+
1618``` hcl
1719resource "tencentcloud_cfs_auto_snapshot_policy" "auto_snapshot_policy" {
1820 day_of_week = "1,2"
@@ -22,14 +24,36 @@ resource "tencentcloud_cfs_auto_snapshot_policy" "auto_snapshot_policy" {
2224}
2325```
2426
27+ use day of month
28+
29+ ``` hcl
30+ resource "tencentcloud_cfs_auto_snapshot_policy" "auto_snapshot_policy" {
31+ hour = "2,3"
32+ policy_name = "policy_name"
33+ alive_days = 7
34+ day_of_month = "2,3,4"
35+ }
36+ ```
37+
38+ use interval days
39+
40+ ``` hcl
41+ resource "tencentcloud_cfs_auto_snapshot_policy" "auto_snapshot_policy" {
42+ hour = "2,3"
43+ policy_name = "policy_name"
44+ alive_days = 7
45+ interval_days = 1
46+ }
47+ ```
48+
2549## Argument Reference
2650
2751The following arguments are supported:
2852
29- * ` day_of_week ` - (Required, String) The day of the week on which to repeat the snapshot operation.
3053* ` hour ` - (Required, String) The time point when to repeat the snapshot operation.
3154* ` alive_days ` - (Optional, Int) Snapshot retention period.
3255* ` day_of_month ` - (Optional, String) The specific day (day 1 to day 31) of the month on which to create a snapshot.
56+ * ` day_of_week ` - (Optional, String) The day of the week on which to repeat the snapshot operation.
3357* ` interval_days ` - (Optional, Int) The snapshot interval, in days.
3458* ` policy_name ` - (Optional, String) Policy name.
3559
You can’t perform that action at this time.
0 commit comments