The error you’re encountering is due to the fact that the PostgreSQL instance needs to be stopped in order to change its availability type. When the instance is running, you cannot make this specific configuration change.
Here’s how you can resolve this:
Stop the PostgreSQL Instance:
You need to stop the instance before changing the availability type. You can do this via the Google Cloud Console, gcloud command line, or the API.