Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INTMDB-244: add deprecation notes for cloud backup documentation #525

Merged
merged 14 commits into from
Aug 26, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ description: |-
Provides a Cloud Backup Snapshot Policy Datasource.
---


**WARNING:** This data source is deprecated, use `mongodbatlas_cloud_backup_schedule`

# mongodbatlas_cloud_provider_snapshot_backup_policy

`mongodbatlas_cloud_provider_snapshot_backup_policy` provides a Cloud Backup Snapshot Backup Policy datasource. An Atlas Cloud Backup Snapshot Policy provides the current snapshot schedule and retention settings for the cluster.
Expand Down
7 changes: 4 additions & 3 deletions website/docs/d/cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ resource "mongodbatlas_cluster" "test" {
read_only_nodes = 0
}
}
provider_backup_enabled = true
cloud_backup_config = true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which is it? In @coderGo93's add to the guide it states:
IMPORTANT In resource mongodbatlas_cluster the parameter provider_backup_enabled has been deprecated, use cloud_backup instead.
Now this has cloud_backup_config. Looks like cloud_backup: https://github.com/mongodb/terraform-provider-mongodbatlas/blob/master/mongodbatlas/resource_mongodbatlas_cluster.go#L151. Looking at rest maybe a typo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a typo (autocomplete feature don't help me in this)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it seems its a typo, it should be cloud_backup

auto_scaling_disk_gb_enabled = true

//Provider Settings "block"
Expand All @@ -57,7 +57,7 @@ data "mongodbatlas_cluster" "test" {
In addition to all arguments above, the following attributes are exported:

* `id` - The cluster ID.
* `mongo_db_version` - Version of MongoDB the cluster runs, in `major-version`.`minor-version` format.
* `mongo_db_version` - Version of MongoDB the cluster runs, in `major-version`.`minor-version` format.
* `mongo_uri` - Base connection string for the cluster. Atlas only displays this field after the cluster is operational, not while it builds the cluster.
* `mongo_uri_updated` - Lists when the connection string was last updated. The connection string changes, for example, if you change a replica set to a sharded cluster.
* `mongo_uri_with_options` - Describes connection string for connecting to the Atlas cluster. Includes the replicaSet, ssl, and authSource query parameters in the connection string with values appropriate for the cluster.
Expand Down Expand Up @@ -102,7 +102,8 @@ In addition to all arguments above, the following attributes are exported:
* `name` - Name of the cluster as it appears in Atlas.
* `mongo_db_major_version` - Indicates the version of the cluster to deploy.
* `num_shards` - Indicates whether the cluster is a replica set or a sharded cluster.
* `provider_backup_enabled` - Flag indicating if the cluster uses Cloud Backup Snapshots for backups.
* `provider_backup_enabled` - **(DEPRECATED)** Flag indicating if the cluster uses Cloud Backup Snapshots for backups.
* `cloud_backup` - Flag indicating if the cluster uses Cloud Backup Snapshots for backups.
* `provider_instance_size_name` - Atlas provides different instance sizes, each with a default storage capacity and RAM size.
* `provider_name` - Indicates the cloud service provider on which the servers are provisioned.
* `backing_provider_name` - Indicates Cloud service provider on which the server for a multi-tenant cluster is provisioned.
Expand Down
7 changes: 4 additions & 3 deletions website/docs/d/clusters.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ resource "mongodbatlas_cluster" "test" {
read_only_nodes = 0
}
}
provider_backup_enabled = true
cloud_backup = true
auto_scaling_disk_gb_enabled = true

//Provider Settings "block"
Expand All @@ -60,7 +60,7 @@ In addition to all arguments above, the following attributes are exported:
### Cluster

