You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* modified the cluster auto-scaling documentation to make it more clear
* modified the cluster auto-scaling documentation to make it more clear
* add examples for the database users scope
* add the database users scope example
* updated cluster resource documentation to switch from legacy to cloud backups
* updated cluster resources documentation for Azure disk type name
* add the newline at the end
This project aims to provide a very straight-forward example of setting up scope on database user in MongoDB Atlas. Using this, the database user access can be limited to a cluster or data lake.
4
+
5
+

6
+
7
+
You can view the MongoDB Atlas Cluster Regions from the [documentation](https://docs.atlas.mongodb.com/cloud-providers-regions/).
8
+
9
+
## Dependencies
10
+
11
+
* Terraform v0.13
12
+
* A MongoDB Atlas account - terraform-providers/mongodbatlas v0.6.5
13
+
14
+
## Usage
15
+
16
+
**1\. Ensure your MongoDB Atlas credentials are set up.**
17
+
18
+
This can be done using environment variables:
19
+
20
+
21
+
```bash
22
+
export MONGODB_ATLAS_PUBLIC_KEY="xxxx"
23
+
export MONGODB_ATLAS_PRIVATE_KEY="xxxx"
24
+
```
25
+
26
+
... or follow as in the `variables.tf` file and create **terraform.tfvars** file with all the variable values and make sure **not to commit it**.
27
+
28
+
**2\. Review the Terraform plan.**
29
+
30
+
Execute the below command and ensure you are happy with the plan.
31
+
32
+
```bash
33
+
$ terraform plan
34
+
```
35
+
This project currently does the below deployments:
36
+
37
+
- MongoDB cluster - M10
38
+
- Creates 2 database users, with the access scope to the database and data lake.
39
+
40
+
**4\. Execute the Terraform apply.**
41
+
42
+
Now execute the plan to provision the AWS and Atlas resources.
43
+
44
+
```bash
45
+
$ terraform apply
46
+
```
47
+
48
+
**5\. Destroy the resources.**
49
+
50
+
Once you are finished your testing, ensure you destroy the resources to avoid unnecessary charges.
51
+
52
+
```bash
53
+
$ terraform destroy
54
+
```
55
+
56
+
**Important Point**
57
+
58
+
- Using the **terraform.tfvars** for storing the password does not shows it in the **terraform plan**. Please refer the **variables.tf** to know more and use **.tfvars** file for storing or passing the details.
Copy file name to clipboardExpand all lines: website/docs/r/cluster.html.markdown
+6-2
Original file line number
Diff line number
Diff line change
@@ -232,7 +232,11 @@ But in order to explicitly change `provider_instance_size_name` comment the `lif
232
232
*`backup_enabled` - (Optional) Legacy Backup - Set to true to enable Atlas legacy backups for the cluster.
233
233
**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/).
234
234
* 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.
235
-
* Set to false to disable legacy backups for the cluster. Atlas deletes any stored snapshots.
235
+
* 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.
236
+
```
237
+
backup_enabled = "false"
238
+
provider_backup_enabled = "true"
239
+
```
236
240
* The default value is false. M10 and above only.
237
241
238
242
*`bi_connector` - (Optional) Specifies BI Connector for Atlas configuration on this cluster. BI Connector for Atlas is only available for M10+ clusters. See [BI Connector](#bi-connector) below for more details.
@@ -274,7 +278,7 @@ But in order to explicitly change `provider_instance_size_name` comment the `lif
274
278
- AZURE - Microsoft Azure
275
279
276
280
*`provider_disk_iops` - (Optional) The maximum input/output operations per second (IOPS) the system can perform. The possible values depend on the selected `provider_instance_size_name` and `disk_size_gb`.
277
-
*`provider_disk_type_name` - (Optional - Azure Only) Azure disk type of the server’s root volume. If omitted, Atlas uses the default disk type for the selected providerSettings.instanceSizeName. Example disk types and associated storage sizes: P4 - 32GB, P6 - 64GB, P10 - 128GB, P20 - 512GB, P30 - 1024GB, P40 - 2048GB, P50 - 4095GB. More information and the most update to date disk types/storage sizes can be located at https://docs.atlas.mongodb.com/reference/api/clusters-create-one/.
281
+
*`provider_disk_type_name` - (Optional - Azure Only) Azure disk type of the server’s root volume. If omitted, Atlas uses the default disk type for the selected providerSettings.instanceSizeName. Example disk types and associated storage sizes: P4 - 32GB, P6 - 64GB, P10 - 128GB, P15 - 256GB, P20 - 512GB, P30 - 1024GB, P40 - 2048GB, P50 - 4095GB. More information and the most update to date disk types/storage sizes can be located at https://docs.atlas.mongodb.com/reference/api/clusters-create-one/.
278
282
*`provider_encrypt_ebs_volume` - (Optional- AWS ONLY) If enabled, the Amazon EBS encryption feature encrypts the server’s root volume for both data at rest within the volume and for data moving between the volume and the cluster. **Atlas encrypts all cluster storage and snapshot volumes, securing all cluster data on disk: a concept known as encryption at rest, by default**.
279
283
*`provider_region_name` - (Optional) Physical location of your MongoDB cluster. The region you choose can affect network latency for clients accessing your databases. Requires the **Atlas region name**, see the reference list for [AWS](https://docs.atlas.mongodb.com/reference/amazon-aws/), [GCP](https://docs.atlas.mongodb.com/reference/google-gcp/), [Azure](https://docs.atlas.mongodb.com/reference/microsoft-azure/).
280
284
Do not specify this field when creating a multi-region cluster using the replicationSpec document or a Global Cluster with the replicationSpecs array.
0 commit comments