Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Migrates some resources to new file structure #1700

Merged
merged 10 commits into from
Dec 4, 2023

Conversation

lantoli
Copy link
Member

@lantoli lantoli commented Dec 4, 2023

Description

Migrates some resources to new file structure:

Type of change:

  • Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
  • New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR.
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the contribution guidelines
  • I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code
  • If changes include deprecations or removals, I defined an isolated PR with a relevant title as it will be used in the auto-generated changelog.

Further comments

Copy link
Collaborator

@andreaangiolillo andreaangiolillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

@@ -14,7 +14,7 @@ import (
matlas "go.mongodb.org/atlas/mongodbatlas"
)

func DataSourceAdvancedClusters() *schema.Resource {
func PluralDataSource() *schema.Resource {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(not blocking) Interesting name 🤔 What do you think about DataSources instead?

Suggested change
func PluralDataSource() *schema.Resource {
func DataSources() *schema.Resource {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm following what @AgustinBettati started, not a strong opinion to either

@@ -186,12 +192,12 @@ func getDataSourcesMap() map[string]*schema.Resource {

func getResourcesMap() map[string]*schema.Resource {
resourcesMap := map[string]*schema.Resource{
"mongodbatlas_advanced_cluster": advancedcluster.ResourceAdvancedCluster(),
"mongodbatlas_advanced_cluster": advancedcluster.Resource(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to update the github actions with the new path?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, you're right!

Copy link
Member

@AgustinBettati AgustinBettati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

github-actions bot commented Dec 4, 2023

Code Coverage

Package Line Rate Health
github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion 31%
github.com/mongodb/terraform-provider-mongodbatlas/internal/common/validate 68%
github.com/mongodb/terraform-provider-mongodbatlas/internal/provider 5%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/advancedcluster 3%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/alertconfiguration 33%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/atlasuser 0%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/backupcompliancepolicy 1%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/cloudbackupschedule 1%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/cloudbackupsnapshot 5%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/cloudbackupsnapshotexportbucket 3%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/cloudbackupsnapshotexportjob 3%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/cloudbackupsnapshotrestorejob 2%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/cluster 1%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/databaseuser 0%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/encryptionatrest 0%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/project 0%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/projectapikey 1%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/projectipaccesslist 0%
github.com/mongodb/terraform-provider-mongodbatlas/internal/service/searchdeployment 23%
github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/acc 5%
github.com/mongodb/terraform-provider-mongodbatlas/mongodbatlas 2%
Summary 4% (434 / 10694)

@lantoli lantoli merged commit 28ecb10 into master Dec 4, 2023
28 of 29 checks passed
@lantoli lantoli deleted the CLOUDP-214973_cloud_backup branch December 4, 2023 10:36
@@ -3,7 +3,7 @@ name: 'Test Suite'
on:
workflow_dispatch:
schedule:
- cron: "0 2 * * *" # workflow runs every day at 02:00 AM
- cron: "0 0 * * *" # workflow runs every day at midnight UTC
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to hav more time

@@ -18,7 +18,7 @@ jobs:
max-parallel: 1
fail-fast: false
matrix:
terraform_version: ['', '1.1.6', '1.0.8'] # '' for latest version
terraform_version: ['', '1.0.8'] # '' for latest version
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already have the data for 1.1.6, removed to decrease time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants