Skip to content

Commit ca002b5

Browse files
oarbusicveticmAgustinBettatiEspenAlbertsvc-apix-Bot
authored
feat: Adds mongodbatlas_flex_cluster resource and data sources (#2816)
* use SDK dev-preview * chore: Generate Flex Cluster file structure and resource schema (#2702) * generate resource and schema * pr comments * correct Map * feat: Implements `mongodbatlas_flex_cluster` resource (#2716) * create implementation * read implementation * update and delete implementation * Implement model * schema refactor * format * wip: model tests * initial model test * test for NewTFModel * Test NewAtlasCreateReq * test NewAtlasUpdateReq * fix tests * refactor for tags * fixes * implement import * simplify update * basic acceptance test * wip: acc tests * fix model test * final changes on tests * changelog entry * add resource to fallback template * Update .changelog/2716.txt Co-authored-by: Agustin Bettati <[email protected]> * set resource to preview --------- Co-authored-by: Melanija Cvetic <[email protected]> Co-authored-by: Agustin Bettati <[email protected]> * chore: Enable mongodbatlas_flex_cluster test in CI (#2720) * create implementation * read implementation * update and delete implementation * initial model test * Test NewAtlasCreateReq * fixes * changelong and fix to acceptance-tests-runner.yml * fix to changelog * removed changelog * resolve rebase issue * fix to implementation * change test to use existing project id * Adjusting predeployed project id name and added preview enable * fix the naming convension of env var --------- Co-authored-by: Oriol Arbusi <[email protected]> * chore: Generate Flex Cluster data source file and schemas (#2725) * generate data source file and schema for singular Flex Cluster * Generate plural data source schema * Changing type of tags in schema * Fix to data source schema * chore: Adds state transition logic to mongodbatlas_flex_cluster resource (#2721) * implements state transition * use state transition in create, update and delete * PR comments * chore: Update operation improvements for `mongodbatlas_flex_cluster` resource (#2729) * schema refactors * revert rename * implement isUpdateAllowed * failed update test case * refactor equal checks * make more exhaustive the failed update test * remove UseStateForUnknown in state_name * wip: use plan modifier for non updatable fields * wip: use plan modifiers on all non updatable attributes * use plan modifiers to fail on update of certain attributes * rename planmodifier * simplify planmodifier * PR comments * remove attribute parameter * markdowndescription over description * test: Enable mongodbatlas_flex_cluster tests in QA environment (#2741) * feat: Implements and tests `mongodbatlas_flex_cluster` data source (#2738) * Implementing read funciton in data source * Acc test for data source * Added changelog * implementing review suggestions * fix to rebase * Adjusting default timeout of `flex_cluster` to 3 hours (#2757) * chore: Rebase dev_branch onto master_branch (#2764) * feat: Adds `is_slow_operation_thresholding_enabled` attribute to `mongodbatlas_project` (#2698) * feat: Initial support for is_slow_operation_thresholding_enabled * test: fix test cases * chore: add changelog entry * test: Add extra check for plural data source * refactor: only set SetSlowOperationThresholding once during update * chore: fix lint error * fix: need to set SetSlowOperationThresholding before reading project props from API * chore: address PR comment * doc: Add documentation for `is_slow_operation_thresholding_enabled` to project (#2700) * chore: Updates CHANGELOG.md for #2698 * chore: Use `qa` for TestSuite on Sundays (#2701) * build(deps): bump go.mongodb.org/atlas-sdk (#2705) Co-authored-by: lantoli <[email protected]> * wait in second test (#2707) * chore: Supports running Test Suite in QA on sundays (#2711) * Revert "chore: Use `qa` for TestSuite on Sundays (#2701)" This reverts commit 942e097. * chore: Supports running qa only on Sundays * address PR comments * refactor: move job to steps of variables * chore: Add top level description * chore: Adds SDK Preview (#2713) * add client * SDK update GHA * simulate Preview update * example of use for Admin Preview * Revert "example of use for Admin Preview" This reverts commit c5edef5. * rename adminPreview to adminpreview in client * example of use of SDK Preview * reverse example * go mod tidy * build(deps): bump go.mongodb.org/atlas-sdk (#2715) Co-authored-by: lantoli <[email protected]> * ci: fix env-vars for azure QA (#2709) * doc: Advanced Cluster Differences and TF Core Upgrades (#2633) * adv cluster differences doc updates * Update docs/index.md * Update index.md * Update advanced_cluster.md * Update advanced_cluster.md * Update advanced_cluster.md * Update cluster.md * Update docs/index.md Co-authored-by: maastha <[email protected]> * Update docs/resources/cluster.md Co-authored-by: maastha <[email protected]> * Update docs/resources/cluster.md Co-authored-by: Melissa Plunkett <[email protected]> * Update advanced_cluster.md * Update cluster-to-advanced-cluster-migration-guide.md --------- Co-authored-by: maastha <[email protected]> Co-authored-by: Melissa Plunkett <[email protected]> * revert SDK preview changes (#2719) * fix: Fixes inconsistent result when using a multi-region cluster by always using a single spec (#2685) * fix: Initial workaround for multiple specs issuing a warning of spec missmatch * fix: can only use multiple specs in data source (schema limitation) * test: Add a test to confirm multi-region cluster can be used with search deployment * chore: changelog file * chore: fix test enum value * chore: revert timeout changes * Update .changelog/2685.txt Co-authored-by: kanchana-mongodb <[email protected]> --------- Co-authored-by: Leo Antoli <[email protected]> Co-authored-by: kanchana-mongodb <[email protected]> * chore: Updates CHANGELOG.md for #2685 * chore: Updates examples link in index.md for v1.21.2 release * chore: Updates CHANGELOG.md header for v1.21.2 release * fix TestAccBackupSnapshotExportJob_basic (#2723) * chore: Bump github.com/hashicorp/terraform-plugin-framework-validators (#2727) Bumps [github.com/hashicorp/terraform-plugin-framework-validators](https://github.com/hashicorp/terraform-plugin-framework-validators) from 0.13.0 to 0.14.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-framework-validators/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-framework-validators/blob/main/CHANGELOG.md) - [Commits](hashicorp/terraform-plugin-framework-validators@v0.13.0...v0.14.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-framework-validators dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: Fixes `mongodbatlas_project` when user doesn't have project owner permission (#2731) * update doc * add deprecated message * changelog * deprecate params * initial TestAccProject_slowOperationNotOwner * update version to 1.24.0 * changeRoles * Revert "changeRoles" This reverts commit c8ba3c8. * Revert "initial TestAccProject_slowOperationNotOwner" This reverts commit d147371. * don't update the value if it's in Create so value is unknown * pass warnings * Update internal/service/project/resource_project.go Co-authored-by: Marco Suma <[email protected]> * apply feedback in doc * clarify docs --------- Co-authored-by: Marco Suma <[email protected]> * chore: Updates CHANGELOG.md for #2731 * chore: Merging schema generation internal tool PoC into master branch (#2735) * feat: Adds initial schema and config models for PoC - Model generation (#2638) * update computability type (#2668) * chore: PoC - Model generation - support primitive types at root level (#2673) * chore: PoC - Schema code generation - Initial support of primitive types (#2682) * initial commit with schema generation function and test fixture * small changes wip * include specific type generators * handling element types and imports * remove unrelated file * extract template logic to separate file * small revert change * extract import to const * follow up adjustments from PR comments and sync with Aastha * chore: PoC - Schema code generation - Supporting nested attributes (#2689) * support nested attribute types * rebasing changes related to unit testing adjustment * chore: PoC - Model generation - Supporting nested schema (List, ListNested, Set & SetNested) (#2693) * chore: PoC - Model generation - Supporting nested schema (objects - Map, MapNested, SingleNested Attributes) (#2704) * chore: PoC - Schema code generation - Supporting generation of typed model (#2703) * support typed model generation inlcuding root and nested attributes * minor fix for type of types map * add clarifying comment * improve name of generated object types, refactor function naming for readability * fix list map and set nested attribute generation (#2708) * chore: PoC - Model generation - support config aliases, ignores, and description overrides (#2712) * chore: PoC - Define make command to call code generation logic (#2706) * wip * iterating over all resources * add config for search deployment * update golden file test with fix in package name * use xstring implementation for pascal case * simplify write file logic * merge fixes * chore: PoC - Support configuration of timeout in schema (#2717) * wip * rebase fixes * fix logic avoiding adding timeout in nested schemas * fix generation * fix enum processing * fix golden file in timeout test * comment out unsupported config properties * simplify interfaces for attribute generation leaving common code in a separate function * chore: PoC - handle merging computability in nested attributes (#2722) * adjusting contributing guide (#2732) --------- Co-authored-by: maastha <[email protected]> Co-authored-by: Aastha Mahendru <[email protected]> * doc: Adds documentation for `replication_specs.*.external_id` computed attribute for `mongodbatlas_advanced_cluster` (#2734) * adds M0 (#2730) * docs: Remove legacy project_id attribute in docs as it has been removed (#2733) * chore: Updates examples link in index.md for v1.21.3 release * chore: Updates CHANGELOG.md header for v1.21.3 release * chore: Unify file name for plural data source schema (#2739) * change name * fix name * rename to plural_data_source.go * check cluster creation times (#2728) * fix: Adds new attribute `results` and deprecates `resource_policies` for `mongodbatlas_resource_policies` data source (#2740) * new attribute results and deprecate resource_policies * changelog entry * change test to check new attribute * fix changelog * changelog fix * fix docs * Update .changelog/2740.txt Co-authored-by: Leo Antoli <[email protected]> * migration test * skip mig test until next version * fix comment --------- Co-authored-by: Leo Antoli <[email protected]> * chore: Updates CHANGELOG.md for #2740 * build(deps): bump go.mongodb.org/atlas-sdk (#2745) Co-authored-by: wtrocki <[email protected]> * fix: Fixes change assigments in `mongodbatlas_project_api_key` (#2737) * fix changed assigments * fix TestAccProjectAPIKey_updateRole * changelog * join configMultiple to configBasic * don't allow duplicate projectIDs * fix TestAccProjectAPIKey_dataSources * refactor Create * refactor getAPIProjectAssignments and flattenProjectAssignments * refactor Read * refactor Delete * fix TestAccProjectAPIKey_recreateWhenDeletedExternally * refactor Import * remove flattenProjectAssignments, flattenProjectAPIKeyRoles and getAPIProjectAssignments * fix plural ds * fix basicTestCase * refactor Update description * refactor Update * refactor expandProjectAssignments * update changelog * initial checkAggr * checkExists * delete redundant TestAccProjectAPIKey_dataSources * refactor configDuplicatedProject * refactor configChangingProject * model file * more detailed changelog * revert import * doc * refactor checks * chore: Updates CHANGELOG.md for #2737 * chore: Updates examples link in index.md for v1.21.4 release * chore: Updates CHANGELOG.md header for v1.21.4 release * chore: Support computability override in schema generation config (#2743) * test without parsing config options * add support for override of computability in config * refactor tests removing redudant code * extract common api spec path, handle computed only case * chore: Bump crazy-max/ghaction-import-gpg from 6.1.0 to 6.2.0 (#2754) Bumps [crazy-max/ghaction-import-gpg](https://github.com/crazy-max/ghaction-import-gpg) from 6.1.0 to 6.2.0. - [Release notes](https://github.com/crazy-max/ghaction-import-gpg/releases) - [Commits](crazy-max/ghaction-import-gpg@01dd5d3...cb9bde2) --- updated-dependencies: - dependency-name: crazy-max/ghaction-import-gpg dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: Bump actions/setup-go from 5.0.2 to 5.1.0 (#2753) Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.0.2 to 5.1.0. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](actions/setup-go@0a12ed9...41dfa10) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: Bump github.com/pb33f/libopenapi from 0.18.1 to 0.18.6 (#2750) Bumps [github.com/pb33f/libopenapi](https://github.com/pb33f/libopenapi) from 0.18.1 to 0.18.6. - [Release notes](https://github.com/pb33f/libopenapi/releases) - [Commits](pb33f/libopenapi@v0.18.1...v0.18.6) --- updated-dependencies: - dependency-name: github.com/pb33f/libopenapi dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: Bump tj-actions/verify-changed-files (#2751) Bumps [tj-actions/verify-changed-files](https://github.com/tj-actions/verify-changed-files) from 54483a2138ca67989bc40785aa22faee8b085894 to 530d86d0a237225c87beaa000750988f8965ee31. - [Release notes](https://github.com/tj-actions/verify-changed-files/releases) - [Changelog](https://github.com/tj-actions/verify-changed-files/blob/main/HISTORY.md) - [Commits](tj-actions/verify-changed-files@54483a2...530d86d) --- updated-dependencies: - dependency-name: tj-actions/verify-changed-files dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: Bump actions/checkout from 4.2.1 to 4.2.2 (#2752) * chore: Bump actions/checkout from 4.2.1 to 4.2.2 Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.1 to 4.2.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@eef6144...11bd719) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Trigger Build --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Leo Antoli <[email protected]> * chore: Automatically updates Terraform version used in repository and test-suite (#2755) * rename workflow (#2761) * chore: Updates Atlas Go SDK (#2748) * build(deps): bump go.mongodb.org/atlas-sdk * Pin cluster POST and PATCH operations to 2024-08-05 avoiding any unintentional shard level autoscaling * unifying version clarification in comments * use sdk utility function for checking error code value * adjust conditional of error checking preserving behaviour --------- Co-authored-by: AgustinBettati <[email protected]> Co-authored-by: Agustin Bettati <[email protected]> * chore: Generate Flex Cluster file structure and resource schema (#2702) * generate resource and schema * pr comments * correct Map * feat: Implements `mongodbatlas_flex_cluster` resource (#2716) * create implementation * read implementation * update and delete implementation * Implement model * schema refactor * format * wip: model tests * initial model test * test for NewTFModel * Test NewAtlasCreateReq * test NewAtlasUpdateReq * fix tests * refactor for tags * fixes * implement import * simplify update * basic acceptance test * wip: acc tests * fix model test * final changes on tests * changelog entry * add resource to fallback template * Update .changelog/2716.txt Co-authored-by: Agustin Bettati <[email protected]> * set resource to preview --------- Co-authored-by: Melanija Cvetic <[email protected]> Co-authored-by: Agustin Bettati <[email protected]> * chore: Enable mongodbatlas_flex_cluster test in CI (#2720) * create implementation * read implementation * update and delete implementation * initial model test * Test NewAtlasCreateReq * fixes * changelong and fix to acceptance-tests-runner.yml * fix to changelog * removed changelog * resolve rebase issue * fix to implementation * change test to use existing project id * Adjusting predeployed project id name and added preview enable * fix the naming convension of env var --------- Co-authored-by: Oriol Arbusi <[email protected]> * chore: Generate Flex Cluster data source file and schemas (#2725) * generate data source file and schema for singular Flex Cluster * Generate plural data source schema * Changing type of tags in schema * Fix to data source schema * chore: Adds state transition logic to mongodbatlas_flex_cluster resource (#2721) * implements state transition * use state transition in create, update and delete * PR comments * chore: Update operation improvements for `mongodbatlas_flex_cluster` resource (#2729) * schema refactors * revert rename * implement isUpdateAllowed * failed update test case * refactor equal checks * make more exhaustive the failed update test * remove UseStateForUnknown in state_name * wip: use plan modifier for non updatable fields * wip: use plan modifiers on all non updatable attributes * use plan modifiers to fail on update of certain attributes * rename planmodifier * simplify planmodifier * PR comments * remove attribute parameter * markdowndescription over description * test: Enable mongodbatlas_flex_cluster tests in QA environment (#2741) * feat: Implements and tests `mongodbatlas_flex_cluster` data source (#2738) * Implementing read funciton in data source * Acc test for data source * Added changelog * implementing review suggestions * fix to rebase * Adjusting default timeout of `flex_cluster` to 3 hours (#2757) * fixing imports * Adopting latest preview SDK version * fix flex varibale names after bump * fix atlasuser - set to continue using older SDK version * Fix to variable type names in flex unit test * fix duplicate * fix to api call in atlasUser tests --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Espen Albert <[email protected]> Co-authored-by: svc-apix-bot <[email protected]> Co-authored-by: svc-apix-Bot <[email protected]> Co-authored-by: lantoli <[email protected]> Co-authored-by: Zuhair Ahmed <[email protected]> Co-authored-by: maastha <[email protected]> Co-authored-by: Melissa Plunkett <[email protected]> Co-authored-by: kanchana-mongodb <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marco Suma <[email protected]> Co-authored-by: Agustin Bettati <[email protected]> Co-authored-by: Aastha Mahendru <[email protected]> Co-authored-by: Oriol <[email protected]> Co-authored-by: wtrocki <[email protected]> Co-authored-by: AgustinBettati <[email protected]> * feat: Implements `mongodbatlas_flex_cluster` plural data source (#2767) * Fix naming convensions in plural DS schema * Implementing plural DS read function * testing and plural ds model * fixes after rebase * additional unit testing for model * changelog * lint fix * removing parellel testing * implemented review feedback * lint fix * chore: Improvements to SDK version update (#2770) * comment use of older API version in atlasUser * add connv220240805 to factory.go * doc: Adds documentation and example for mongodbatlas_flex_cluster resource and data source (#2744) * wip: docs and example (missing data source * change version to make the CI check successful * fmt * regenerate * data source examples * readme created - to adjust preview feature note on release of flex to prod * data source templates * fix typo * generate data source documentation * fix to flex_cluster example * fix to flex_cluster example * fix to generated docs * Added flex to dedicated migration guide * fix typo * Implementing feedback and improving flex-dedicated migratoin guide * adjust flex example README.md * fix to example --------- Co-authored-by: Melanija Cvetic <[email protected]> * deprecate: Deprecates Serverless functionality (#2742) * deprecates serverless functionality * documentation * deprecate attributes in data sources * set link to migration guide with supported migration paths * doc: Adds migration guides to transition out of Serverless and Shared-tier clusters (#2746) * wip: migration guides * add details on 1.22 guide * remove guide, will be in resource docs * wip: correct details on 1.22 guide * added migration guide for serverless to flex and serverless to dedicated * added migration guide for shared-tier to flex * added migration guide for serverless to free * implementing review feedback * implementing feedback to guide * changes to migration guide * Adjustments to migration guides * put URL instead of placeholder * move post before pre autoconversion guides, clarify serverless to dedicated * pr comment * pr comments * Update docs/guides/1.22.0-upgrade-guide.md Co-authored-by: lmkerbey-mdb <[email protected]> * Update docs/guides/serverless-shared-migration-guide.md Co-authored-by: lmkerbey-mdb <[email protected]> * Update docs/guides/1.22.0-upgrade-guide.md Co-authored-by: lmkerbey-mdb <[email protected]> * Update docs/guides/serverless-shared-migration-guide.md Co-authored-by: lmkerbey-mdb <[email protected]> * Update docs/guides/serverless-shared-migration-guide.md Co-authored-by: lmkerbey-mdb <[email protected]> * Update docs/guides/serverless-shared-migration-guide.md Co-authored-by: lmkerbey-mdb <[email protected]> * Update docs/guides/serverless-shared-migration-guide.md Co-authored-by: cveticm <[email protected]> * Update docs/guides/serverless-shared-migration-guide.md Co-authored-by: cveticm <[email protected]> --------- Co-authored-by: Melanija Cvetic <[email protected]> Co-authored-by: lmkerbey-mdb <[email protected]> Co-authored-by: cveticm <[email protected]> * chore: Removes mentions and examples of Serverless and Shared-tier instances (#2811) * wip remove mentions of serverless and shared tier * remove examples from template for serverless privatelink * change from M5 to M0 for tenant examples of adv cluster * add note on M0 * chore: Refactor tags attribute schema and conversion logic (#2788) * Implements tag as common function * Refactor project and flex cluster to use new common tag functions * fix to testing and lint * fix changelog entry * january or later for shared tier autoconversion * auto-generate singular data source, temporarily with checks * remove singular data source check * update Description in plural data source --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Melanija Cvetic <[email protected]> Co-authored-by: Agustin Bettati <[email protected]> Co-authored-by: cveticm <[email protected]> Co-authored-by: Espen Albert <[email protected]> Co-authored-by: svc-apix-bot <[email protected]> Co-authored-by: svc-apix-Bot <[email protected]> Co-authored-by: lantoli <[email protected]> Co-authored-by: Zuhair Ahmed <[email protected]> Co-authored-by: maastha <[email protected]> Co-authored-by: Melissa Plunkett <[email protected]> Co-authored-by: kanchana-mongodb <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marco Suma <[email protected]> Co-authored-by: Aastha Mahendru <[email protected]> Co-authored-by: wtrocki <[email protected]> Co-authored-by: AgustinBettati <[email protected]> Co-authored-by: lmkerbey-mdb <[email protected]>
1 parent ba55260 commit ca002b5

File tree

85 files changed

+2659
-841
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+2659
-841
lines changed

.changelog/2716.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:new-resource
2+
mongodbatlas_flex_cluster
3+
```

.changelog/2738.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:new-datasource
2+
mongodbatlas_flex_cluster
3+
```

.changelog/2742.txt

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
```release-note:note
2+
resource/mongodbatlas_serverless_instance: Deprecates `continuous_backup_enabled` attribute
3+
```
4+
5+
```release-note:note
6+
resource/mongodbatlas_serverless_instance: Deprecates `auto_indexing` attribute
7+
```
8+
9+
```release-note:note
10+
data-source/mongodbatlas_serverless_instance: Deprecates `continuous_backup_enabled` attribute
11+
```
12+
13+
```release-note:note
14+
data-source/mongodbatlas_serverless_instance: Deprecates `auto_indexing` attribute
15+
```
16+
17+
```release-note:note
18+
data-source/mongodbatlas_serverless_instances: Deprecates `continuous_backup_enabled` attribute
19+
```
20+
21+
```release-note:note
22+
data-source/mongodbatlas_serverless_instances: Deprecates `auto_indexing` attribute
23+
```
24+
25+
```release-note:note
26+
resource/mongodbatlas_privatelink_endpoint_serverless: Deprecates resource
27+
```
28+
29+
```release-note:note
30+
resource/mongodbatlas_privatelink_endpoint_service_serverless: Deprecates resource
31+
```
32+
33+
```release-note:note
34+
data-source/mongodbatlas_privatelink_endpoint_service_serverless: Deprecates data source
35+
```
36+
37+
```release-note:note
38+
data-source/mongodbatlas_privatelink_endpoints_service_serverless: Deprecates data source
39+
```

.changelog/2767.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:new-datasource
2+
mongodbatlas_flex_clusters
3+
```

.github/workflows/acceptance-tests-runner.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ on:
9595
azure_private_endpoint_region:
9696
type: string
9797
required: true
98+
mongodb_atlas_flex_project_id:
99+
type: string
100+
required: true
98101
secrets: # all secrets are passed explicitly in this workflow
99102
mongodb_atlas_public_key:
100103
required: true
@@ -213,6 +216,7 @@ jobs:
213216
encryption: ${{ steps.filter.outputs.encryption == 'true' || env.mustTrigger == 'true' }}
214217
event_trigger: ${{ steps.filter.outputs.event_trigger == 'true' || env.mustTrigger == 'true' }}
215218
federated: ${{ steps.filter.outputs.federated == 'true' || env.mustTrigger == 'true' }}
219+
flex_cluster: ${{ steps.filter.outputs.flex_cluster == 'true' || env.mustTrigger == 'true' }}
216220
generic: ${{ steps.filter.outputs.generic == 'true' || env.mustTrigger == 'true' }}
217221
global_cluster_config: ${{ steps.filter.outputs.global_cluster_config == 'true' || env.mustTrigger == 'true' }}
218222
ldap: ${{ steps.filter.outputs.ldap == 'true' || env.mustTrigger == 'true' }}
@@ -278,6 +282,8 @@ jobs:
278282
- 'internal/service/federatedsettingsidentityprovider/*.go'
279283
- 'internal/service/federatedsettingsorgconfig/*.go'
280284
- 'internal/service/federatedsettingsorgrolemapping/*.go'
285+
flex_cluster:
286+
- 'internal/service/flexcluster/*.go'
281287
generic:
282288
- 'internal/service/auditing/*.go'
283289
- 'internal/service/backupcompliancepolicy/*.go'
@@ -654,6 +660,30 @@ jobs:
654660
./internal/service/federatedsettingsorgrolemapping
655661
run: make testacc
656662

663+
flex_cluster:
664+
needs: [ change-detection, get-provider-version ]
665+
if: ${{ needs.change-detection.outputs.flex_cluster == 'true' || inputs.test_group == 'flex_cluster' }}
666+
runs-on: ubuntu-latest
667+
permissions: {}
668+
steps:
669+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
670+
with:
671+
ref: ${{ inputs.ref || github.ref }}
672+
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
673+
with:
674+
go-version-file: 'go.mod'
675+
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
676+
with:
677+
terraform_version: ${{ inputs.terraform_version }}
678+
terraform_wrapper: false
679+
- name: Acceptance Tests
680+
env:
681+
MONGODB_ATLAS_LAST_VERSION: ${{ needs.get-provider-version.outputs.provider_version }}
682+
MONGODB_ATLAS_FLEX_PROJECT_ID: ${{ inputs.mongodb_atlas_flex_project_id }}
683+
MONGODB_ATLAS_ENABLE_PREVIEW: "true"
684+
ACCTEST_PACKAGES: ./internal/service/flexcluster
685+
run: make testacc
686+
657687
generic:
658688
needs: [ change-detection, get-provider-version ]
659689
if: ${{ needs.change-detection.outputs.generic == 'true' || inputs.test_group == 'generic' }}

.github/workflows/acceptance-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,4 @@ jobs:
115115
mongodb_atlas_enable_preview: ${{ vars.MONGODB_ATLAS_ENABLE_PREVIEW }}
116116
azure_private_endpoint_region: ${{ vars.AZURE_PRIVATE_ENDPOINT_REGION }}
117117
mongodb_atlas_rp_org_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_RP_ORG_ID_QA || vars.MONGODB_ATLAS_RP_ORG_ID_DEV }}
118+
mongodb_atlas_flex_project_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_FLEX_PROJECT_ID_QA || vars.MONGODB_ATLAS_FLEX_PROJECT_ID }}

.github/workflows/update-tf-versions.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ jobs:
3838
pull-requests: write
3939
steps:
4040
- name: Checkout
41-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
41+
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
4242
- name: Update files
4343
env:
4444
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4545
run: make update-tf-version-in-repository
4646
- name: Verify Changed files
47-
uses: tj-actions/verify-changed-files@530d86d0a237225c87beaa000750988f8965ee31
47+
uses: tj-actions/verify-changed-files@54483a2138ca67989bc40785aa22faee8b085894
4848
id: verify-changed-files
4949
- name: Create PR
5050
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f

docs/data-sources/advanced_cluster.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ resource "mongodbatlas_advanced_cluster" "example" {
1919
replication_specs {
2020
region_configs {
2121
electable_specs {
22-
instance_size = "M5"
22+
instance_size = "M0"
2323
}
2424
provider_name = "TENANT"
2525
backing_provider_name = "AWS"
@@ -35,6 +35,8 @@ data "mongodbatlas_advanced_cluster" "example" {
3535
}
3636
```
3737

38+
**NOTE:** There can only be one M0 cluster per project.
39+
3840
## Example using latest sharding configurations with independent shard scaling in the cluster
3941

4042
```terraform

docs/data-sources/advanced_clusters.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ resource "mongodbatlas_advanced_cluster" "example" {
1919
replication_specs {
2020
region_configs {
2121
electable_specs {
22-
instance_size = "M5"
22+
instance_size = "M0"
2323
}
2424
provider_name = "TENANT"
2525
backing_provider_name = "AWS"
@@ -34,6 +34,8 @@ data "mongodbatlas_advanced_clusters" "example" {
3434
}
3535
```
3636

37+
**NOTE:** There can only be one M0 cluster per project.
38+
3739
## Example using latest sharding configurations with independent shard scaling in the cluster
3840

3941
```terraform

docs/data-sources/flex_cluster.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Data Source: mongodbatlas_flex_cluster
2+
3+
`mongodbatlas_flex_cluster` describes a flex cluster.
4+
5+
## Example Usages
6+
```terraform
7+
resource "mongodbatlas_flex_cluster" "example-cluster" {
8+
project_id = var.project_id
9+
name = var.cluster_name
10+
provider_settings = {
11+
backing_provider_name = "AWS"
12+
region_name = "US_EAST_1"
13+
}
14+
termination_protection_enabled = true
15+
}
16+
17+
data "mongodbatlas_flex_cluster" "example-cluster" {
18+
project_id = var.project_id
19+
name = mongodbatlas_flex_cluster.example-cluster.name
20+
}
21+
22+
data "mongodbatlas_flex_clusters" "example-clusters" {
23+
project_id = var.project_id
24+
}
25+
26+
output "mongodbatlas_flex_cluster" {
27+
value = data.mongodbatlas_flex_cluster.example-cluster.name
28+
}
29+
30+
output "mongodbatlas_flex_clusters_names" {
31+
value = [for cluster in data.mongodbatlas_flex_clusters.example-clusters.results : cluster.name]
32+
}
33+
```
34+
35+
<!-- schema generated by tfplugindocs -->
36+
## Schema
37+
38+
### Required
39+
40+
- `name` (String) Human-readable label that identifies the instance.
41+
- `project_id` (String) Unique 24-hexadecimal character string that identifies the project.
42+
43+
### Read-Only
44+
45+
- `backup_settings` (Attributes) Flex backup configuration (see [below for nested schema](#nestedatt--backup_settings))
46+
- `cluster_type` (String) Flex cluster topology.
47+
- `connection_strings` (Attributes) Collection of Uniform Resource Locators that point to the MongoDB database. (see [below for nested schema](#nestedatt--connection_strings))
48+
- `create_date` (String) Date and time when MongoDB Cloud created this instance. This parameter expresses its value in ISO 8601 format in UTC.
49+
- `id` (String) Unique 24-hexadecimal digit string that identifies the instance.
50+
- `mongo_db_version` (String) Version of MongoDB that the instance runs.
51+
- `provider_settings` (Attributes) Group of cloud provider settings that configure the provisioned MongoDB flex cluster. (see [below for nested schema](#nestedatt--provider_settings))
52+
- `state_name` (String) Human-readable label that indicates the current operating condition of this instance.
53+
- `tags` (Map of String) Map that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the instance.
54+
- `termination_protection_enabled` (Boolean) 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.
55+
- `version_release_system` (String) Method by which the cluster maintains the MongoDB versions.
56+
57+
<a id="nestedatt--backup_settings"></a>
58+
### Nested Schema for `backup_settings`
59+
60+
Read-Only:
61+
62+
- `enabled` (Boolean) Flag that indicates whether backups are performed for this flex cluster. Backup uses [TODO](TODO) for flex clusters.
63+
64+
65+
<a id="nestedatt--connection_strings"></a>
66+
### Nested Schema for `connection_strings`
67+
68+
Read-Only:
69+
70+
- `standard` (String) Public connection string that you can use to connect to this cluster. This connection string uses the mongodb:// protocol.
71+
- `standard_srv` (String) Public connection string that you can use to connect to this flex cluster. This connection string uses the `mongodb+srv://` protocol.
72+
73+
74+
<a id="nestedatt--provider_settings"></a>
75+
### Nested Schema for `provider_settings`
76+
77+
Read-Only:
78+
79+
- `backing_provider_name` (String) Cloud service provider on which MongoDB Cloud provisioned the flex cluster.
80+
- `disk_size_gb` (Number) Storage capacity available to the flex cluster expressed in gigabytes.
81+
- `provider_name` (String) Human-readable label that identifies the cloud service provider.
82+
- `region_name` (String) Human-readable label that identifies the geographic location of your MongoDB flex cluster. The region you choose can affect network latency for clients accessing your databases. For a complete list of region names, see [AWS](https://docs.atlas.mongodb.com/reference/amazon-aws/#std-label-amazon-aws), [GCP](https://docs.atlas.mongodb.com/reference/google-gcp/), and [Azure](https://docs.atlas.mongodb.com/reference/microsoft-azure/).
83+
84+
For more information see: [MongoDB Atlas API - Flex Cluster](https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Flex-Clusters/operation/getFlexCluster) Documentation.

0 commit comments

Comments
 (0)