Skip to content

Commit c509e48

Browse files
authored
INTMDB-547: 1005 - Enhance docs for mongodbatlas cloud_backup_schedule (#1007)
* Updates documenation for mongodbatlas_cloud_backup_schedule by adding more information about possible values for frequency_type, frequency_interval, retention_unit and retention_value. * Updates documenation for mongodbatlas_cloud_backup_schedule by adding more information about possible values for frequency_type, frequency_interval, retention_unit and retention_value. * Adds comments to the examples for more context * Removes unnecessary colons. * Fixed spelling mistake
1 parent 3e27f17 commit c509e48

File tree

2 files changed

+47
-41
lines changed

2 files changed

+47
-41
lines changed

website/docs/d/cloud_backup_schedule.html.markdown

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -69,37 +69,36 @@ In addition to all arguments above, the following attributes are exported:
6969
### Export
7070
* `export_bucket_id` - Unique identifier of the mongodbatlas_cloud_backup_snapshot_export_bucket export_bucket_id value.
7171
* `frequency_type` - Frequency associated with the export snapshot item.
72+
7273
### Policy Item Hourly
73-
*
7474
* `id` - Unique identifier of the backup policy item.
75-
* `frequency_type` - Frequency associated with the backup policy item.
76-
* `frequency_interval` - Desired frequency of the new backup policy item specified by `frequency_type`.
77-
* `retention_unit` - Scope of the backup policy item: days, weeks, or months.
75+
* `frequency_type` - Frequency associated with the backup policy item. For hourly policies, the frequency type is defined as `hourly`. Note that this is a read-only value and not required in plan files - its value is implied from the policy resource type.
76+
* `frequency_interval` - Desired frequency of the new backup policy item specified by `frequency_type` (hourly in this case). The supported values for hourly policies are `1`, `2`, `4`, `6`, `8` or `12` hours. Note that `12` hours is the only accepted value for NVMe clusters.
77+
* `retention_unit` - Scope of the backup policy item: `days`, `weeks`, or `months`.
7878
* `retention_value` - Value to associate with `retention_unit`.
7979

8080
### Policy Item Daily
81-
*
8281
* `id` - Unique identifier of the backup policy item.
83-
* `frequency_type` - Frequency associated with the backup policy item.
84-
* `frequency_interval` - Desired frequency of the new backup policy item specified by `frequency_type`.
85-
* `retention_unit` - Scope of the backup policy item: days, weeks, or months.
86-
* `retention_value` - Value to associate with `retention_unit`.
82+
* `frequency_type` - Frequency associated with the backup policy item. For daily policies, the frequency type is defined as `daily`. Note that this is a read-only value and not required in plan files - its value is implied from the policy resource type.
83+
* `frequency_interval` - Desired frequency of the new backup policy item specified by `frequency_type` (daily in this case). The only supported value for daily policies is `1` day.
84+
* `retention_unit` - Scope of the backup policy item: `days`, `weeks`, or `months`.
85+
* `retention_value` - Value to associate with `retention_unit`. Note that for less frequent policy items, Atlas requires that you specify a retention period greater than or equal to the retention period specified for more frequent policy items. For example: If the hourly policy item specifies a retention of two days, the daily retention policy must specify two days or greater.
8786

8887
### Policy Item Weekly
89-
*
9088
* `id` - Unique identifier of the backup policy item.
91-
* `frequency_type` - Frequency associated with the backup policy item.
92-
* `frequency_interval` - Desired frequency of the new backup policy item specified by `frequency_type`.
93-
* `retention_unit` - Scope of the backup policy item: days, weeks, or months.
94-
* `retention_value` - Value to associate with `retention_unit`.
89+
* `frequency_type` - Frequency associated with the backup policy item. For weekly policies, the frequency type is defined as `weekly`. Note that this is a read-only value and not required in plan files - its value is implied from the policy resource type.
90+
* `frequency_interval` - Desired frequency of the new backup policy item specified by `frequency_type` (weekly in this case). The supported values for weekly policies are `1` through `7`, where `1` represents Monday and `7` represents Sunday.
91+
* `retention_unit` - Scope of the backup policy item: `days`, `weeks`, or `months`.
92+
* `retention_value` - Value to associate with `retention_unit`. Weekly policy must have retention of at least 7 days or 1 week. Note that for less frequent policy items, Atlas requires that you specify a retention period greater than or equal to the retention period specified for more frequent policy items. For example: If the daily policy item specifies a retention of two weeks, the weekly retention policy must specify two weeks or greater.
9593

9694
### Policy Item Monthly
97-
*
9895
* `id` - Unique identifier of the backup policy item.
99-
* `frequency_type` - Frequency associated with the backup policy item.
100-
* `frequency_interval` - Desired frequency of the new backup policy item specified by `frequency_type`.
101-
* `retention_unit` - Scope of the backup policy item: days, weeks, or months.
102-
* `retention_value` - Value to associate with `retention_unit`.
96+
* `frequency_type` - Frequency associated with the backup policy item. For monthly policies, the frequency type is defined as `monthly`. Note that this is a read-only value and not required in plan files - its value is implied from the policy resource type.
97+
* `frequency_interval` - Desired frequency of the new backup policy item specified by `frequency_type` (monthly in this case). The supported values for weekly policies are
98+
* `1` through `28` where the number represents the day of the month i.e. `1` is the first of the month and `5` is the fifth day of the month.
99+
* `40` represents the last day of the month (depending on the month).
100+
* `retention_unit` - Scope of the backup policy item: `days`, `weeks`, or `months`.
101+
* `retention_value` - Value to associate with `retention_unit`. Monthly policy must have retention days of at least 31 days or 5 weeks or 1 month. Note that for less frequent policy items, Atlas requires that you specify a retention period greater than or equal to the retention period specified for more frequent policy items. For example: If the weekly policy item specifies a retention of two weeks, the montly retention policy must specify two weeks or greater.
103102

104103
### Snapshot Distribution
105104
*

website/docs/r/cloud_backup_schedule.html.markdown

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ description: |-
1010

1111
`mongodbatlas_cloud_backup_schedule` provides a cloud backup schedule resource. The resource lets you create, read, update and delete a cloud backup schedule.
1212

13-
-> **NOTE:** Groups and projects are synonymous terms. You may find `groupId` in the official documentation.
13+
-> **NOTE** Groups and projects are synonymous terms. You may find `groupId` in the official documentation.
1414

15-
-> **API Key Access List**: This resource requires an Atlas API Access Key List to utilize this feature. This means to manage this resources you must have the IP address or CIDR block that the Terraform connection is coming from added to the Atlas API Key Access List of the Atlas API key you are using. See [Resources that require API Key List](https://www.mongodb.com/docs/atlas/configure-api-access/#use-api-resources-that-require-an-access-list) for details.
15+
-> **API Key Access List** This resource requires an Atlas API Access Key List to utilize this feature. This means to manage this resources you must have the IP address or CIDR block that the Terraform connection is coming from added to the Atlas API Key Access List of the Atlas API key you are using. See [Resources that require API Key List](https://www.mongodb.com/docs/atlas/configure-api-access/#use-api-resources-that-require-an-access-list) for details.
1616

1717
In the Terraform MongoDB Atlas Provider 1.0.0 we have re-architected the way in which Cloud Backup Policies are manged with Terraform to significantly reduce the complexity. Due to this change we've provided multiple examples below to help express how this new resource functions.
1818

@@ -113,22 +113,23 @@ resource "mongodbatlas_cloud_backup_schedule" "test" {
113113
114114
// This will now add the desired policy items to the existing mongodbatlas_cloud_backup_schedule resource
115115
policy_item_hourly {
116-
frequency_interval = 1
116+
frequency_interval = 1 #accepted values = 1, 2, 4, 6, 8, 12 -> every n hours
117117
retention_unit = "days"
118118
retention_value = 1
119119
}
120120
policy_item_daily {
121-
frequency_interval = 1
121+
frequency_interval = 1 #accepted values = 1 -> every 1 day
122122
retention_unit = "days"
123123
retention_value = 2
124124
}
125125
policy_item_weekly {
126-
frequency_interval = 4
126+
frequency_interval = 4 # accepted values = 1 to 7 -> every 1=Monday,2=Tuesday,3=Wednesday,4=Thursday,5=Friday,6=Saturday,7=Sunday day of the week
127127
retention_unit = "weeks"
128128
retention_value = 3
129129
}
130130
policy_item_monthly {
131-
frequency_interval = 5
131+
frequency_interval = 5 # accepted values = 1 to 28 -> 1 to 28 every nth day of the month
132+
# accepted values = 40 -> every last day of the month
132133
retention_unit = "months"
133134
retention_value = 4
134135
}
@@ -206,28 +207,34 @@ resource "mongodbatlas_cloud_backup_schedule" "test" {
206207
* `frequency_type` - Frequency associated with the export snapshot item.
207208

208209
### Policy Item Hourly
209-
*
210-
* `frequency_interval` - (Required) Desired frequency of the new backup policy item specified by `frequency_type`.
211-
* `retention_unit` - (Required) Scope of the backup policy item: days, weeks, or months.
212-
* `retention_value` - (Required) Value to associate with `retention_unit`.
210+
* `id` - Unique identifier of the backup policy item.
211+
* `frequency_type` - Frequency associated with the backup policy item. For hourly policies, the frequency type is defined as `hourly`. Note that this is a read-only value and not required in plan files - its value is implied from the policy resource type.
212+
* `frequency_interval` - Desired frequency of the new backup policy item specified by `frequency_type` (hourly in this case). The supported values for hourly policies are `1`, `2`, `4`, `6`, `8` or `12` hours. Note that `12` hours is the only accepted value for NVMe clusters.
213+
* `retention_unit` - Scope of the backup policy item: `days`, `weeks`, or `months`.
214+
* `retention_value` - Value to associate with `retention_unit`.
213215

214216
### Policy Item Daily
215-
*
216-
* `frequency_interval` - (Required) Desired frequency of the new backup policy item specified by `frequency_type`.
217-
* `retention_unit` - (Required) Scope of the backup policy item: days, weeks, or months.
218-
* `retention_value` - (Required) Value to associate with `retention_unit`.
217+
* `id` - Unique identifier of the backup policy item.
218+
* `frequency_type` - Frequency associated with the backup policy item. For daily policies, the frequency type is defined as `daily`. Note that this is a read-only value and not required in plan files - its value is implied from the policy resource type.
219+
* `frequency_interval` - Desired frequency of the new backup policy item specified by `frequency_type` (daily in this case). The only supported value for daily policies is `1` day.
220+
* `retention_unit` - Scope of the backup policy item: `days`, `weeks`, or `months`.
221+
* `retention_value` - Value to associate with `retention_unit`. Note that for less frequent policy items, Atlas requires that you specify a retention period greater than or equal to the retention period specified for more frequent policy items. For example: If the hourly policy item specifies a retention of two days, the daily retention policy must specify two days or greater.
219222

220223
### Policy Item Weekly
221-
*
222-
* `frequency_interval` - (Required) Desired frequency of the new backup policy item specified by `frequency_type`.
223-
* `retention_unit` - (Required) Scope of the backup policy item: days, weeks, or months.
224-
* `retention_value` - (Required) Value to associate with `retention_unit`.
224+
* `id` - Unique identifier of the backup policy item.
225+
* `frequency_type` - Frequency associated with the backup policy item. For weekly policies, the frequency type is defined as `weekly`. Note that this is a read-only value and not required in plan files - its value is implied from the policy resource type.
226+
* `frequency_interval` - Desired frequency of the new backup policy item specified by `frequency_type` (weekly in this case). The supported values for weekly policies are `1` through `7`, where `1` represents Monday and `7` represents Sunday.
227+
* `retention_unit` - Scope of the backup policy item: `days`, `weeks`, or `months`.
228+
* `retention_value` - Value to associate with `retention_unit`. Weekly policy must have retention of at least 7 days or 1 week. Note that for less frequent policy items, Atlas requires that you specify a retention period greater than or equal to the retention period specified for more frequent policy items. For example: If the daily policy item specifies a retention of two weeks, the weekly retention policy must specify two weeks or greater.
225229

226230
### Policy Item Monthly
227-
*
228-
* `frequency_interval` - (Required) Desired frequency of the new backup policy item specified by `frequency_type`.
229-
* `retention_unit` - (Required) Scope of the backup policy item: days, weeks, or months.
230-
* `retention_value` - (Required) Value to associate with `retention_unit`.
231+
* `id` - Unique identifier of the backup policy item.
232+
* `frequency_type` - Frequency associated with the backup policy item. For monthly policies, the frequency type is defined as `monthly`. Note that this is a read-only value and not required in plan files - its value is implied from the policy resource type.
233+
* `frequency_interval` - Desired frequency of the new backup policy item specified by `frequency_type` (monthly in this case). The supported values for weekly policies are
234+
* `1` through `28` where the number represents the day of the month i.e. `1` is the first of the month and `5` is the fifth day of the month.
235+
* `40` represents the last day of the month (depending on the month).
236+
* `retention_unit` - Scope of the backup policy item: `days`, `weeks`, or `months`.
237+
* `retention_value` - Value to associate with `retention_unit`. Monthly policy must have retention days of at least 31 days or 5 weeks or 1 month. Note that for less frequent policy items, Atlas requires that you specify a retention period greater than or equal to the retention period specified for more frequent policy items. For example: If the weekly policy item specifies a retention of two weeks, the montly retention policy must specify two weeks or greater.
231238

232239
### Snapshot Distribution
233240
*

0 commit comments

Comments
 (0)