You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to reconfigure default datasource of azure ml workspace so that it uses managed identity for authentication. I used the "azapi_update_resource" resource.
However, when trying to do this, I get the following error in terraform logs:
The datastore workspaceblobstore is currently the workspace default, so it cannot be updated with isDefault set to false. To change the default, update a different datastore with isDefault set to true.
It seems that "isDefault" is a property marked readonly in schema, however trying to update the resource sets it to false, and that triggers the error. In addition, trying to set it to true or null in the resource body doesn't change the outcome.
I have done a test with az rest by reading the resource, modifying the authentication credentials properties and sending the update, and it worked, but only when "isDefault" was explicitly set to true.
This is actually an azure schema bug, however seems that azapi might need a way to work around bugs like this. Currently it ignores any tries to set it.
The text was updated successfully, but these errors were encountered:
I'll work on improving this to make sure that the properties specified in the azapi_update_resource's body always are sent to the API.
Meanwhile, I have a workaround that might help with this case. The azapi_resource_action is used to trigger one http request, I think you could use it to make a "Patch"/"PUT" request to update the resource.
does the workaround require first retrieving data using a data source? because PATCH is not supported by the resource in question, and PUT requires sending original body with updates, not just updated elements.
Also it turned out I don't need to do that because somehow most of the settings needed are set by default already for this specific resource, which I didn't know at the time.
does the workaround require first retrieving data using a data source? because PATCH is not supported by the resource in question, and PUT requires sending original body with updates, not just updated elements.
Got it, then this workaround won't work for this case.
Also it turned out I don't need to do that because somehow most of the settings needed are set by default already for this specific resource, which I didn't know at the time.
I wanted to reconfigure default datasource of azure ml workspace so that it uses managed identity for authentication. I used the "azapi_update_resource" resource.
However, when trying to do this, I get the following error in terraform logs:
Here's my resource:
It seems that "isDefault" is a property marked readonly in schema, however trying to update the resource sets it to false, and that triggers the error. In addition, trying to set it to true or null in the resource body doesn't change the outcome.
I have done a test with
az rest
by reading the resource, modifying the authentication credentials properties and sending the update, and it worked, but only when "isDefault" was explicitly set to true.This is actually an azure schema bug, however seems that azapi might need a way to work around bugs like this. Currently it ignores any tries to set it.
The text was updated successfully, but these errors were encountered: