Skip to content

Commit dbffc3e

Browse files
lantolicorryroot
andauthored
chore: Create an example to help module maintainers to use the effective fields feature (#3951)
Co-authored-by: corryroot <[email protected]>
1 parent 0fded7c commit dbffc3e

File tree

22 files changed

+581
-604
lines changed

22 files changed

+581
-604
lines changed

docs/guides/advanced-cluster-new-sharding-schema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ output "shard_sizes" {
446446

447447
To learn more about `use_effective_fields`, see [Auto-Scaling with Effective Fields](../resources/advanced_cluster.md#auto-scaling-with-effective-fields).
448448

449-
**For module authors:** `use_effective_fields` is particularly valuable for reusable Terraform modules, enabling a single module to handle both auto-scaling and non-auto-scaling clusters without requiring lifecycle blocks. See the [Effective Fields Module Example](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/master/examples/mongodbatlas_advanced_cluster/effective-fields-module) for a complete implementation.
449+
**For module authors:** `use_effective_fields` is particularly valuable for reusable Terraform modules, enabling a single module to handle both auto-scaling and non-auto-scaling clusters without requiring lifecycle blocks. See the [Effective Fields Examples](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/master/examples/mongodbatlas_advanced_cluster/effective_fields) for complete implementations.
450450

451451
### Legacy Approach: Using lifecycle.ignore_changes
452452

docs/resources/advanced_cluster.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ output "actual_instance_size" {
106106
}
107107
```
108108

109-
**For module authors:** See the [Effective Fields Module Example](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/master/examples/mongodbatlas_advanced_cluster/effective-fields-module) for a complete example of using `use_effective_fields` and effective specs in reusable Terraform modules.
109+
**For module authors:** See the [Effective Fields Examples](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/master/examples/mongodbatlas_advanced_cluster/effective_fields) for complete examples of using `use_effective_fields` and effective specs in reusable Terraform modules.
110110

111111
### Example Tenant Cluster
112112

@@ -519,7 +519,7 @@ Refer to the following for full privatelink endpoint connection string examples:
519519

520520
**Auto-scaling:**
521521
- [Auto-Scaling Per Shard](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/v2.2.0/examples/mongodbatlas_advanced_cluster/auto-scaling-per-shard)
522-
- [Effective Fields Module](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/v2.2.0/examples/mongodbatlas_advanced_cluster/effective-fields-module)
522+
- [Effective Fields Examples](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/v2.2.0/examples/mongodbatlas_advanced_cluster/effective_fields)
523523

524524
**Upgrades & Migrations:**
525525
- [Tenant Upgrade](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/v2.2.0/examples/mongodbatlas_advanced_cluster/tenant-upgrade)
@@ -883,7 +883,7 @@ More information about moving resources can be found in our [Migration Guide](ht
883883

884884
## Auto-Scaling with Effective Fields
885885

886-
The `use_effective_fields` attribute enhances auto-scaling workflows by eliminating the need for `lifecycle.ignore_changes` blocks and providing visibility into Atlas-managed changes.
886+
The `use_effective_fields` attribute enhances auto-scaling workflows by eliminating the need for `lifecycle.ignore_changes` blocks and providing visibility into Atlas-managed changes. This feature only applies to dedicated clusters (M10+) and is not supported for flex and tenant clusters.
887887

888888
### Why use_effective_fields?
889889

@@ -928,7 +928,7 @@ This workflow allows you to set specific baseline values from which auto-scaling
928928

929929
### Terraform Modules
930930

931-
`use_effective_fields` is particularly valuable for reusable Terraform modules. Without it, separate module implementations are required (one with lifecycle blocks for auto-scaling, one without). With `use_effective_fields`, a single module handles both scenarios without lifecycle blocks. See the [Effective Fields Module Example](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/master/examples/mongodbatlas_advanced_cluster/effective-fields-module) for a complete implementation.
931+
`use_effective_fields` is particularly valuable for reusable Terraform modules. Without it, separate module implementations are required (one with lifecycle blocks for auto-scaling, one without). With `use_effective_fields`, a single module handles both scenarios without lifecycle blocks. See the [Effective Fields Examples](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/master/examples/mongodbatlas_advanced_cluster/effective_fields) for complete implementations.
932932

933933
### Migration path and version 3.x
934934

examples/mongodbatlas_advanced_cluster/effective-fields-module/README.md

Lines changed: 0 additions & 303 deletions
This file was deleted.

examples/mongodbatlas_advanced_cluster/effective-fields-module/module/main.tf

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)