Skip to content

Commit

Permalink
Roll up for documentation fixes (#576)
Browse files Browse the repository at this point in the history
Fixes for issues #555, #568, and updating that the free tier, M0, can now be created via API.
  • Loading branch information
themantissa committed Oct 1, 2021
1 parent 25f3666 commit d6797db
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 26 deletions.
6 changes: 3 additions & 3 deletions website/docs/r/auditing.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ resource "mongodbatlas_auditing" "test" {
## Argument Reference

* `project_id` - (Required) The unique ID for the project to configure auditing.
* `audit_filter` - Indicates whether the auditing system captures successful authentication attempts for audit filters using the "atype" : "authCheck" auditing event. For more information, see auditAuthorizationSuccess
* `audit_authorization_success` - JSON-formatted audit filter used by the project
* `enabled` - Denotes whether or not the project associated with the {project_id} has database auditing enabled.
* `audit_authorization_success` - Indicates whether the auditing system captures successful authentication attempts for audit filters using the "atype" : "authCheck" auditing event. For more information, see [auditAuthorizationSuccess](https://docs.mongodb.com/manual/reference/parameters/#param.auditAuthorizationSuccess). **Warning! Enabling Audit authorization successes can severely impact cluster performance. Enable this option with caution.**
* `audit_filter` - JSON-formatted audit filter. For complete documentation on custom auditing filters, see [Configure Audit Filters](https://docs.mongodb.com/manual/tutorial/configure-audit-filters/).
* `enabled` - Denotes whether or not the project associated with the {project_id} has database auditing enabled. Defaults to false.

~> **NOTE:** Auditing created by API Keys must belong to an existing organization.

Expand Down
52 changes: 29 additions & 23 deletions website/docs/r/cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ description: |-
-> **NOTE:** A network container is created for a cluster to reside in if one does not yet exist in the project. To use this automatically created container with another resource, such as peering, the `container_id` is exported after creation.

~> **IMPORTANT:**
<br> &#8226; Free tier cluster creation (M0) is not supported via API or by this Provider.
<br> &#8226; Shared tier clusters (M2, M5) cannot be upgraded to higher tiers via API or by this Provider. WARNING! If you attempt to upgrade from an existing shared tier cluster that you manage with this Provider to a dedicated cluster (M10+) Terraform will see it as a request to destroy the shared tier cluster and as a request to create a dedicated tier cluster, i.e. Terraform will not see it as a request to upgrade. If you accept the plan in this case the shared tier cluster would be destroyed and you would lose the data on that cluster. Do not attempt to upgrade from the shared to dedicated tier via this Provider, it is not supported!
<br> &#8226; Free tier cluster creation (M0) is supported.
<br> &#8226; Shared tier clusters (M0, M2, M5) cannot be upgraded to higher tiers via API or by this Provider. WARNING! If you attempt to upgrade from an existing shared tier cluster that you manage with this Provider to a dedicated cluster (M10+) Terraform will see it as a request to destroy the shared tier cluster and as a request to create a dedicated tier cluster, i.e. Terraform will not see it as a request to upgrade. If you accept the plan in this case the shared tier cluster would be destroyed and you would lose the data on that cluster. Do not attempt to upgrade from the shared to dedicated tier via this Provider, it is not supported!
<br> &#8226; Changes to cluster configurations can affect costs. Before making changes, please see [Billing](https://docs.atlas.mongodb.com/billing/).
<br> &#8226; If your Atlas project contains a custom role that uses actions introduced in a specific MongoDB version, you cannot create a cluster with a MongoDB version less than that version unless you delete the custom role.

Expand All @@ -42,7 +42,7 @@ resource "mongodbatlas_cluster" "cluster-test" {
auto_scaling_disk_gb_enabled = true
mongo_db_major_version = "4.2"
//Provider Settings "block"
# Provider Settings "block"
provider_name = "AWS"
disk_size_gb = 100
provider_instance_size_name = "M40"
Expand All @@ -59,7 +59,7 @@ resource "mongodbatlas_cluster" "test" {
replication_specs {
num_shards = 1
regions_config {
region_name = "US_EAST_1"
region_name = "US_EAST"
electable_nodes = 3
priority = 7
read_only_nodes = 0
Expand All @@ -69,7 +69,7 @@ resource "mongodbatlas_cluster" "test" {
auto_scaling_disk_gb_enabled = true
mongo_db_major_version = "4.2"
//Provider Settings "block"
# Provider Settings "block"
provider_name = "AZURE"
provider_disk_type_name = "P6"
provider_instance_size_name = "M30"
Expand All @@ -86,7 +86,7 @@ resource "mongodbatlas_cluster" "test" {
replication_specs {
num_shards = 1
regions_config {
region_name = "US_EAST_1"
region_name = "EASTERN_US"
electable_nodes = 3
priority = 7
read_only_nodes = 0
Expand All @@ -96,7 +96,7 @@ resource "mongodbatlas_cluster" "test" {
auto_scaling_disk_gb_enabled = true
mongo_db_major_version = "4.2"
//Provider Settings "block"
# Provider Settings "block"
provider_name = "GCP"
disk_size_gb = 40
provider_instance_size_name = "M30"
Expand All @@ -114,7 +114,7 @@ resource "mongodbatlas_cluster" "cluster-test" {
cloud_backup = true
cluster_type = "REPLICASET"
//Provider Settings "block"
# Provider Settings "block"
provider_name = "AWS"
provider_instance_size_name = "M10"
Expand Down Expand Up @@ -153,7 +153,7 @@ resource "mongodbatlas_cluster" "cluster-test" {
cloud_backup = true
cluster_type = "GEOSHARDED"
//Provider Settings "block"
# Provider Settings "block"
provider_name = "AWS"
provider_instance_size_name = "M30"
Expand All @@ -180,23 +180,30 @@ resource "mongodbatlas_cluster" "cluster-test" {
}
}
```
### Example AWS Shared Tier cluster
### Example AWS Shared Tier (M2/M5) cluster
```hcl
resource "mongodbatlas_cluster" "cluster-test" {
project_id = "<YOUR-PROJECT-ID>"
name = "cluster-test-global"
//M2 must be 2, M5 must be 5
disk_size_gb = "2"
//Provider Settings "block"
# Provider Settings "block"
provider_name = "TENANT"
backing_provider_name = "AWS"
provider_region_name = "US_EAST_1"
provider_instance_size_name = "M2"
}
```
### Example AWS Free Tier cluster
```hcl
resource "mongodbatlas_cluster" "cluster-test" {
project_id = "<YOUR-PROJECT-ID>"
name = "cluster-test-global"
//These must be the following values
mongo_db_major_version = "4.2"
auto_scaling_disk_gb_enabled = "false"
# Provider Settings "block"
provider_name = "TENANT"
backing_provider_name = "AWS"
provider_region_name = "US_EAST_1"
provider_instance_size_name = "M0"
}
```
### Example - Return a Connection String
Expand All @@ -205,43 +212,43 @@ AWS Private Endpoint
output "plstring" {
value = lookup(mongodbatlas_cluster.cluster-test.connection_strings[0].private_endpoint[0].srv_connection_string, aws_vpc_endpoint.ptfe_service.id)
}
//Example return string: plstring = mongodb+srv://cluster-atlas-pl-0.za3fb.mongodb.net
# Example return string: plstring = mongodb+srv://cluster-atlas-pl-0.za3fb.mongodb.net
```
Azure Private Endpoint
```hcl
output "plstring" {
value = lookup(mongodbatlas_cluster.cluster-test.connection_strings[0].private_endpoint[0].srv_connection_string, azurerm_private_endpoint.test.id)
}
//Example return string: plstring = mongodb+srv://cluster-atlas-pl-0.za3fb.mongodb.net
# Example return string: plstring = mongodb+srv://cluster-atlas-pl-0.za3fb.mongodb.net
```
Standard
```hcl
output "standard" {
value = mongodbatlas_cluster.cluster-test.connection_strings[0].standard
}
//Example return string: standard = "mongodb://cluster-atlas-shard-00-00.ygo1m.mongodb.net:27017,cluster-atlas-shard-00-01.ygo1m.mongodb.net:27017,cluster-atlas-shard-00-02.ygo1m.mongodb.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-12diht-shard-0"
# Example return string: standard = "mongodb://cluster-atlas-shard-00-00.ygo1m.mongodb.net:27017,cluster-atlas-shard-00-01.ygo1m.mongodb.net:27017,cluster-atlas-shard-00-02.ygo1m.mongodb.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-12diht-shard-0"
```
Standard srv
```hcl
output "standard_srv" {
value = mongodbatlas_cluster.cluster-test.connection_strings[0].standard_srv
}
//Example return string: standard_srv = "mongodb+srv://cluster-atlas.ygo1m.mongodb.net"
# Example return string: standard_srv = "mongodb+srv://cluster-atlas.ygo1m.mongodb.net"
```
Private with Network peering and Custom DNS AWS enabled
```hcl
output "private" {
value = mongodbatlas_cluster.cluster-test.connection_strings[0].private
}
//Example return string: private = "mongodb://cluster-atlas-shard-00-00-pri.ygo1m.mongodb.net:27017,cluster-atlas-shard-00-01-pri.ygo1m.mongodb.net:27017,cluster-atlas-shard-00-02-pri.ygo1m.mongodb.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-12diht-shard-0"
# Example return string: private = "mongodb://cluster-atlas-shard-00-00-pri.ygo1m.mongodb.net:27017,cluster-atlas-shard-00-01-pri.ygo1m.mongodb.net:27017,cluster-atlas-shard-00-02-pri.ygo1m.mongodb.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-12diht-shard-0"
private = "mongodb+srv://cluster-atlas-pri.ygo1m.mongodb.net"
```
Private srv with Network peering and Custom DNS AWS enabled
```hcl
output "private_srv" {
value = mongodbatlas_cluster.cluster-test.connection_strings[0].private_srv
}
//Example return string: private_srv = "mongodb+srv://cluster-atlas-pri.ygo1m.mongodb.net"
# Example return string: private_srv = "mongodb+srv://cluster-atlas-pri.ygo1m.mongodb.net"
```

## Argument Reference
Expand All @@ -257,7 +264,6 @@ output "private_srv" {
- `TENANT` - A multi-tenant deployment on one of the supported cloud service providers. Only valid when providerSettings.instanceSizeName is either M2 or M5.
* `name` - (Required) Name of the cluster as it appears in Atlas. Once the cluster is created, its name cannot be changed.
* `provider_instance_size_name` - (Required) Atlas provides different instance sizes, each with a default storage capacity and RAM size. The instance size you select is used for all the data-bearing servers in your cluster. See [Create a Cluster](https://docs.atlas.mongodb.com/reference/api/clusters-create-one/) `providerSettings.instanceSizeName` for valid values and default resources.
**Note** free tier (M0) creation is not supported by the Atlas API and hence not supported by this provider.)

* `auto_scaling_disk_gb_enabled` - (Optional) Specifies whether disk auto-scaling is enabled. The default is true.
- Set to `true` to enable disk auto-scaling.
Expand Down

0 comments on commit d6797db

Please sign in to comment.