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

chore: Updates examples and documentation in resource and data source with new ISS attributes and structure #2438

Merged
merged 15 commits into from
Jul 19, 2024
Prev Previous commit
Next Next commit
address PR comments
maastha committed Jul 19, 2024
commit 46bc7dcce00b79e80790b58d48344cfa385de8f3
32 changes: 0 additions & 32 deletions examples/mongodbatlas_advanced_cluster/global-cluster/main.tf
Original file line number Diff line number Diff line change
@@ -21,10 +21,6 @@ resource "mongodbatlas_advanced_cluster" "cluster" {
instance_size = "M10"
node_count = 3
}
analytics_specs {
instance_size = "M10"
node_count = 1
}
provider_name = "AWS"
priority = 7
region_name = "US_EAST_1"
@@ -35,10 +31,6 @@ resource "mongodbatlas_advanced_cluster" "cluster" {
instance_size = "M10"
node_count = 2
}
analytics_specs {
instance_size = "M10"
node_count = 1
}
provider_name = "AZURE"
priority = 6
region_name = "US_EAST_2"
@@ -53,10 +45,6 @@ resource "mongodbatlas_advanced_cluster" "cluster" {
instance_size = "M10"
node_count = 3
}
analytics_specs {
instance_size = "M10"
node_count = 1
}
provider_name = "AWS"
priority = 7
region_name = "US_EAST_1"
@@ -67,10 +55,6 @@ resource "mongodbatlas_advanced_cluster" "cluster" {
instance_size = "M10"
node_count = 2
}
analytics_specs {
instance_size = "M10"
node_count = 1
}
provider_name = "AZURE"
priority = 6
region_name = "US_EAST_2"
@@ -85,10 +69,6 @@ resource "mongodbatlas_advanced_cluster" "cluster" {
instance_size = "M10"
node_count = 3
}
analytics_specs {
instance_size = "M10"
node_count = 1
}
provider_name = "AWS"
priority = 7
region_name = "EU_WEST_1"
@@ -99,10 +79,6 @@ resource "mongodbatlas_advanced_cluster" "cluster" {
instance_size = "M10"
node_count = 2
}
analytics_specs {
instance_size = "M10"
node_count = 1
}
provider_name = "AZURE"
lantoli marked this conversation as resolved.
Show resolved Hide resolved
priority = 6
region_name = "EUROPE_NORTH"
@@ -117,10 +93,6 @@ resource "mongodbatlas_advanced_cluster" "cluster" {
instance_size = "M10"
node_count = 3
}
analytics_specs {
instance_size = "M10"
node_count = 1
}
provider_name = "AWS"
priority = 7
region_name = "EU_WEST_1"
@@ -131,10 +103,6 @@ resource "mongodbatlas_advanced_cluster" "cluster" {
instance_size = "M10"
node_count = 2
}
analytics_specs {
instance_size = "M10"
node_count = 1
}
provider_name = "AZURE"
priority = 6
region_name = "EUROPE_NORTH"
Original file line number Diff line number Diff line change
@@ -25,7 +25,6 @@ func DataSource() *schema.Resource {
"use_replication_spec_per_shard": {
Type: schema.TypeBool,
Optional: true,
Description: "Set this field to true to allow the data source to use the latest schema leveraging independent shards in the cluster.",
},
"advanced_configuration": SchemaAdvancedConfigDS(),
"backup_enabled": {
@@ -62,7 +61,6 @@ func DataSource() *schema.Resource {
"disk_size_gb": {
Type: schema.TypeFloat,
Computed: true,
Description: "Capacity, in gigabytes, of the host's root volume. If `use_replication_spec_per_shard = true` then this value is equal to `disk_size_gb` of the first `replication_spec.#.region_configs.#.electable_specs`.",
Deprecated: DeprecationMsgOldSchema,
},
"encryption_at_rest_provider": {
@@ -121,7 +119,6 @@ func DataSource() *schema.Resource {
"zone_id": {
Type: schema.TypeString,
Computed: true,
Description: "Unique 24-hexadecimal digit string that identifies the zone in a Global Cluster. If clusterType is GEOSHARDED, this value indicates the zone that the given shard belongs to and can be used to configure Global Cluster backup policies. This attribute is only available if using the latest schema of this resource leveraging independent shards in the cluster (i.e. `use_replication_spec_per_shard = true`.",
},
"external_id": {
Type: schema.TypeString,
Original file line number Diff line number Diff line change
@@ -182,7 +182,6 @@ func Resource() *schema.Resource {
"zone_id": {
Type: schema.TypeString,
Computed: true,
Description: "Unique 24-hexadecimal digit string that identifies the zone in a Global Cluster. If clusterType is GEOSHARDED or `global_cluster_self_managed_sharding` is true, this value indicates the zone that the given shard belongs to and can be used to configure Global Cluster backup policies. This attribute is only available if using the latest schema of this resource leveraging independent shards in the cluster.",
},
"external_id": {
Type: schema.TypeString,
6 changes: 2 additions & 4 deletions website/docs/d/advanced_cluster.html.markdown
Original file line number Diff line number Diff line change
@@ -58,7 +58,6 @@ resource "mongodbatlas_advanced_cluster" "example" {
instance_size = "M30"
disk_iops = 3000
node_count = 3
disk_size_gb = 60
}
provider_name = "AWS"
priority = 7
@@ -72,7 +71,6 @@ resource "mongodbatlas_advanced_cluster" "example" {
instance_size = "M40"
disk_iops = 3000
node_count = 3
disk_size_gb = 60
}
provider_name = "AWS"
priority = 7
@@ -148,7 +146,7 @@ Key-value pairs that categorize the cluster. Each key and value has a maximum le
* `region_configs` - Configuration for the hardware specifications for nodes set for a given regionEach `region_configs` object describes the region's priority in elections and the number and type of MongoDB nodes that Atlas deploys to the region. Each `region_configs` object must have either an `analytics_specs` object, `electable_specs` object, or `read_only_specs` object. See [below](#region_configs)
* `container_id` - A key-value map of the Network Peering Container ID(s) for the configuration specified in `region_configs`. The Container ID is the id of the container either created programmatically by the user before any clusters existed in a project or when the first cluster in the region (AWS/Azure) or project (GCP) was created. The syntax is `"providerName:regionName" = "containerId"`. Example `AWS:US_EAST_1" = "61e0797dde08fb498ca11a71`.
* `zone_name` - Name for the zone in a Global Cluster.
* `zone_id` - Unique 24-hexadecimal digit string that identifies the zone in a Global Cluster. If clusterType is GEOSHARDED or `global_cluster_self_managed_sharding` is true, this value indicates the zone that the given shard belongs to and can be used to configure Global Cluster backup policies. This attribute is only available if using the latest schema of this resource leveraging independent shards in the cluster (i.e. `use_replication_spec_per_shard = true`).
* `zone_id` - Unique 24-hexadecimal digit string that identifies the zone in a Global Cluster. If clusterType is GEOSHARDED, this value indicates the zone that the given shard belongs to and can be used to configure Global Cluster backup policies. This attribute is only available if using the latest schema of this resource leveraging independent shards in the cluster (i.e. `use_replication_spec_per_shard = true`).


### region_configs
@@ -171,7 +169,7 @@ Key-value pairs that categorize the cluster. Each key and value has a maximum le
* `PROVISIONED` volume types must fall within the allowable IOPS range for the selected volume size.
* `instance_size` - Hardware specification for the instance sizes in this region.
* `node_count` - Number of nodes of the given type for MongoDB Atlas to deploy to the region.
* `disk_size_gb` - Storage capacity that the host's root volume possesses expressed in gigabytes. Increase this number to add capacity. MongoDB Cloud requires this parameter if you set **replication_specs**. If you specify a disk size below the minimum (10 GB), this parameter defaults to the minimum disk size value. Storage charge calculations depend on whether you choose the default value or a custom value. The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require more storage space, consider upgrading your cluster to a higher tier.
* `disk_size_gb` - Storage capacity that the host's root volume possesses expressed in gigabytes. If disk size specified is below the minimum (10 GB), this parameter defaults to the minimum disk size value. Storage charge calculations depend on whether you choose the default value or a custom value. The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require more storage space, consider upgrading your cluster to a higher tier.

### auto_scaling

4 changes: 1 addition & 3 deletions website/docs/d/advanced_clusters.html.markdown
Original file line number Diff line number Diff line change
@@ -57,7 +57,6 @@ resource "mongodbatlas_advanced_cluster" "example" {
instance_size = "M30"
disk_iops = 3000
node_count = 3
disk_size_gb = 60
}
provider_name = "AWS"
priority = 7
@@ -71,7 +70,6 @@ resource "mongodbatlas_advanced_cluster" "example" {
instance_size = "M40"
disk_iops = 3000
node_count = 3
disk_size_gb = 60
}
provider_name = "AWS"
priority = 7
@@ -150,7 +148,7 @@ Key-value pairs that categorize the cluster. Each key and value has a maximum le
* `region_configs` - Configuration for the hardware specifications for nodes set for a given regionEach `region_configs` object describes the region's priority in elections and the number and type of MongoDB nodes that Atlas deploys to the region. Each `region_configs` object must have either an `analytics_specs` object, `electable_specs` object, or `read_only_specs` object. See [below](#region_configs)
* `container_id` - A key-value map of the Network Peering Container ID(s) for the configuration specified in `region_configs`. The Container ID is the id of the container either created programmatically by the user before any clusters existed in a project or when the first cluster in the region (AWS/Azure) or project (GCP) was created. The syntax is `"providerName:regionName" = "containerId"`. Example `AWS:US_EAST_1" = "61e0797dde08fb498ca11a71`.
* `zone_name` - Name for the zone in a Global Cluster.
* `zone_id` - Unique 24-hexadecimal digit string that identifies the zone in a Global Cluster. If clusterType is GEOSHARDED or `global_cluster_self_managed_sharding` is true, this value indicates the zone that the given shard belongs to and can be used to configure Global Cluster backup policies. This attribute is only available if using the latest schema of this resource leveraging independent shards in the cluster (i.e. `use_replication_spec_per_shard = true`.
* `zone_id` - Unique 24-hexadecimal digit string that identifies the zone in a Global Cluster. If clusterType is GEOSHARDED, this value indicates the zone that the given shard belongs to and can be used to configure Global Cluster backup policies. This attribute is only available if using the latest schema of this resource leveraging independent shards in the cluster (i.e. `use_replication_spec_per_shard = true`.


### region_configs
2 changes: 1 addition & 1 deletion website/docs/r/advanced_cluster.html.markdown
Original file line number Diff line number Diff line change
@@ -544,7 +544,7 @@ https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/
If you are upgrading a replica set to a sharded cluster, you cannot increase the number of shards in the same update request. You should wait until after the cluster has completed upgrading to sharded and you have reconnected all application clients to the MongoDB router before adding additional shards. Otherwise, your data might become inconsistent once MongoDB Cloud begins distributing data across shards. To learn more, see [Convert a replica set to a sharded cluster documentation](https://www.mongodb.com/docs/atlas/scale-cluster/#convert-a-replica-set-to-a-sharded-cluster) and [Convert a replica set to a sharded cluster tutorial](https://www.mongodb.com/docs/upcoming/tutorial/convert-replica-set-to-replicated-shard-cluster). **(DEPRECATED)** Please refer [1.18.0 upgrade guide](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/1.18.0-upgrade-guide.html.markdown) for more details.
* `region_configs` - (Optional) Configuration for the hardware specifications for nodes set for a given regionEach `region_configs` object describes the region's priority in elections and the number and type of MongoDB nodes that Atlas deploys to the region. Each `region_configs` object must have either an `analytics_specs` object, `electable_specs` object, or `read_only_specs` object. See [below](#region_configs)
* `zone_name` - (Optional) Name for the zone in a Global Cluster.
* `zone_id` - Unique 24-hexadecimal digit string that identifies the zone in a Global Cluster. If clusterType is GEOSHARDED or `global_cluster_self_managed_sharding` is true, this value indicates the zone that the given shard belongs to and can be used to configure Global Cluster backup policies. This attribute is only available if using the latest schema of this resource leveraging independent shards in the cluster.
* `zone_id` - Unique 24-hexadecimal digit string that identifies the zone in a Global Cluster. If clusterType is GEOSHARDED, this value indicates the zone that the given shard belongs to and can be used to configure Global Cluster backup policies. This attribute is only available if using the latest schema of this resource leveraging independent shards in the cluster.


### region_configs