terraform-provider-yandex icon indicating copy to clipboard operation
terraform-provider-yandex copied to clipboard

Error when creating a resource yandex_mdb_mongodb_user

Open ssch1337 opened this issue 11 months ago • 1 comments

Error when synchronizing a resource that was previously deleted manually

Steps to reproduce:

  1. Create a standard MongodbUser resource via terraform
resource "yandex_mdb_mongodb_user" "foo" {
  cluster_id = "<your_clusterid>"
  lifecycle {
      prevent_destroy = true
  }
  name = "alice"
  password = "MySecurePasswor123"
}
  1. Delete the user in the cloud
  2. Push terraform plan or terraform apply

Expected behavior:

terraform will see the configuration drift and create the resource

Error

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Error: Failed to Read resource
│ 
│   with yandex_mdb_mongodb_user.foo,
│   on main.tf line 15, in resource "yandex_mdb_mongodb_user" "foo":
│   15: resource "yandex_mdb_mongodb_user" "foo" {
│ 
│ Error while requesting API to get MongoDB user:server-request-id = 3ec6cebf-26dd-42bc-aeda-2cd3f76fb0a8 server-trace-id = a91d69e5d437fbbd:5430998c90c7eb3e:a91d69e5d437fbbd:1
│ client-request-id = 610f4f0f-8a24-4194-adf2-58a2393ecd19 client-trace-id = c59e67a6-1c10-4083-9acf-7b9ef90e10a5 rpc error: code = NotFound desc = user "alice" not found

ssch1337 avatar Mar 19 '24 13:03 ssch1337

Hi, any progress in working on this bug?

ssch1337 avatar Apr 05 '24 06:04 ssch1337

+1

igorliubimovext avatar Aug 16 '24 06:08 igorliubimovext

Hello everyone! Thank you for reporting the issue. The problem was indeed on our side, and the fix will be included in version 0.130.

Apelsin234 avatar Oct 08 '24 13:10 Apelsin234