SumoLogic / terraform-provider-sumologic

Terraform provider for Sumo Logic
https://www.terraform.io/docs/providers/sumologic/
Mozilla Public License 2.0
40 stars 57 forks source link

Content with same name already exists error when resource name was changed #673

Open justin-k-genesys opened 4 months ago

justin-k-genesys commented 4 months ago

We had an existing resource defined such as:

resource "sumologic_content" "some_name"{
    parent_id = 12345
    config = jsonencode({
        "name": "name of saved search"
        ...
    })
}

We made a spelling change to "some_name" and were able to successfully make the change in multiple regions. For 1 region, we got the following error:

Error: Failed - {content1:duplicate_element Content:: Content with same name already exists. Name = name of saved search & Existing Parent ID = 12345 }

By the time I checked the sumologic UI for the region, the saved search was completely gone. The change was attempted again the following day and was successful. I believe there to be some sort of race condition.