yandex-cloud / terraform-provider-yandex

Terraform Yandex provider
https://www.terraform.io/docs/providers/yandex/
Mozilla Public License 2.0
199 stars 109 forks source link

Error when creating a resource yandex_mdb_mongodb_user #422

Open ssch1337 opened 4 months ago

ssch1337 commented 4 months ago

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"
    }
  2. Delete the user in the cloud
  3. 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 commented 3 months ago

Hi, any progress in working on this bug?