|
| 1 | +# MongoDB Atlas Provider -- Cluster NVME (Non-Volatile Memory Express) Upgrade |
| 2 | +This example creates a project and cluster. It is intended to show how to upgrade from Standard, to PROVISIONED storage tier. |
| 3 | + |
| 4 | +Variables Required: |
| 5 | +- `atlas_org_id`: ID of the Atlas organization |
| 6 | +- `public_key`: Atlas public key |
| 7 | +- `private_key`: Atlas private key |
| 8 | +- `provider_name`: Name of provider to use for cluster (TENANT, AWS, GCP) |
| 9 | +- `backing_provider_name`: If provider_name is tenant, the backing provider (AWS, GCP) |
| 10 | +- `provider_instance_size_name`: Size of the cluster (Shared: M0, M2, M5, Dedicated: M10+.) |
| 11 | +- `provider_volume_type`: Provider storage type STANDARD vs PROVISIONED (NVME) |
| 12 | +- `provider_disk_iops`: 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`. This setting requires that `provider_instance_size_name` to be M30 or greater and cannot be used with clusters with local NVMe SSDs. The default value for `provider_disk_iops` is the same as the cluster tier's Standard IOPS value, as viewable in the Atlas console. It is used in cases where a higher number of IOPS is needed and possible. If a value is submitted that is lower or equal to the default IOPS value for the cluster tier Atlas ignores the requested value and uses the default. More details available under the providerSettings.diskIOPS parameter: [MongoDB API Clusters](https://docs.atlas.mongodb.com/reference/api/clusters-create-one/) |
| 13 | + * You do not need to configure IOPS for a STANDARD disk configuration but only for a PROVISIONED configuration. |
| 14 | + |
| 15 | +For this example, first we'll start out on the standard tier, then upgrade to a NVME storage tier. |
| 16 | + |
| 17 | + |
| 18 | +Utilize the following to execute a working example, replacing the org id, public and private key with your values: |
| 19 | + |
| 20 | +Apply with the following `terraform.tfvars` to first create a shared tier cluster: |
| 21 | +``` |
| 22 | +atlas_org_id = "627a9687f7f7f7f774de306f14" |
| 23 | +public_key = <REDACTED> |
| 24 | +private_key = <REDACTED> |
| 25 | +provider_name = "AWS" |
| 26 | +provider_instance_size_name = "M40" |
| 27 | +provider_volume_type = "STANDARD" |
| 28 | +provider_disk_iops = 3000 |
| 29 | +``` |
| 30 | + |
| 31 | +Apply with the following `terraform.tfvars` to upgrade the standard storage tier cluster you just created to provisioned storage NVME tier: |
| 32 | +``` |
| 33 | +atlas_org_id = "627a9687f7f7f7f774de306f14" |
| 34 | +public_key = <REDACTED> |
| 35 | +private_key = <REDACTED> |
| 36 | +provider_name = "AWS" |
| 37 | +provider_instance_size_name = "M40_NVME" |
| 38 | +provider_volume_type = "PROVISIONED" |
| 39 | +provider_disk_iops = 135125 |
| 40 | +``` |
0 commit comments