I'm trying to set up a PostgreSQL Flexible Server through an ARM template. I'm setting azure.extensions
in the template.
The first time I deploy the template, sometimes works fine, other times it fails.
When I deploy the template again (to update the existing server), the deployment always fails with an InternalServerError
.
Here's a snippet of the template:
resource postgresAllowedExtensions 'Microsoft.DBforPostgreSQL/flexibleServers/configurations@2021-06-01' = {
parent: postgres
name: 'azure.extensions'
properties: {
value: 'pgcrypto,postgis,timescaledb,uuid-ossp'
source: 'user-override'
}
}
resource postgresPreloadLibraries 'Microsoft.DBforPostgreSQL/flexibleServers/configurations@2021-06-01' = {
parent: postgres
dependsOn: [postgresAllowedExtensions]
name: 'shared_preload_libraries'
properties: {
value: 'timescaledb'
source: 'user-override'
}
}
And an example error:
Resource: <resource name>/azure.extensions
Status message:
{
"status": "Failed",
"error": {
"code": "InternalServerError",
"message": "An unexpected error occured while processing the request. Tracking ID: '4fe99e89-d3e4-4597-b0ea-6ba1d9acb138'"
}
}
Setting the parameters through the Azure CLI works fine, for example:
az postgres flexible-server parameter set \
--resource-group "$groupName" \
--server-name "$pgFlexServerName" \
--name "azure.extensions" \
--value "pgcrypto,postgis,timescaledb,uuid-ossp"
Changing the parameter through the Azure Portal also works fine. It's only through the ARM template that I'm getting this error.