@@ -14,52 +14,60 @@ subcategory: "Deprecated"
14
14
## Example Usage
15
15
16
16
``` terraform
17
- resource "mongodbatlas_cluster" "my_cluster" {
18
- project_id = "<PROJECT-ID>"
19
- name = "clusterTest"
20
-
21
- //Provider Settings "block"
22
- provider_name = "AWS"
23
- provider_region_name = "EU_CENTRAL_1"
24
- provider_instance_size_name = "M10"
25
- cloud_backup = true // enable cloud backup snapshots
17
+ resource "mongodbatlas_advanced_cluster" "my_cluster" {
18
+ project_id = "<PROJECT-ID>"
19
+ name = "clusterTest"
20
+ cluster_type = "REPLICASET"
21
+ backup_enabled = true # enable cloud backup snapshots
22
+
23
+ replication_specs {
24
+ region_configs {
25
+ priority = 7
26
+ provider_name = "AWS"
27
+ region_name = "EU_CENTRAL_1"
28
+ electable_specs {
29
+ instance_size = "M10"
30
+ node_count = 3
31
+ }
32
+ }
33
+ }
26
34
}
27
35
28
36
resource "mongodbatlas_cloud_provider_snapshot_backup_policy" "test" {
29
- project_id = mongodbatlas_cluster .my_cluster.project_id
30
- cluster_name = mongodbatlas_cluster .my_cluster.name
37
+ project_id = mongodbatlas_advanced_cluster .my_cluster.project_id
38
+ cluster_name = mongodbatlas_advanced_cluster .my_cluster.name
31
39
32
40
reference_hour_of_day = 3
33
41
reference_minute_of_hour = 45
34
42
restore_window_days = 4
35
43
36
44
37
45
policies {
38
- id = mongodbatlas_cluster .my_cluster.snapshot_backup_policy.0.policies.0.id
46
+ id = mongodbatlas_advanced_cluster .my_cluster.snapshot_backup_policy.0.policies.0.id
39
47
40
48
policy_item {
41
- id = mongodbatlas_cluster .my_cluster.snapshot_backup_policy.0.policies.0.policy_item.0.id
49
+ id = mongodbatlas_advanced_cluster .my_cluster.snapshot_backup_policy.0.policies.0.policy_item.0.id
42
50
frequency_interval = 1
43
51
frequency_type = "hourly"
44
52
retention_unit = "days"
45
53
retention_value = 1
46
54
}
47
55
policy_item {
48
- id = mongodbatlas_cluster .my_cluster.snapshot_backup_policy.0.policies.0.policy_item.1.id
56
+ id = mongodbatlas_advanced_cluster .my_cluster.snapshot_backup_policy.0.policies.0.policy_item.1.id
49
57
frequency_interval = 1
50
58
frequency_type = "daily"
51
59
retention_unit = "days"
52
60
retention_value = 2
53
61
}
54
62
policy_item {
55
- id = mongodbatlas_cluster .my_cluster.snapshot_backup_policy.0.policies.0.policy_item.2.id
63
+ id = mongodbatlas_advanced_cluster .my_cluster.snapshot_backup_policy.0.policies.0.policy_item.2.id
56
64
frequency_interval = 4
57
65
frequency_type = "weekly"
58
66
retention_unit = "weeks"
59
67
retention_value = 3
60
68
}
61
69
policy_item {
62
- id = mongodbatlas_cluster .my_cluster.snapshot_backup_policy.0.policies.0.policy_item.3.id
70
+ id = mongodbatlas_advanced_cluster .my_cluster.snapshot_backup_policy.0.policies.0.policy_item.3.id
63
71
frequency_interval = 5
64
72
frequency_type = "monthly"
65
73
retention_unit = "months"
0 commit comments