mongodb / terraform-provider-mongodbatlas

Terraform MongoDB Atlas Provider: Deploy, update, and manage MongoDB Atlas infrastructure as code through HashiCorp Terraform
https://registry.terraform.io/providers/mongodb/mongodbatlas
Mozilla Public License 2.0
240 stars 168 forks source link

Error creating users with mongodbatlas_database_user (following documentation examples) #144

Closed hc-danieltiziani closed 4 years ago

hc-danieltiziani commented 4 years ago

I'm trying to create users based on the documentation at https://www.terraform.io/docs/providers/mongodbatlas/r/database_user.html but it's not working.

resource "mongodbatlas_database_user" "admin_user" {
  auth_database_name = "admin"
  project_id         = "FAKEID"
  username           = "USERNAME"
  password           = "SOME PWD"

  roles {
    role_name     = "readWrite"
    database_name = "rate-service"
  }
}

Error:

Error: Missing required argument

  on tf/mongodb_atlas_cluster.tf line 46, in resource "mongodbatlas_database_user" "admin_user":
  46: resource "mongodbatlas_database_user" "admin_user" {

The argument "database_name" is required, but no definition was found.

Error: Unsupported argument

  on tf/mongodb_atlas_cluster.tf line 47, in resource "mongodbatlas_database_user" "admin_user":
  47:   auth_database_name = "admin"

An argument named "auth_database_name" is not expected here.

Using: terraform-provider-mongodbatlas_v0.4.0_x4

themantissa commented 4 years ago

@hc-danieltiziani thank you for the report - @PacoDw and @marinsalinas please take a look.

marinsalinas commented 4 years ago

Hello @hc-danieltiziani could you please run the following command and share the output, it is just to be sure that you are using the latest release.

terraform provider --version

themantissa commented 4 years ago

@hc-danieltiziani wanted to check in and see if the issue has been resolved or if you are still having issues?

themantissa commented 4 years ago

Going to assume we are good here and close. Please comment if any issues persist.

hc-danieltiziani commented 4 years ago

No issues, responded on other issue. Thanks for the attention!