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
fix: Avoid error when removing read only spec in region config that does not define electable specs (#3162)
* add additional step for ensuring empty plans are encountered when blocks are removed
* adjust test step check making it different from one for migration tests
* add logic for copying values from state for read only spec if electable is not defined
* refactor removeBlocksFromConfig into regular acceptance test
* adding changelog
* fix replicationSpecsAutoScaling avoiding misalignment of instance_size and disk_size_gb values with state after ignore block is removed
* fix removeBlocksFromConfig by using node_count instead of instance_size for triggering a change
* fix for handling change of instance size in separate region config
* Revert "fix removeBlocksFromConfig by using node_count instead of instance_size for triggering a change"
This reverts commit 9709558.
* favour electable specs of same region config over one defined in general replication spec
* adjust check to consider change in read only spec of different region config
* adding additional docs clarification comments
resource/mongodbatlas_advanced_cluster (preview provider 2.0.0): Avoids error when removing `read_only_specs` in `region_configs` that does not define `electable_specs`
acc.TestCheckResourceAttrPreviewProviderV2(true, resourceName, "replication_specs.0.region_configs.0.electable_specs.0.disk_size_gb", "10"), // modified disk size gb in config is ignored
557
566
),
558
567
},
568
+
// empty plan when auto_scaling block is removed (also aligns instance_size/disk_size_gb to values in state)
Config: configReplicationSpecsAutoScaling(t, true, projectID, clusterName, nil, "M10", 10, 2), // auto_scaling block removed together with other changes, preserves previous state
571
+
Config: configReplicationSpecsAutoScaling(t, true, projectID, clusterName, nil, "M10", 10, 2), // other change after autoscaling block removed, preserves previous state
Config: configReplicationSpecsAnalyticsAutoScaling(t, true, projectID, clusterNameUpdated, nil, 2), // analytics_auto_scaling block removed together with other changes, preserves previous state
627
+
Config: configReplicationSpecsAnalyticsAutoScaling(t, true, projectID, clusterNameUpdated, nil, 2), // other changes after analytics_auto_scaling block removed, preserves previous state
Copy file name to clipboardExpand all lines: internal/service/advancedcluster/testdata/TestAccMockableAdvancedCluster_removeBlocksFromConfig/01_01_POST__api_atlas_v2_groups_{groupId}_clusters_2024-10-23.json
Copy file name to clipboardExpand all lines: internal/service/advancedcluster/testdata/TestAccMockableAdvancedCluster_removeBlocksFromConfig/02_01_PATCH__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2024-10-23.json
Copy file name to clipboardExpand all lines: internal/service/advancedcluster/testdata/TestAccMockableAdvancedCluster_removeBlocksFromConfig/03_01_DELETE__api_atlas_v2_groups_{groupId}_clusters_{clusterName}_2023-02-01.json
0 commit comments