Google cloud platform Terraform:未创建google\u sql\u数据库\u实例
我正在尝试使用terraform创建一个CloudSQL实例,但它甚至没有尝试创建它:CloudSQL仪表板没有改变 它最终会超时。为什么呢Google cloud platform Terraform:未创建google\u sql\u数据库\u实例,google-cloud-platform,terraform,google-cloud-sql,Google Cloud Platform,Terraform,Google Cloud Sql,我正在尝试使用terraform创建一个CloudSQL实例,但它甚至没有尝试创建它:CloudSQL仪表板没有改变 它最终会超时。为什么呢 resource "google_sql_database_instance" "db-instance" { # depends_on = [google_service_networking_connection.private-vpc-connection] name = "sonarqube" database_version =
resource "google_sql_database_instance" "db-instance" {
# depends_on = [google_service_networking_connection.private-vpc-connection]
name = "sonarqube"
database_version = "POSTGRES_9_6"
region = "asia-southeast1"
settings {
tier = "db-f1-micro"
# ip_configuration {
# private_network = google_compute_network.private-network.self_link
# }
}
}
我甚至删除了私有网络部分,所以我设置了TF_LOG=DEBUG和saw
2019-11-23T22:04:41.365+0800 [DEBUG] plugin.terraform-provider-google-beta_v3.0.0-beta.1_x4: 2019/11/23 22:04:41 [DEBUG] Dismissed an error as retryable. Waiting for other concurrent Cloud SQL operations to finish - googleapi: Error 409: The instance or operation is not in an appropriate state to handle the request., invalidState
通过谷歌搜索,我发现
这是因为实例名称在删除后一周内无法重用
所以我想问题是因为我试图用最近使用的名称创建一个实例 实际上,为了能够重用已经在新的CloudSQL实例中使用的名称,您必须。如果重新使用这个名字对你来说真的很重要,并且你在谷歌云平台支持上有一个支持包,你可以对此开一张罚单。
2019-11-23T22:04:41.365+0800 [DEBUG] plugin.terraform-provider-google-beta_v3.0.0-beta.1_x4: 2019/11/23 22:04:41 [DEBUG] Dismissed an error as retryable. Waiting for other concurrent Cloud SQL operations to finish - googleapi: Error 409: The instance or operation is not in an appropriate state to handle the request., invalidState