I was unable to find any answers at all on *insert favourite search engine here* for this issue, which is rare. On trying to deploy an ARM Template containing an Azure Cosmos DB, I was greeted with the below failure message.
The unknown resource response code 'NotModified' is encountered.
Took me a while to figure this one out.
So the head-scratcher here was that I could recreate the issue just by exporting my Resource Group (containing my Cosmos DB) straight out of Azure portal, take azuredeploy.json exactly as it was, and it still returned this error if it was completely unmodified.
I tried all sorts of things involving checking versions were up to date etc, until eventually I used a familiar approach: commenting out individual resources until I found one that caused the error.
Under the array of resources within the json was a resource of type “Notebook Workspace”, or Microsoft.DocumentDB/databaseAccounts/notebookWorkspaces
(My brain refuses to learn whether this is called a “Notebook Workspace” or a “Notespace Workbook” for some reason, so in case I get it wrong elsewhere it’s definitely a notebookWorkspace).
For me, this was the resource causing the issue, and since I wasn’t actually using notebooks I simply removed it from the resources array. After that, I could deploy the ARM Template just fine.
THANK YOU – insert favourite search engine worked for me 😉
Hooray! The system works.
Hi there, thanks a lot for this post. This resolved the issue and saved my day.
As not many people have encountered this. your post makes it special. Thanks again.
Glad to be of help 🙂
Only one hit on the search engine 😉
But the question is: why does this fail and what if I do actually want to use the notebooks?
You’re right, this is just a workaround for those of us who weren’t using notebooks. I haven’t had a need to use them yet, but if I do I will update the post with any findings. For now ARM feels like a lot of trial and error.