尝试重新创建 cloudsql 实例时出现错误 "Resource in project is the subject of a conflict" 的原因是什么?
What is the reason for error "Resource in project is the subject of a conflict" while trying to recreate a cloudsql instance?
我正在尝试使用以下命令创建云sql 实例:
gcloud beta sql instances create sql-instance-1 --tier=db-f1-micro --region=asia-south1 --network=default --storage-type=HDD --storage-size=10GB --authorized-networks=XX.XXX.XX.XX/XX
实例 sql-instance-1 是我不需要一直 运行ning 的东西。所以我创建了一个 sql 转储文件,当我需要数据库时我创建它。当我 运行 此命令失败并出现以下错误时
ERROR: (gcloud.beta.sql.instances.create) Resource in project [my-project-id] is the subject of a conflict: The instance or operation is not in an appropriate state to handle the request.
据我了解,尽管实例已被删除,但 gcloud 抱怨之前使用了实例名称。当我将名称更改为新的未使用名称时,该命令工作正常。这样做的问题是每次我从转储中重新创建实例时都需要提供一个新名称。
我的问题是:
- 这是预期的行为吗,即 cloud-sql 实例的名称应该是唯一的,并且之前在项目中未使用过。
- 我还发现 gcloud 无法识别 --network 选项。如 here 所述,似乎仅适用于 gcloud beta。这预计什么时候成为 GA?
这确实是预期的行为。来自 documentation:
You cannot reuse an instance name for up to a week after you have
deleted an instance.
关于 --network
标志及其 GA 的时间表,它在 beta 之外的发布没有预计到达时间。但是,它的发布将在 Google Cloud SDK Release Notes, which you can get updates from by subscribing to the google-cloud-sdk-announce group
中列出
我正在尝试使用以下命令创建云sql 实例:
gcloud beta sql instances create sql-instance-1 --tier=db-f1-micro --region=asia-south1 --network=default --storage-type=HDD --storage-size=10GB --authorized-networks=XX.XXX.XX.XX/XX
实例 sql-instance-1 是我不需要一直 运行ning 的东西。所以我创建了一个 sql 转储文件,当我需要数据库时我创建它。当我 运行 此命令失败并出现以下错误时
ERROR: (gcloud.beta.sql.instances.create) Resource in project [my-project-id] is the subject of a conflict: The instance or operation is not in an appropriate state to handle the request.
据我了解,尽管实例已被删除,但 gcloud 抱怨之前使用了实例名称。当我将名称更改为新的未使用名称时,该命令工作正常。这样做的问题是每次我从转储中重新创建实例时都需要提供一个新名称。
我的问题是:
- 这是预期的行为吗,即 cloud-sql 实例的名称应该是唯一的,并且之前在项目中未使用过。
- 我还发现 gcloud 无法识别 --network 选项。如 here 所述,似乎仅适用于 gcloud beta。这预计什么时候成为 GA?
这确实是预期的行为。来自 documentation:
You cannot reuse an instance name for up to a week after you have deleted an instance.
关于 --network
标志及其 GA 的时间表,它在 beta 之外的发布没有预计到达时间。但是,它的发布将在 Google Cloud SDK Release Notes, which you can get updates from by subscribing to the google-cloud-sdk-announce group