I have a bicep deployment that is attempting to add the following extensions to a postgres flexible instance. I am deploying postgres 15
resource postgresql 'Microsoft.DBforPostgreSQL/flexibleServers/configurations@2023-06-01-preview' = {
parent: postgreSQL
name: 'azure.extensions'
properties: {
value: 'address_standardizer,address_standardizer_data_us,amcheck,bloom,btree_gin,btree_gist,citext,cube,dblink,dict_int,dict_xsyn,earthdistance,fuzzystrmatch,hstore,intagg,intarray,isn,lo,ltree,pageinspect,pg_buffercache,pg_freespacemap,pg_partman,pg_prewarm,pg_stat_statements,pg_trgm,pg_visibility,pgaudit,pgcrypto,pgrowlocks,pglogical,pgstattuple,plpgsql,postgis,postgis_sfcgal,postgis_tiger_geocoder,postgis_topology,postgres_fdw,sslinfo,tablefunc,tsm_system_rows,tsm_system_time,unaccent,uuid-ossp,lo,hypopg,postgis_raster'
source: 'user-override'
}
}
This frequently fails with the following. However sometime it passes. How do I prevent this from happening. There should be some reliability to deployments.
On a side note with previous versions of postgres 12 this step was not required as these extensions were added by default. It appears at some point the default extensions where changed. Microsoft does not provide any documentation on what extensions are enabled on a particular version of postgres flexible. This I believe needs to be fixed as well.
The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'. (Code: ResourceDeploymentFailure, Target: /subscriptions/{subscription-id}/resourceGroups/my-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/my-server-name/configurations/azure.extensions)