Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information