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
Copy file name to clipboardExpand all lines: docs/guides/1.29.0-upgrade-guide.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,10 @@ The Terraform MongoDB Atlas Provider version 1.29.0 has a number of new and exci
12
12
- If you are already using `mongodbatlas_advanced_cluster`, you can continue doing so with no changes.
13
13
- If you need to migrate from `mongodbatlas_cluster` to `mongodbatlas_advanced_cluster`, see the [Migration Guide: Cluster to Advanced Cluster](cluster-to-advanced-cluster-migration-guide).
14
14
15
+
- You can now use AWS Lambda connections with the `mongodbatlas_stream_connection` resource. To learn more, see the [mongodbatlas_stream_connection](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/stream_connection) resource documentation.
16
+
17
+
1.29.0 also includes general improvements, bug fixes and several key documentation updates. See the [CHANGELOG](https://github.com/mongodb/terraform-provider-mongodbatlas/blob/master/CHANGELOG.md) for more specific information.
Copy file name to clipboardExpand all lines: docs/resources/advanced_cluster (preview provider 2.0.0).md
+81-8Lines changed: 81 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ replication_specs {
38
38
}
39
39
```
40
40
goes to:
41
-
```
41
+
```terraform
42
42
replication_specs = [
43
43
{
44
44
region_configs = [
@@ -137,7 +137,7 @@ The process to migrate from current `mongodbatlas_advanced_cluster` to the one i
137
137
138
138
## Important notes
139
139
140
-
More information on considerations for using advanced clusters please see [Considerations](https://docs.atlas.mongodb.com/reference/api/cluster-advanced/create-one-cluster-advanced/#considerations)
140
+
Please refer to our [Considerations and Best Practices](#considerations-and-best-practices) section for additional guidance on this resource.
141
141
142
142
~> **IMPORTANT:** We recommend all new MongoDB Atlas Terraform users start with the [`mongodbatlas_advanced_cluster`](advanced_cluster) resource. Key differences between [`mongodbatlas_cluster`](cluster) and [`mongodbatlas_advanced_cluster`](advanced_cluster) include support for [Multi-Cloud Clusters](https://www.mongodb.com/blog/post/introducing-multicloud-clusters-on-mongodb-atlas), [Asymmetric Sharding](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/advanced-cluster-new-sharding-schema), and [Independent Scaling of Analytics Node Tiers](https://www.mongodb.com/blog/post/introducing-ability-independently-scale-atlas-analytics-node-tiers). For existing [`mongodbatlas_cluster`](cluster) resource users see our [Migration Guide](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/cluster-to-advanced-cluster-migration-guide).
143
143
@@ -616,7 +616,7 @@ This parameter defaults to false.
616
616
*`mongo_db_major_version` - (Optional) Version of the cluster to deploy. Atlas supports all the MongoDB versions that have **not** reached [End of Live](https://www.mongodb.com/legal/support-policy/lifecycles) for M10+ clusters. If omitted, Atlas deploys the cluster with the default version. For more details, see [documentation](https://www.mongodb.com/docs/atlas/reference/faq/database/#which-versions-of-mongodb-do-service-clusters-use-). Atlas always deploys the cluster with the latest stable release of the specified version. If you set a value to this parameter and set `version_release_system``CONTINUOUS`, the resource returns an error. Either clear this parameter or set `version_release_system`: `LTS`.
617
617
*`pinned_fcv` - (Optional) Pins the Feature Compatibility Version (FCV) to the current MongoDB version with a provided expiration date. To unpin the FCV the `pinned_fcv` attribute must be removed. This operation can take several minutes as the request processes through the MongoDB data plane. Once FCV is unpinned it will not be possible to downgrade the `mongo_db_major_version`. It is advised that updates to `pinned_fcv` are done isolated from other cluster changes. If a plan contains multiple changes, the FCV change will be applied first. If FCV is unpinned past the expiration date the `pinned_fcv` attribute must be removed. The following [knowledge hub article](https://kb.corp.mongodb.com/article/000021785/) and [FCV documentation](https://www.mongodb.com/docs/atlas/tutorial/major-version-change/#manage-feature-compatibility--fcv--during-upgrades) can be referenced for more details. See [below](#pinned_fcv).
618
618
*`pit_enabled` - (Optional) Flag that indicates if the cluster uses Continuous Cloud Backup.
619
-
*`replication_specs` - List of settings that configure your cluster regions. This attribute has one object per shard representing node configurations in each shard. For replica sets there is only one object representing node configurations. If for each replication_spec `num_shards` is configured with a value greater than 1 (using deprecated sharding configurations), then each object represents a zone with one or more shards. See [below](#replication_specs)
619
+
*`replication_specs` - List of settings that configure your cluster regions. This attribute has one object per shard representing node configurations in each shard. For replica sets there is only one object representing node configurations. If for each `replication_specs` a `num_shards` is configured with a value greater than 1 (using deprecated sharding configurations), then each object represents a zone with one or more shards. The `replication_specs` configuration for all shards within the same zone must be the same, with the exception of `instance_size` and `disk_iops` that can scale independently. Note that independent `disk_iops` values are only supported for AWS provisioned IOPS, or Azure regions that support Extended IOPS. See [below](#replication_specs).
620
620
*`root_cert_type` - (Optional) - Certificate Authority that MongoDB Atlas clusters use. You can specify ISRGROOTX1 (for ISRG Root X1).
621
621
*`termination_protection_enabled` - Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
622
622
*`version_release_system` - (Optional) - Release cadence that Atlas uses for this cluster. This parameter defaults to `LTS`. If you set this field to `CONTINUOUS`, you must omit the `mongo_db_major_version` field. Atlas accepts:
@@ -662,7 +662,7 @@ bi_connector_config = {
662
662
663
663
-> **NOTE:** Prior to setting these options please ensure you read https://docs.atlas.mongodb.com/cluster-config/additional-options/.
664
664
665
-
-> **NOTE:**This argument has been changed to type list make sure you have the proper syntax. The list can have only one item maximum.
665
+
-> **NOTE:**Once you set some `advanced_configuration` attributes, we recommended to explicitly set those attributes to their intended value instead of removing them from the configuration. For example, if you set `javascript_enabled` to `false`, and later you want to go back to the default value (true), you must set it back to `true` instead of removing it.
666
666
667
667
Include **desired options** within advanced_configuration:
668
668
@@ -677,13 +677,11 @@ Include **desired options** within advanced_configuration:
677
677
*`default_read_concern` - (Optional) [Default level of acknowledgment requested from MongoDB for read operations](https://docs.mongodb.com/manual/reference/read-concern/) set for this cluster. MongoDB 4.4 clusters default to [available](https://docs.mongodb.com/manual/reference/read-concern-available/). **(DEPRECATED)** MongoDB 5.0 and later clusters default to `local`. To use a custom read concern level, please refer to your driver documentation.
678
678
*`default_write_concern` - (Optional) [Default level of acknowledgment requested from MongoDB for write operations](https://docs.mongodb.com/manual/reference/write-concern/) set for this cluster. MongoDB 4.4 clusters default to [1](https://docs.mongodb.com/manual/reference/write-concern/).
679
679
*`fail_index_key_too_long` - (Optional) When true, documents can only be updated or inserted if, for all indexed fields on the target collection, the corresponding index entries do not exceed 1024 bytes. When false, mongod writes documents that exceed the limit but does not index them. **(DEPRECATED)** This parameter has been removed as of [MongoDB 4.4](https://www.mongodb.com/docs/manual/reference/parameters/#mongodb-parameter-param.failIndexKeyTooLong).
680
-
*`javascript_enabled` - (Optional) When true, the cluster allows execution of operations that perform server-side executions of JavaScript. When false, the cluster disables execution of those operations.
680
+
*`javascript_enabled` - (Optional) When true (default), the cluster allows execution of operations that perform server-side executions of JavaScript. When false, the cluster disables execution of those operations.
681
681
*`minimum_enabled_tls_protocol` - (Optional) Sets the minimum Transport Layer Security (TLS) version the cluster accepts for incoming connections. Valid values are:
682
-
683
682
- TLS1_0
684
683
- TLS1_1
685
684
- TLS1_2
686
-
687
685
*`no_table_scan` - (Optional) When true, the cluster disables the execution of any query that requires a collection scan to return results. When false, the cluster allows the execution of those operations.
688
686
*`oplog_size_mb` - (Optional) The custom oplog size of the cluster. Without a value that indicates that the cluster uses the default oplog size calculated by Atlas.
689
687
*`oplog_min_retention_hours` - (Optional) Minimum retention window for cluster's oplog expressed in hours. A value of null indicates that the cluster uses the default minimum oplog window that MongoDB Cloud calculates.
replication_specs[0].region_configs[0].analytics_specs.disk_iops // instance_size change can affect disk_iops in case that you are using it
868
868
]
869
869
}
870
870
```
@@ -941,4 +941,77 @@ moved {
941
941
}
942
942
```
943
943
944
-
More information about moving resources can be found in the Terraform documentation [here](https://developer.hashicorp.com/terraform/language/moved) and [here](https://developer.hashicorp.com/terraform/language/modules/develop/refactoring).
944
+
More information about moving resources can be found in our [Migration Guide](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/cluster-to-advanced-cluster-migration-guide) and in the Terraform documentation [here](https://developer.hashicorp.com/terraform/language/moved) and [here](https://developer.hashicorp.com/terraform/language/modules/develop/refactoring).
945
+
946
+
## Considerations and Best Practices
947
+
948
+
### "known after apply" verbosity
949
+
950
+
When making changes to your cluster, it is expected that your Terraform plan might show `known after apply` entries in attributes that have not been modified and does not have any side effects. The reason why this is happening is because some of the changes you make can affect other values of the cluster, hence the provider plugin will show the inability to know the future value until MongoDB Atlas provides those value in the response. As an example, a change in `instance_size` can affect `disk_iops`. This behaviour is related to how [Terraform Plugin Framework](https://developer.hashicorp.com/terraform/plugin/framework) behaves when the resource schema makes use of computed attributes.
951
+
952
+
If you want to reduce the `known after apply` verbosity in Terraform plan output, explicitly declare expected values for those attributes in your configuration where possible. This approach gives Terraform more information upfront, resulting in clearer, more predictable plan output.
953
+
954
+
### Remove or disable functionality
955
+
956
+
To disable or remove functionalities, we recommended to explicitly set those attributes to their intended value instead of removing them from the configuration. This will ensure no ambiguity in what the final terraform resource state will be. For example, if you have a `read_only_specs` block in your cluster definition like this one:
957
+
```terraform
958
+
...
959
+
region_configs = [
960
+
{
961
+
read_only_specs = {
962
+
instance_size = "M10"
963
+
node_count = 1
964
+
}
965
+
electable_specs = {
966
+
instance_size = "M10"
967
+
node_count = 3
968
+
}
969
+
provider_name = "AWS"
970
+
priority = 7
971
+
region_name = "US_WEST_1"
972
+
}
973
+
]
974
+
...
975
+
```
976
+
and your intention is to delete the read-only nodes, you should set the `node_count` attribute to `0` instead of removing the block:
977
+
```terraform
978
+
...
979
+
region_configs = [
980
+
{
981
+
read_only_specs = {
982
+
instance_size = "M10"
983
+
node_count = 0
984
+
}
985
+
electable_specs = {
986
+
instance_size = "M10"
987
+
node_count = 3
988
+
}
989
+
provider_name = "AWS"
990
+
priority = 7
991
+
region_name = "US_WEST_1"
992
+
}
993
+
]
994
+
...
995
+
```
996
+
Similarly, if you have compute and disk auto-scaling enabled:
997
+
```terraform
998
+
...
999
+
auto_scaling = {
1000
+
disk_gb_enabled = true
1001
+
compute_enabled = true
1002
+
compute_scale_down_enabled = true
1003
+
compute_min_instance_size = "M30"
1004
+
compute_max_instance_size = "M50"
1005
+
}
1006
+
...
1007
+
```
1008
+
and you want to disable them, you should set the `disk_gb_enabled` and `compute_enabled` attributes to `false` instead of removing the block:
0 commit comments