【发布时间】:2023-02-08 04:41:38
【问题描述】:
您好,我正在谷歌云免费套餐帐户中使用 kubernetes 和 terraform(尝试使用免费的 300 美元)。这是我的 terraform 资源声明,它是我从 terraform 资源页面复制的非常标准的东西。这里没有什么特别奇怪的。
resource "google_container_cluster" "cluster" {
name = "${var.cluster-name}-${terraform.workspace}"
location = var.region
initial_node_count = 1
project = var.project-id
remove_default_node_pool = true
}
resource "google_container_node_pool" "cluster_node_pool" {
name = "${var.cluster-name}-${terraform.workspace}-node-pool"
location = var.region
cluster = google_container_cluster.cluster.name
node_count = 1
node_config {
preemptible = true
machine_type = "e2-medium"
service_account = google_service_account.default.email
oauth_scopes = [
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
这个 terraform sn-p 曾经工作正常。为了不至于太快耗尽 300 美元,每天结束时我都会使用terraform destroy 销毁集群。
然而有一天,kubernetes 集群的创建刚刚停止工作。这是错误:
Error: googleapi: Error 403: Insufficient regional quota to satisfy request: resource "SSD_TOTAL_GB": request requires '300.0' and is short '50.0'. project has a quota of '250.0' with '250.0' available. View and manage quotas at https://console.cloud.google.com/iam-admin/quotas?usage=USED&project=xxxxxx., forbidden
看起来在所有 terraform 销毁并最终建立了一些配额之后,有些东西没有得到清理,我无法再创建集群。我仍然能够通过谷歌云网络界面创建集群(我只尝试使用自动驾驶仪,并且在同一位置)。我有点困惑为什么会这样。我的假设正确吗?我是否需要删除 terraform 不会自动删除的内容?如果是,为什么?有没有办法解决这个问题并能够再次使用 terraform 创建集群?
【问题讨论】:
标签: google-cloud-platform terraform terraform-provider-gcp