Hi
I need some help on a query I am building
Resources
| where type == "microsoft.storage/storageaccounts"
| extend keysource = tostring(properties.encryption.keySource)
| extend keysource1 = replace(keysource, 'Microsoft.Keyvault' , 'EncryptionAtRestWithCustomerKey')
| project keysource1
The query fails with an unexpected error
Details:
An unexpected query execution error occurred. Please try again later. (Code:UnexpectedQueryExecutionError)
The documentation for Azure Resource Graph Explorer does not mention the replace function as supported, but in the query builder it seems that it is supported.
This is what I get if I just write the word replace
The function 'replace' requires an argument list.
(function) replace(regex, rewrite, text): string
The function 'replace' requires an argument list.
So it seems to be supported but I cannot understand why it fails.
My goal is to get the properties.encryption.keySource output and if the says Microsoft.Keyvault to replace it with the EncryptionAtRestWithCustomerKey string.
Any ideas before I go to MS support?
Thanks in advance
GG