* `name` - Name of the cluster as it appears in Atlas.
* `mongo_db_version` - Version of MongoDB the cluster runs, in `major-version`.`minor-version` format.
* `mongo_db_version` - Version of MongoDB the cluster runs, in `major-version`.`minor-version` format.
* `mongo_uri` - Base connection string for the cluster. Atlas only displays this field after the cluster is operational, not while it builds the cluster.
* `mongo_uri_updated` - Lists when the connection string was last updated. The connection string changes, for example, if you change a replica set to a sharded cluster.
* `mongo_uri_with_options` - Describes connection string for connecting to the Atlas cluster. Includes the replicaSet, ssl, and authSource query parameters in the connection string with values appropriate for the cluster.
Expand Down Expand Up @@ -103,7 +103,8 @@ In addition to all arguments above, the following attributes are exported:
* `encryption_at_rest_provider` - Indicates whether Encryption at Rest is enabled or disabled.
* `mongo_db_major_version` - Indicates the version of the cluster to deploy.
* `num_shards` - Indicates whether the cluster is a replica set or a sharded cluster.
* `provider_backup_enabled` - Flag indicating if the cluster uses Cloud Backup Snapshots for backups.
* `provider_backup_enabled` - Flag indicating if the cluster uses Cloud Backup Snapshots for backups. **DEPRECATED** Use `cloud_backup` instead.
* `cloud_backup` - Flag indicating if the cluster uses Cloud Backup Snapshots for backups.
* `provider_instance_size_name` - Atlas provides different instance sizes, each with a default storage capacity and RAM size.
* `provider_name` - Indicates the cloud service provider on which the servers are provisioned.
* `backing_provider_name` - Indicates Cloud service provider on which the server for a multi-tenant cluster is provisioned.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ description: |-
Provides a Cloud Backup Snapshot Policy resource.
---

**WARNING:** This resource is deprecated, use `mongodbatlas_cloud_backup_schedule`

# mongodbatlas_cloud_provider_snapshot_backup_policy

`mongodbatlas_cloud_provider_snapshot_backup_policy` provides a resource that enables you to view and modify the snapshot schedule and retention settings for an Atlas cluster with Cloud Backup enabled. A default policy is created automatically when Cloud Backup is enabled for the cluster.
Expand Down
23 changes: 12 additions & 11 deletions website/docs/r/cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ resource "mongodbatlas_cluster" "cluster-test" {
read_only_nodes = 0
}
}
provider_backup_enabled = true
cloud_backup = true
auto_scaling_disk_gb_enabled = true
mongo_db_major_version = "4.2"

Expand All @@ -65,7 +65,7 @@ resource "mongodbatlas_cluster" "test" {
read_only_nodes = 0
}
}
provider_backup_enabled = true
cloud_backup = true
auto_scaling_disk_gb_enabled = true
mongo_db_major_version = "4.2"

Expand All @@ -92,7 +92,7 @@ resource "mongodbatlas_cluster" "test" {
read_only_nodes = 0
}
}
provider_backup_enabled = true
cloud_backup = true
auto_scaling_disk_gb_enabled = true
mongo_db_major_version = "4.2"

Expand All @@ -111,7 +111,7 @@ resource "mongodbatlas_cluster" "cluster-test" {
name = "cluster-test-multi-region"
disk_size_gb = 100
num_shards = 1
provider_backup_enabled = true
cloud_backup = true
cluster_type = "REPLICASET"

//Provider Settings "block"
Expand Down Expand Up @@ -150,7 +150,7 @@ resource "mongodbatlas_cluster" "cluster-test" {
name = "cluster-test-global"
disk_size_gb = 80
num_shards = 1
provider_backup_enabled = true
cloud_backup = true
cluster_type = "GEOSHARDED"

//Provider Settings "block"
Expand Down Expand Up @@ -279,11 +279,11 @@ But in order to explicitly change `provider_instance_size_name` comment the `lif

* `backup_enabled` - (Optional) Legacy Backup - Set to true to enable Atlas legacy backups for the cluster.
**Important** - MongoDB deprecated the Legacy Backup feature. Clusters that use Legacy Backup can continue to use it. MongoDB recommends using [Cloud Backups](https://docs.atlas.mongodb.com/backup/cloud-backup/overview/).
* Any net new Atlas clusters of any type do not support this parameter. These clusters must use Cloud Backup, `provider_backup_enabled`, to enable Cloud Backup. If you create a new Atlas cluster and set `backup_enabled` to true, the Provider will respond with an error. This change doesn’t affect existing clusters that use legacy backups.
* Any net new Atlas clusters of any type do not support this parameter. These clusters must use Cloud Backup, `cloud_backup`, to enable Cloud Backup. If you create a new Atlas cluster and set `backup_enabled` to true, the Provider will respond with an error. This change doesn’t affect existing clusters that use legacy backups.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Any net new Atlas clusters of any type do not support this parameter. These clusters must use Cloud Backup, `cloud_backup`, to enable Cloud Backup. If you create a new Atlas cluster and set `backup_enabled` to true, the Provider will respond with an error. This change doesn’t affect existing clusters that use legacy backups.
* New Atlas clusters of any type do not support this parameter. These clusters must use Cloud Backup, `cloud_backup`, to enable Cloud Backup. If you create a new Atlas cluster and set `backup_enabled` to true, the Provider will respond with an error. This change doesn’t affect existing clusters that use legacy backups.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already fixed this :D

* Setting this value to false to disable legacy backups for the cluster will let Atlas delete any stored snapshots. In order to preserve the legacy backups snapshots, disable the legacy backups and enable the cloud backups in the single **terraform apply** action.
```
backup_enabled = "false"
provider_backup_enabled = "true"
cloud_backup = "true"
```
* The default value is false. M10 and above only.

Expand All @@ -307,10 +307,11 @@ But in order to explicitly change `provider_instance_size_name` comment the `lif
* `encryption_at_rest_provider` - (Optional) Possible values are AWS, GCP, AZURE or NONE. Only needed if you desire to manage the keys, see [Encryption at Rest using Customer Key Management](https://docs.atlas.mongodb.com/security-aws-kms/) for complete documentation. You must configure encryption at rest for the Atlas project before enabling it on any cluster in the project. For complete documentation on configuring Encryption at Rest, see Encryption at Rest using Customer Key Management. Requires M10 or greater. and for legacy backups, backup_enabled, to be false or omitted. **Note: Atlas encrypts all cluster storage and snapshot volumes, securing all cluster data on disk: a concept known as encryption at rest, by default**.
* `mongo_db_major_version` - (Optional) Version of the cluster to deploy. Atlas supports the following MongoDB versions for M10+ clusters: `3.6`, `4.0`, or `4.2`. You must set this value to `4.2` if `provider_instance_size_name` is either M2 or M5.
* `num_shards` - (Optional) Selects whether the cluster is a replica set or a sharded cluster. If you use the replicationSpecs parameter, you must set num_shards.
* `pit_enabled` - (Optional) - Flag that indicates if the cluster uses Continuous Cloud Backup. If set to true, provider_backup_enabled must also be set to true.
* `provider_backup_enabled` - (Optional) Flag indicating if the cluster uses Cloud Backup for backups.
* `pit_enabled` - (Optional) - Flag that indicates if the cluster uses Continuous Cloud Backup. If set to true, cloud_backup must also be set to true.
* `provider_backup_enabled` - (Optional) Flag indicating if the cluster uses Cloud Backup for backups. **Deprecated** use `cloud_backup` instead.
* `cloud_backup` - (Optional) Flag indicating if the cluster uses Cloud Backup for backups.

If true, the cluster uses Cloud Backup for backups. If provider_backup_enabled and backup_enabled are false, the cluster does not use Atlas backups.
If true, the cluster uses Cloud Backup for backups. If cloud_backup and backup_enabled are false, the cluster does not use Atlas backups.

You cannot enable cloud backup if you have an existing cluster in the project with legacy backup enabled.

Expand Down Expand Up @@ -505,7 +506,7 @@ In addition to all arguments above, the following attributes are exported:
- REPAIRING

### Cloud Backup Policy
themantissa marked this conversation as resolved.
Show resolved Hide resolved
Cloud Backup Policy will be added if provider_backup_enabled is enabled because MongoDB Atlas automatically creates a default policy, if not, returned values will be empty.
Cloud Backup Policy will be added if provider_backup_enabled or cloud_backup is enabled because MongoDB Atlas automatically creates a default policy, if not, returned values will be empty.

* `snapshot_backup_policy` - current snapshot schedule and retention settings for the cluster.

Expand Down