Skip to content

Commit de62fd3

Browse files
committed
Merge branch 'master' into CLOUDP-320243-dev-2.0.0
2 parents a273130 + 2ff3f1f commit de62fd3

File tree

4 files changed

+107
-27
lines changed

4 files changed

+107
-27
lines changed

docs/index.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,77 @@ In addition to [generic `provider` arguments](https://www.terraform.io/docs/conf
172172

173173
For more information on configuring and managing programmatic API Keys see the [MongoDB Atlas Documentation](https://docs.atlas.mongodb.com/tutorial/manage-programmatic-access/index.html).
174174

175+
## MongoDB Atlas Provider Versioning Policy
176+
177+
In order to promote stability, predictability, and transparency, the MongoDB Atlas Terraform Provider will implement **semantic versioning** with a **scheduled release cadence**. Our goal is to deliver regular improvements to the provider without overburdening users with frequent breaking changes.
178+
179+
---
180+
181+
### Definition of Breaking Changes
182+
183+
Our definition of breaking changes aligns with the impact updates have on the customer:
184+
185+
Breaking changes are defined as any change that requires user intervention to address.
186+
This may include:
187+
188+
- Modifying existing schema (e.g., removing or renaming fields, renaming resources)
189+
- Changes to business logic (e.g., implicit default values or server-side behavior)
190+
- Provider-level changes (e.g., changing retry behavior)
191+
192+
Final confirmation of a breaking change — possibly leading to an exemption — is subject to:
193+
194+
- MongoDB’s understanding of the adoption level of the feature
195+
- Timing of the next planned major release
196+
- The change's relation to a bug fix
197+
198+
---
199+
200+
### Versioning Strategy
201+
202+
We follow [semantic versioning](https://semver.org/) for all updates:
203+
204+
- **Major (X.0.0):** Introduces breaking changes (as defined by MongoDB)
205+
- **Minor (X.Y.0):** Adds non-breaking changes and announces deprecations
206+
- **Patch (X.Y.Z):** Includes bug fixes and documentation updates
207+
208+
We do not utilize pre-release versioning at this time.
209+
210+
---
211+
212+
### Release Cadence
213+
214+
To minimize unexpected changes, we follow a scheduled cadence:
215+
216+
- **Minor and patch** versions follow a **biweekly** release pattern
217+
- **Major** versions are released **once per year**, with a maximum of **two per calendar year**
218+
- The provider team may adjust the schedule based on need
219+
220+
**Off-cycle releases** may occur for critical security flaws or regressions.
221+
222+
---
223+
224+
### Deprecation Policy
225+
226+
We use a structured deprecation window to notify customers in advance:
227+
228+
- Breaking changes are **deprecated in a minor version** with:
229+
- Warnings in migration guides, changelogs, and resource usage
230+
- Deprecated functionality is **removed in the next 1–2 major versions**, unless otherwise stated
231+
232+
---
233+
234+
### Customer Communication
235+
236+
We are committed to clear and proactive communication:
237+
238+
- **Each release** includes a [changelog](https://github.com/mongodb/terraform-provider-mongodbatlas/releases) clearly labeling:
239+
- `breaking`, `deprecated`, `bug-fix`, `feature`, and `enhancement` changes
240+
- **Major versions** include migration guides
241+
- **Minor and patch versions** generally do not include migration guides, but may if warranted
242+
- **GitHub tags** with `vX.Y.Z` format are provided for all releases
243+
244+
---
245+
175246
## [HashiCorp Terraform Version](https://www.terraform.io/downloads.html) Compatibility Matrix
176247

177248
<!-- DO NOT remove below placeholder comments as this table is auto-generated -->

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ require (
2525
github.com/jarcoal/httpmock v1.4.0
2626
github.com/mongodb-forks/digest v1.1.0
2727
github.com/mongodb/atlas-sdk-go v1.0.1-0.20250709084037-30b22cb7796e
28-
github.com/pb33f/libopenapi v0.23.0
28+
github.com/pb33f/libopenapi v0.24.0
2929
github.com/sebdah/goldie/v2 v2.7.1
3030
github.com/spf13/cast v1.9.2
3131
github.com/stretchr/testify v1.10.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,8 +704,8 @@ github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k=
704704
github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY=
705705
github.com/openlyinc/pointy v1.1.2 h1:LywVV2BWC5Sp5v7FoP4bUD+2Yn5k0VNeRbU5vq9jUMY=
706706
github.com/openlyinc/pointy v1.1.2/go.mod h1:w2Sytx+0FVuMKn37xpXIAyBNhFNBIJGR/v2m7ik1WtM=
707-
github.com/pb33f/libopenapi v0.23.0 h1:gZP1zrtvMwk7spGDTZf4OufKgpOH8M9gHAZ77rf39Oo=
708-
github.com/pb33f/libopenapi v0.23.0/go.mod h1:utT5sD2/mnN7YK68FfZT5yEPbI1wwRBpSS4Hi0oOrBU=
707+
github.com/pb33f/libopenapi v0.24.0 h1:QIwVCzT+VxmWWwxNx1LO9jLXPZp9VsiCwDO+c2h/rq4=
708+
github.com/pb33f/libopenapi v0.24.0/go.mod h1:utT5sD2/mnN7YK68FfZT5yEPbI1wwRBpSS4Hi0oOrBU=
709709
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
710710
github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=
711711
github.com/pjbgf/sha1cd v0.3.2 h1:a9wb0bp1oC2TGwStyn0Umc/IGKQnEgF0vVaZ8QF8eo4=

internal/service/advancedcluster/resource_advanced_cluster_test.go

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -125,20 +125,21 @@ func testAccAdvancedClusterFlexUpgrade(t *testing.T, instanceSize string, includ
125125
projectID, clusterName := acc.ProjectIDExecutionWithCluster(t, 1)
126126
defaultZoneName := "Zone 1" // Uses backend default as in existing tests
127127

128+
// avoid checking plural data source to reduce risk of being impacted from failure in other test using same project, allows running in parallel
128129
steps := []resource.TestStep{
129130
{
130131
Config: configTenant(t, true, projectID, clusterName, defaultZoneName, instanceSize),
131-
Check: checkTenant(true, projectID, clusterName),
132+
Check: checkTenant(true, projectID, clusterName, false),
132133
},
133134
{
134135
Config: configFlexCluster(t, projectID, clusterName, "AWS", "US_EAST_1", defaultZoneName, "", false, nil),
135-
Check: checkFlexClusterConfig(projectID, clusterName, "AWS", "US_EAST_1", false),
136+
Check: checkFlexClusterConfig(projectID, clusterName, "AWS", "US_EAST_1", false, false),
136137
},
137138
}
138139
if includeDedicated {
139140
steps = append(steps, resource.TestStep{
140141
Config: acc.ConvertAdvancedClusterToPreviewProviderV2(t, true, acc.ConfigBasicDedicated(projectID, clusterName, defaultZoneName)),
141-
Check: checksBasicDedicated(projectID, clusterName),
142+
Check: checksBasicDedicated(projectID, clusterName, false),
142143
})
143144
}
144145

@@ -151,11 +152,11 @@ func testAccAdvancedClusterFlexUpgrade(t *testing.T, instanceSize string, includ
151152
}
152153

153154
func TestAccAdvancedCluster_basicTenant_flexUpgrade_dedicatedUpgrade(t *testing.T) {
154-
resource.Test(t, testAccAdvancedClusterFlexUpgrade(t, freeInstanceSize, true))
155+
resource.ParallelTest(t, testAccAdvancedClusterFlexUpgrade(t, freeInstanceSize, true))
155156
}
156157

157158
func TestAccAdvancedCluster_sharedTier_flexUpgrade(t *testing.T) {
158-
resource.Test(t, testAccAdvancedClusterFlexUpgrade(t, sharedInstanceSize, false))
159+
resource.ParallelTest(t, testAccAdvancedClusterFlexUpgrade(t, sharedInstanceSize, false))
159160
}
160161
func TestAccMockableAdvancedCluster_tenantUpgrade(t *testing.T) {
161162
var (
@@ -169,11 +170,11 @@ func TestAccMockableAdvancedCluster_tenantUpgrade(t *testing.T) {
169170
Steps: []resource.TestStep{
170171
{
171172
Config: acc.ConvertAdvancedClusterToPreviewProviderV2(t, true, configTenant(t, true, projectID, clusterName, defaultZoneName, freeInstanceSize)),
172-
Check: checkTenant(true, projectID, clusterName),
173+
Check: checkTenant(true, projectID, clusterName, true),
173174
},
174175
{
175176
Config: acc.ConvertAdvancedClusterToPreviewProviderV2(t, true, acc.ConfigBasicDedicated(projectID, clusterName, defaultZoneName)),
176-
Check: checksBasicDedicated(projectID, clusterName),
177+
Check: checksBasicDedicated(projectID, clusterName, true),
177178
},
178179
acc.TestStepImportCluster(resourceName),
179180
},
@@ -1732,9 +1733,12 @@ func configTenant(t *testing.T, usePreviewProvider bool, projectID, name, zoneNa
17321733
`, projectID, name, zoneNameLine, instanceSize)) + dataSourcesTFNewSchema
17331734
}
17341735

1735-
func checkTenant(usePreviewProvider bool, projectID, name string) resource.TestCheckFunc {
1736-
pluralChecks := acc.AddAttrSetChecksPreviewProviderV2(usePreviewProvider, dataSourcePluralName, nil,
1737-
[]string{"results.#", "results.0.replication_specs.#", "results.0.name", "results.0.termination_protection_enabled", "results.0.global_cluster_self_managed_sharding"}...)
1736+
func checkTenant(usePreviewProvider bool, projectID, name string, checkPlural bool) resource.TestCheckFunc {
1737+
var pluralChecks []resource.TestCheckFunc
1738+
if checkPlural {
1739+
pluralChecks = acc.AddAttrSetChecksPreviewProviderV2(usePreviewProvider, dataSourcePluralName, nil,
1740+
[]string{"results.#", "results.0.replication_specs.#", "results.0.name", "results.0.termination_protection_enabled", "results.0.global_cluster_self_managed_sharding"}...)
1741+
}
17381742
return checkAggr(usePreviewProvider,
17391743
[]string{"replication_specs.#", "replication_specs.0.id", "replication_specs.0.region_configs.#"},
17401744
map[string]string{
@@ -1745,8 +1749,8 @@ func checkTenant(usePreviewProvider bool, projectID, name string) resource.TestC
17451749
pluralChecks...)
17461750
}
17471751

1748-
func checksBasicDedicated(projectID, name string) resource.TestCheckFunc {
1749-
originalChecks := checkTenant(true, projectID, name)
1752+
func checksBasicDedicated(projectID, name string, checkPlural bool) resource.TestCheckFunc {
1753+
originalChecks := checkTenant(true, projectID, name, checkPlural)
17501754
checkMap := map[string]string{
17511755
"replication_specs.0.region_configs.0.electable_specs.0.node_count": "3",
17521756
"replication_specs.0.region_configs.0.electable_specs.0.instance_size": "M10",
@@ -3254,11 +3258,11 @@ func TestAccClusterFlexCluster_basic(t *testing.T) {
32543258
Steps: []resource.TestStep{
32553259
{
32563260
Config: configFlexCluster(t, projectID, clusterName, "AWS", "US_EAST_1", "", emptyTimeoutConfig, false, nil),
3257-
Check: checkFlexClusterConfig(projectID, clusterName, "AWS", "US_EAST_1", false),
3261+
Check: checkFlexClusterConfig(projectID, clusterName, "AWS", "US_EAST_1", false, true),
32583262
},
32593263
{
32603264
Config: configFlexCluster(t, projectID, clusterName, "AWS", "US_EAST_1", "", emptyTimeoutConfig, true, nil),
3261-
Check: checkFlexClusterConfig(projectID, clusterName, "AWS", "US_EAST_1", true),
3265+
Check: checkFlexClusterConfig(projectID, clusterName, "AWS", "US_EAST_1", true, true),
32623266
},
32633267
acc.TestStepImportCluster(resourceName),
32643268
{
@@ -3319,7 +3323,7 @@ func TestAccAdvancedCluster_updateDeleteTimeoutFlex(t *testing.T) {
33193323
})
33203324
}
33213325

3322-
func checkFlexClusterConfig(projectID, clusterName, providerName, region string, tagsCheck bool) resource.TestCheckFunc {
3326+
func checkFlexClusterConfig(projectID, clusterName, providerName, region string, tagsCheck, checkPlural bool) resource.TestCheckFunc {
33233327
checks := []resource.TestCheckFunc{acc.CheckExistsFlexCluster()}
33243328
attrMapAdvCluster := map[string]string{
33253329
"name": clusterName,
@@ -3362,17 +3366,22 @@ func checkFlexClusterConfig(projectID, clusterName, providerName, region string,
33623366
tagsCheck := checkKeyValueBlocks(true, true, "tags", tagsMap)
33633367
checks = append(checks, tagsCheck)
33643368
}
3365-
pluralMap := map[string]string{
3366-
"project_id": projectID,
3367-
"results.#": "1",
3368-
}
33693369
checks = acc.AddAttrChecks(acc.FlexDataSourceName, checks, attrMapFlex)
33703370
checks = acc.AddAttrSetChecks(acc.FlexDataSourceName, checks, attrSetFlex...)
3371-
checks = acc.AddAttrChecks(acc.FlexDataSourcePluralName, checks, pluralMap)
3372-
checks = acc.AddAttrChecksPrefix(acc.FlexDataSourcePluralName, checks, attrMapFlex, "results.0")
3373-
checks = acc.AddAttrSetChecksPrefix(acc.FlexDataSourcePluralName, checks, attrSetFlex, "results.0")
3374-
checks = acc.AddAttrChecks(dataSourcePluralName, checks, pluralMap)
33753371
ds := conversion.StringPtr(dataSourceName)
3376-
dsp := conversion.StringPtr(dataSourcePluralName)
3372+
var dsp *string
3373+
3374+
if checkPlural {
3375+
dsp = conversion.StringPtr(dataSourcePluralName)
3376+
3377+
pluralMap := map[string]string{
3378+
"project_id": projectID,
3379+
"results.#": "1",
3380+
}
3381+
checks = acc.AddAttrChecks(acc.FlexDataSourcePluralName, checks, pluralMap)
3382+
checks = acc.AddAttrChecksPrefix(acc.FlexDataSourcePluralName, checks, attrMapFlex, "results.0")
3383+
checks = acc.AddAttrSetChecksPrefix(acc.FlexDataSourcePluralName, checks, attrSetFlex, "results.0")
3384+
checks = acc.AddAttrChecks(dataSourcePluralName, checks, pluralMap)
3385+
}
33773386
return acc.CheckRSAndDSPreviewProviderV2(true, resourceName, ds, dsp, attrSetAdvCluster, attrMapAdvCluster, checks...)
33783387
}

0 commit comments

Comments
 (0)