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

Removal of user scopes is not detected by the provider #363

Closed
haidaraM opened this issue Dec 15, 2020 · 6 comments · Fixed by #368
Closed

Removal of user scopes is not detected by the provider #363

haidaraM opened this issue Dec 15, 2020 · 6 comments · Fixed by #368
Labels

Comments

@haidaraM
Copy link
Contributor

Terraform CLI and Terraform MongoDB Atlas Provider Version

# Copy-paste your version info here
Terraform v0.13.5
+ provider registry.terraform.io/mongodb/mongodbatlas v0.7.0

Terraform Configuration File

resource "mongodbatlas_database_user" "user" {
  project_id         = data.mongodbatlas_project.this.id
  username           = "test-user-bug"
  password           = "password123!!-))"
  auth_database_name = "admin"

  roles {
    role_name = "read"
    database_name = "test"
  }

  scopes {
    name = "clu-dev-atlas-terraform"
    type = "CLUSTER"
  }

}

Steps to Reproduce

  1. terraform init
  2. terraform apply
  3. Remove the scopes {} block from the configuration
  4. terraform apply

Expected Behavior

Terraform should remove the scopes from the user.

Actual Behavior

Terraform doesn't detect this change.

Debug Output

Additional Context

Also, the provider doesn't detect when a scope is manually added in the Atlas console. This not the case for the roles which are correctly handled by the provider.

References

@themantissa
Copy link
Collaborator

Thank you for the report and details @haidaraM @nikhil-mongo would you be able to repro to produce logs and open a PRODTRIAGE internally if confirmed? Thank you!

@nikhil-mongo
Copy link
Collaborator

I could verify this and logged PRODTRIAGE-1237

@haidaraM
Copy link
Contributor Author

Is this issue fixed by #368 ? If yes, when can we expect a new release of the provider ?

@themantissa
Copy link
Collaborator

@haidaraM yes, the PR did not get linked but we'll close this after the release. We expect the release in the next week or so, will be in v0.8.0. Thanks!

@themantissa themantissa linked a pull request Jan 11, 2021 that will close this issue
10 tasks
@haidaraM
Copy link
Contributor Author

Perfect @themantissa. Thanks for your work :-)

@themantissa
Copy link
Collaborator

v0.8.0 is now released. I'll close this issue. TY

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

Successfully merging a pull request may close this issue.

3 participants