Azure / Azure/bicep

CosmosDB (DocumentDB) API not idempotent

Open
#7,316 3 comments 0 reactions 1 assignee Claimed by @alex-frankel View on GitHub
investigate provider improvement
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Bicep version**
Bicep CLI version 0.7.4 (5afc312467)

**Describe the bug**
If a CosmosDB deployment fails (tested with MongoDB API), the following deployment with correct parameters results in the following error:

```json
{
"status": "Failed",
"error": {
"code": "BadRequest",
"message": "DatabaseAccount test-data is in a failed provisioning state because the previous attempt to create it was not successful. Please delete the previous instance before attempting to recreate this account.\r\nActivityId: 1e1faa3f-1234-4f02-ab23-28f37ea822f9, Microsoft.Azure.Documents.Common/2.14.0"
}
}
```

Tested with `Microsoft.DocumentDB/databaseAccounts@2021-10-15`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.