Friday, April 13, 2018

[google-cloud-sql-discuss] Re: Recreating database with the same instance id

That would not be expected, no. But I can't reproduce that behavior in my project.

On Friday, April 13, 2018 at 5:59:28 AM UTC-7, Leonardo Faoro wrote:
I can't use any name containing similar words:

gcloud sql instances create test1 -> The Cloud SQL instance already exists.
gcloud sql instances create test2 -> The Cloud SQL instance already exists.
gcloud sql instances create test123456 -> The Cloud SQL instance already exists.

Is this behavior expected as well?

On Thursday, February 16, 2017 at 5:08:03 PM UTC+1, Pia Chamberlain wrote:
This is expected behavior. From https://cloud.google.com/sql/docs/mysql/delete-instance:

You cannot reuse an instance name for up to a week after you have deleted an instance.

On Wednesday, February 15, 2017 at 1:04:11 PM UTC-8, Michael Strickland wrote:
I originally created a database through the Google Cloud web console, and later attempted to replicate the steps using gcloud on the command line for reproducibility.

I found a gcloud command that works when creating a new instance with a different name, but attempting to delete the original instance I made, and recreate it using gcloud failed with the following error:

gcloud beta sql instances create stg-mysql-us-central1 \
  --database-version MYSQL_5_7 \
  --activation-policy ALWAYS \
  --tier db-n1-standard-8 \
  --region us-central1 \
  --replication SYNCHRONOUS \
  --storage-size 200GB \
  --storage-type SSD \
  --storage-auto-increase 
ERROR: (gcloud.beta.sql.instances.create) Project [MY_PROJECT] is the subject of a conflict: The Cloud SQL instance already exists.

This error occurs using the web console as well if you try to create an instance with a name you used previously, even if you have since deleted the instance.

Is this expected behavior? Can we expect that names can be reused after a given amount of time?

I found an old issue on the google bug tracker mentioning the same behavior, but there wasn't any resolution: https://code.google.com/p/googlecloudsql/issues/detail?id=84

Thanks!
Michael

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/83528c13-c1bd-4ca9-8aac-18dbae5d02a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment