akshaykarle / terraform-provider-mongodbatlas

Terraform provider for MongoDB Atlas
Mozilla Public License 2.0
123 stars 54 forks source link

Terraform Provider Development Program #27

Closed cgriggs01 closed 5 years ago

cgriggs01 commented 6 years ago

Hi All! 👋

I have opened this PR for the purpose of preparing the MongoDB Atlas Terraform provider for review and release into the official Terraform ecosystem. The following list are items that should be addressed before moving on tot the technical review and release portion of the program.

Once these are complete we can start testing the provider against a MongoDB Atlas env, after the tests pass we will start the technical review with one of our Terraform Engineers.

Please let me know if you have any questions.

Best, Chris

akshaykarle commented 6 years ago

Hey @cgriggs01 thanks for taking the time to put this list together. I've been busy the last few weeks but I do have some time finally so I will start looking at these soon. Will keep you update as I work through them :)

akshaykarle commented 6 years ago

@cgriggs01 when I tried to remove the unimplemented delete methods on project and container, the provider test gives me the following error:

--- FAIL: TestProvider (0.00s)
    provider_test.go:11: err: 2 error(s) occurred:

        * resource mongodbatlas_project: Delete must be implemented
        * resource mongodbatlas_container: Delete must be implemented
FAIL

The MongoDB Atlas API doesn't provide methods to delete a Container or a Project so I'm unable to implement these methods. How should I proceed? Just leave those methods unimplemented for now?

dpiddockcmp commented 5 years ago

Hi @akshaykarle. I just deleted an empty Project using the API documented here: https://docs.atlas.mongodb.com/reference/api/project-delete-one/

akshaykarle commented 5 years ago

Yup @dpiddockcmp, planning to add that soon to the provider :)

cgriggs01 commented 5 years ago

Hey ya'll,

I am having some issues running the acceptance tests against my MongoDB Atlas account, nd consistantly getting this error on most of the tests:

=== RUN   TestAccMongodbatlasDataSource_Project
--- FAIL: TestAccMongodbatlasDataSource_Project (1.15s)
    <autogenerated>:1: Step 0 error: Error refreshing: 1 error(s) occurred:

        * data.mongodbatlas_project.test: 1 error(s) occurred:

        * data.mongodbatlas_project.test: data.mongodbatlas_project.test: Error reading MongoDB Project with name test: MongoDB Atlas: 401 The current user is not in the group, or the group does not exist.

Any thoughts on how to fix this?

akshaykarle commented 5 years ago

hey @cgriggs01 i invited you to the test project just now. Can you accept my invitation and try running the tests again please?

cgriggs01 commented 5 years ago

Ok, I accepted the invite.

But am still getting those errors. I beleive its because the acceptance tests are calling projectName := "test" while the name of the project on the test account is `Terraform Test Project 0'. Should those be the same project name or am I totally wrong?

Let me know. Thanks!

holms commented 5 years ago

Silently cheering for getting this provider to official registry

cgriggs01 commented 5 years ago

Hey @akshaykarle

=== RUN   TestAccMongodbatlasCluster_basic
--- FAIL: TestAccMongodbatlasCluster_basic (1187.13s)
    testing.go:599: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: Check failed: Cluster "5c3792fc79358e2124a76e47" still exists

        State: <no state>
=== RUN   TestMongodbatlasCluster_importBasic
--- FAIL: TestMongodbatlasCluster_importBasic (511.79s)
    testing.go:599: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: Check failed: Cluster "5c37979fc56c989c8c692778" still exists

        State: <no state>
=== RUN   TestAccMongodbatlasContainer_basic
--- FAIL: TestAccMongodbatlasContainer_basic (1.57s)
    testing.go:538: Step 0 error: Error applying: 1 error(s) occurred:

        * mongodbatlas_container.test: 1 error(s) occurred:

        * mongodbatlas_container.test: Error creating MongoDB Container: MongoDB Atlas: 409 Cannot modify in use containers. Resources already exist in US_EAST_1. Creating resources in US_EAST_1 is not supported..

Although the items above should be address before provider official release, I’m going to move this provider into the queue to be review by one of our Terraform ecosystem engineers. You’ll be the 3rd integration in the queue so it will be a few weeks before an engineer is available to review.

Let me know if you have any questions about those.

akshaykarle commented 5 years ago

Closing this one since we have https://github.com/akshaykarle/terraform-provider-mongodbatlas/issues/68 which covers what is remaining on this issue