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

Missing password in database user for mongodb #696

Closed
Luxizzle opened this issue Sep 15, 2021 · 0 comments · Fixed by #697
Closed

Missing password in database user for mongodb #696

Luxizzle opened this issue Sep 15, 2021 · 0 comments · Fixed by #697
Labels

Comments

@Luxizzle
Copy link

@Luxizzle Luxizzle commented Sep 15, 2021

Bug Report


When creating a database user in a mongodb cluster, im missing the password attribute.

Describe the bug

For example, creating a cluster and a new user:

resource "digitalocean_database_cluster" "mongodb" {
  name       = "mongodb-test"
  engine     = "mongodb"
  version    = 4
  size       = 1
  region     = "ams3"
  node_count = 1

  lifecycle {
    prevent_destroy = true
  }
}

resource "digitalocean_database_user" "user" {
  cluster_id = digitalocean_database_cluster.mongodb.id
  name = "user"
}

And then trying to access digitalocean_database_user.user or executing:

terraform state show digitalocean_database_user.user

Shows there is no password in our state.

Affected Resource(s)

Expected Behavior

Password being available to log in to our database cluster.

Actual Behavior

No password is being set in our state for mongodb users.

Steps to Reproduce

  1. terraform apply

Terraform Configuration Files

# main.tf
resource "digitalocean_database_cluster" "mongodb" {
  name       = "mongodb-test"
  engine     = "mongodb"
  version    = 4
  size       = 1
  region     = "ams3"
  node_count = 1

  lifecycle {
    prevent_destroy = true
  }
}

resource "digitalocean_database_user" "user" {
  cluster_id = digitalocean_database_cluster.mongodb.id
  name = "user"
}

Expected behavior

Again, a password for our user.

Debug Output

Panic Output

Additional context

Important Factoids

References

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.

1 participant