Stop Read Replica Instance on GCP CloudSQL

702 views Asked by At

To stop a cloudsql instance

gcloud sql instances patch INSTANCE_NAME --activation-policy=NEVER

We tried and it failed for read replicas instances

ERROR: (gcloud.sql.instances.patch) HTTPError 400: Invalid request: Invalid flag for instance role: Activation policy for replica must be set to ALWAYS, currently 'NEVER'..

Now as per the docs, we can't set the NEVER for read replicas.

enter image description here

Is there any way to stop the read replica instance of cloudsql along with main instance properly ?

1

There are 1 answers

3
Robert G On

For us to stop read replication, we have two options:

Disable Replication

  1. Go to Cloud SQL Instance page

  2. Select the read replica you want to disable

    3

  3. Click DISABLE REPLICATION then click on DISABLE when a pop-up display

    4

Delete Read Replica

  1. Go to Cloud SQL Instance page

  2. Select the read replica you want to disable

    3

  3. Click on EDIT and make sure that under Data Protection, Enable deletion protection is unchecked then click on SAVE.

    5

    6

  4. Click DELETE then type in the read-replica-name when a pop-up display

    7

    8