I had this exact same error when doing a GeoRestore with terraform. The problem was that I used the same terraform module I had used for the initial postgresql flexible server setup. I had to disable the high availability option, and after doing so, the restore completed successful.